Am running a rolling AR(5)-GARCH(1,1) model with moving window as:
Code: Select all
* AR(5)-GARCH(1,1)
*
clear h2
clear yeq1
*
compute gstart1=7,gend=1306
*
do j=0,2932
garch(p=1,q=1, method=bfgh, hseries=h2,resids=u2,print,regressors) gstart1+j gend+j y
# constant y{1 to 5}
set uu2 = u2**2
com ym0=%beta(1), ym1=%beta(2), ym2=%beta(3), ym3=%beta(4), ym4=%beta(5), ym5=%beta(6)
com vc=%beta(7), vb=%beta(8), va=%beta(9)
frml heq h2 = vc + vb*h2{1} + va*uu2{1}
frml ueq uu2 = h2
frml yeq yeq1 = ym0 + ym1*y{1} + ym2*y{2} + ym3*y{3} + ym4*y{4} + ym5*y{5}
group garchmod2 heq>>h2 ueq>>uu2 yeq>>yeq1
forecast(model=garchmod2, from=gend+1+j, to=gend+1+j)
end do j
*
smpl
prin / h2 yeq1
*
I am interested in both mean forecasts and vol forecasts. But occasionally the parameters of the GARCH(1,1) 'blow-up' with some turning negative and not within certain bounds on various iterations. How do I deal with this ?