## Forecasting with a ARIMA/GARCH Model

Discussions of ARCH, GARCH, and related models

### Forecasting with a ARIMA/GARCH Model

I am trying to forecast a series with an ARIMA/GARCH Model. I am able to estimate the ARIMA/GARCH model but I am lost at how to forecast the original series from the ARIMA/GARCH model. Thanks in advance for any help, the code I am using is the following:

Code: Select all
`cal(m) 1998:1all 2011:12 open data C:\Users\rmvoller.COUGARNET\Desktop\Forcasting Project\ED.xlsxdata(format=xlsx,org=obs) / EDgraph 1#edset y * 2010:12 = edset yf = edset ly = log(y)set lyf = log(yf)diff(sdiffs=1) ly / dlygraph 1#dlyset trend = tseasonal season12set season1 = season12{-11}set season2 = season12{-10}set season3 = season12{-9}set season4 = season12{-8}set season5 = season12{-7}set season6 = season12{-6}set season7 = season12{-5}set season8 = season12{-4}set season9 = season12{-3}set season10 = season12{-2}set season11 = season12{-1}linreg ly#constant trend season12{-11 to -1}exclude#season12{-11 to -1}linreg dly#constant trend season12{-11 to -1}exclude#season12{-11 to -1}*ADF test*linreg dly#constant ly{1} dly{1 to 8}linreg dly#constant ly{1} dly{1 to 7}linreg dly#constant ly{1} dly{1 to 6}linreg dly#constant ly{1} dly{1 to 5}linreg dly#constant ly{1} dly{1 to 4}linreg dly#constant ly{1} dly{1 to 3}linreg dly#constant ly{1} dly{1 to 2}linreg dly#constant ly{1} dly{1 to 1}linreg dly#constant ly{1}@DFUNIT(DET=TREND,LAGS=3) lygraph# ly@bjident(diffs=1,sdiffs=1) ly* Searching for a minimum of SBC (also called, SIC)com sbcmin = 100000000., sbcp = 0, sbcq = 0com aicmin = 100000000., aicp = 0, aicq = 0do i=0,4do j=0,4boxjenk(diff=1,sdiff=1,ar=i,ma=j,constant,noprint)  ly  / residscompute sbc = log(%rss/%nobs) + %nreg*log(%nobs)/(%nobs)compute aic = log(%rss/%nobs) + 2*(%nreg)/%nobs*compute aic = %nobs*log(%rss) + 2*%nreg*compute sbc = %nobs*log(%rss) + %nreg*log(%nobs) display 'p ='  i  ' q =' j  '  AIC = ' aic     '  SBC = ' sbc if sbc < sbcmin {  compute sbcp = i  compute sbcq = j  compute sbcmin = sbc  } if aic < aicmin {  compute aicp = i  compute aicq = j  compute aicmin = aic  }endo jendo idispdisp 'Selected values of p and q using SBC = ' sbcp  sbcqdisp 'Selected values of p and q using AIC = ' aicp  aicqdispboxjenk(constant,diff=1,sdiff=1,ar=sbcp,ma=sbcq,define=eq1) ly / Ucor(partial=pacf,qstats,number=36,span=12,dfc=4) U 1998:01  2010:12set u2 = u*uUFORECAST(STEPS=12,EQUATION=EQ1,STDERRS=LY_FORE,PRINT) lY_FORgraph 2#lyf#ly_for* Testing for arch effectslinreg u2 1998:01  2010:12# constant u2{1 to 5}compute trsq = %nobs*%rsquaredcdf chisq trsq 5source(noecho) c:/garch1.src@GARCH dly 1998:01  2010:12  nresids cvar`
rmvoller

Posts: 4
Joined: Tue Apr 10, 2012 2:36 pm

### Re: Forecasting with a ARIMA/GARCH Model

You should be using the GARCH instruction, not the @GARCH procedure. As you have that written, it's not estimating an ARIMA/GARCH model. Once you have that model straight, the mean is forecast using the ARIMA part, and the variances are forecast using the GARCH part. If it's not a GARCH-M, the two don't interact for forecasting purposes.
TomDoan

Posts: 2725
Joined: Wed Nov 01, 2006 5:36 pm

### Re: Forecasting with a ARIMA/GARCH Model

Thank you for response. Using the garch instruction I arrive at this code for my garch model:

GARCH(P=1,Q=1,RESIDS=GR,HSERIES=G,REGRESSORS) / DLY
# Constant DLY{2} %MVGAVGE{5}

and this code for my ARIMA model:

boxjenk(constant,diff=1,sdiff=1,ar=2,ma=5,define=eq1) ly / U
cor(partial=pacf,qstats,number=36,span=12,dfc=4) U 1998:01 2010:12
set u2 = u*u

How would I obtain the forecast of ly using the ARIMA equation for the mean and the GARCH equation for the variance? I am currently only aware of how to forecast from the individual models. Thanks again for your help.
rmvoller

Posts: 4
Joined: Tue Apr 10, 2012 2:36 pm

### Re: Forecasting with a ARIMA/GARCH Model

Mr. Doan can confirm, but I don't think he was suggesting that you *estimate* them separately. Rather, you would use the parameter estimates produced by GARCH for both sets of forecasts.

We discuss forecasting GARCH variances in the User's Guide (see page 295 if using version .

For the mean model, I believe you would want to define a new equation for the mean model, using the coefficients saved in %BETA by the GARCH instruction to provide the coefficient values. You could then use FORECAST or UFORECAST to generate the forecasts.

Regards,
Tom Maycock
moderator

Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm

### Re: Forecasting with a ARIMA/GARCH Model

Thanks for they help I see how to do it now.
rmvoller

Posts: 4
Joined: Tue Apr 10, 2012 2:36 pm