|
Kiran
2016-03-12 09:41:45
|
|
I'm modifying the attached AvgCorrelation function to calculate Average Covariance between assets in a group, by simply multiplying the correlation by the standard deviation of the 2 series.
VectorD corel=TA.Correl(ret1,ret2,_period); // Original statement
VectorD corel=TA.Correl(ret1,ret2,_period)*TA.Stddev(ret1,_period)*TA.Stddev(ret2,_period); // My modification
This gives me a NaN when i run it through a screen using 'SPY,TLT', 90days - no error when i run AvgCorrelation.
Please advise what i'm doing wrong.. TA.Stddev is a valid function.
thanks
Kiran
(by Vangelis M.,
uploaded several months ago)
No notes
|
|
|