*
* @GARCHFore( options ) h u
* computes out-of-sample variance forecasts for a standard univariate
* GARCH model.
*
* Parameters:
* h (input and output) is the SERIES which has the in-sample estimates
* of the covariances (produced with the HSERIES option on GARCH), and
* will be extended to hold the forecast variances.
* u (input) is the SERIES of the residuals. This is produced by the
* RESIDS option option on GARCH.
*
* Options:
*
* STEPS=number of out-of-sample forecast steps
*
* Revision Schedule:
* 03/2007 Written by Tom Doan, Estima. Requires version 6.10.
*
procedure GARCHFore h u
type series *h
type series u
*
option integer steps 12
*
local real cx ax bx
local series uu
*
* Create uu as the squared residuals. Extend it out to the end of the
* forecast period so we can compute its elements on the fly during the
* SET instruction.
*
set uu %regstart() %regend() = u^2
set uu %regend()+1 %regend()+steps = 0.0
*
* Pull out the coefficients
*
compute cx=%beta(%nregmean+1)
compute ax=%beta(%nregmean+2)
compute bx=%beta(%nregmean+3)
set h %regend()+1 %regend()+steps = uu=(cx+bx*h{1}+ax*uu{1})
end