I am doing rolling volatility forecasts for my dissertation but I am having issues with the coding. More specifically, I cannot figure out how to save the conditional variance, let alone forecast it. I would also like to add a variance regressor for the conditional variance estimation, but I have been unable to find answers in the EViews Programming Reference. I am using EViews 6. I also did look at other examples on the forums here, but I did not find the answer I was looking for.
Here is my code (taken from one of the included examples and modified):
Code: Select all
!window = 525
!length = @obsrange
equation eq7
smpl @first @first+!window-1
series retftse100hat
series cvarhat
!step = 5
for !i = 1 to !length-!window+1-!step step !step
eq7.arch(1,1) retftse100-rf retasx-rf
eq7.makegarch tmp_cvarhat
smpl @first+!i+!window-1 @first+!i+!window-2+!step
eq7.forecast(f=na) tmp_retftse100hat
retftse100hat = tmp_retftse100hat
cvarhat = tmp_cvarhatIf anyone can provide suggested modifications to the code such that the conditional variance is forecasted and saved like the mean equation, as well as how to add the variance regressor to the conditional variance equation, I would very much appreciate it.
With thanks,
deeh
