Rashad

Moving CO-covariance (covariance on covariance)

This is Covariance on Covariance. It shows you how much a given covariance period has deviated from it mean over another defined period. Because it is a time series, It can allow you to spot changes in how covariance changes. You can apply trend lines, Fibonacci retracements, etc. This is also volume weighting covariance.

This is not a directional indicator nor is moving covariance. This is used for forecasting volatility. This must be used in conjunction with moving covariance.

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?
//Moving Co-Covariance
study(title="Co-Covariance", shorttitle="MCCV", overlay=false)
src = vwap, len = input(30, minval=1, title="covariance length"), len2 = input(7, minval=1, title="Co-covariance look back length")
mean = vwma(src, len)
stdev = stdev(src, len)
covariance = (stdev/mean)
covariancemean = vwma(covariance, len2)
cstdev = stdev(covariance, len2)
cocovariance = (cstdev/covariancemean)
plot(cocovariance, title="covariance on covariance", style = line, color = aqua)