Code: Select all
dec series[symm] Hcov
compute tstart = %regstart()
do t = tstart, %regend()
dec vect std(n)
do i=1,n
compute std(i) = vol(i)(t)
end do i
* DECO H(t): variance-covariance
compute Hcov(t) = %mqform(%cvtocorr(q(t)), %diag(std))
end do t
However, when I run this code, I get the following error:
## MAT15. Subscripts Too Large or Non-Positive
The Error Occurred At Location 130, Line 10 of loop/block
Could you please explain the reason why this error occurs?
I have attached the code and the file.