bitmexstorm

Correlation Coefficient & Coefficient of Determination

bitmexstorm Updated   
Measures the correlation between 2 assets, along with the coefficient of determination of the average of 200 candles. By default, 2 correlations are presented but only 1 with a coefficient of determination (default 200).

Default assets are XBTUSD and SPX

A value of 1 for R(200) gives a strong linear correlation between 2 assets
A value of 0 for R(200) suggests no linear correlation
A value of -1 for R(200) suggests a negative linear correlation between 2 assets

A coefficient of determination (R2) of 1 suggests confidence in the variability of the response data around mean.
A coefficient of determination (R2) of 0 suggests no confidence in the variability of the response data around mean.

Release Notes:
-

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?