Page 1 of 1

Rolling GARCH(1,1) forecasts

Posted: Wed Jun 22, 2011 11:41 am
by ylijohtaja
Hi all

I notice that there has been discussion on rolling AR(1)-GARCH(1,1) on the forum before. Is it also possible to compute out-of-sample forecasts from such a model? I managed to derive one period ahead out-of-sample forecasts from a rolling ARMA-model. I tried to do that in a similar manner with a GARCH(1,1) model (see the code below), but that obviously does not work. I would be very grateful for a code that does this for GARCH.

Code: Select all

clear forev coef1 coef2 coef3 coef4
do regend =1975:1, 2008:4
garch(p=1,q=1,hseries=ht,resids=at,noprint) regend-16 regend   
set uu = at**2
compute vc=%beta(2)
compute vb = %beta(4)
compute va=%beta(3)
frml hfrml ht = vc+vb*ht{1} + va*uu{1}
frml uufrml uu = ht
group garchmod hfrml>>ht uufrml>>uu
compute coef1(regend) = %beta(1)
compute coef2(regend) = %beta(2)
compute coef3(regend) = %beta(3)
compute coef4(regend) = %beta(4)
forecast(model=garchmod) forev regend+1 regend+1
end do

Re: Rolling GARCH(1,1) forecasts

Posted: Fri Jun 24, 2011 10:50 am
by TomDoan
That's fundamentally the correct idea, but you have a couple of instructions wrong. First, the GARCH instruction is missing its dependent variable. Second, you're using the syntax for UFORECAST on a FORECAST instruction, which are quite different because UFORECAST is forecasting only single equations. All you really need is:

forecast(model=garchmod,steps=1)

which will put the forecast value into the next entry in the HT series. (The start of the forecast period is the time period after the last estimation instruction, which is what you want).

I hope you're not planning to fit rolling GARCH models with 17 data points in the window. Your estimates are very likely to be quite unstable.