bitmexstorm

Correlation Coefficient & Coefficient of Determination

3122 views
256
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.

Want to use this script on a chart?