I create a simple code to perform a multi-step forecast of VAR(1)-BEKK-GARCH(1,1)
But every time I run the code, the estimated series change every time. Can you guys give a look at the code and tell me with something is wrong or If what I'm doing is right?
Thank you in advance.
Best regards.
Code: Select all
' define the range for the 12 month forecast
range @first @last+12
'THE LOOP STARTS
' define loop for a 12 month forecast
for !i=1 to 12
' make the VAR
smpl @first @first+162+!i
var var1.ls 1 1 beta_1 beta_2 beta_3
' make system for the VAR-GARCH
var1.makesystem(n=sys1)
' estimate the VAR-GARCH BEKK
sys1.arch @diagbekk C(indef) arch(1,diag) garch(1,diag)
' make the model for forecasts
sys1.makemodel(mod1)
smpl @first+163+!i @first+163+!i
' perform the forecasts
mod1.solve(d=d)
smpl @all
series beta_1 = beta_1_0
series beta_2 = beta_2_0
series beta_3 = beta_3_0
'delete the auxiliar betas
delete beta_1_0
delete beta_2_0
delete beta_3_0
next