I'm trying to use the Model in SAS/ETS to predict the conditional volatility
using various forms of GARCH. I used the sample code from the SAS website and
added to it. Right now, it looks like this:
proc model data = returns;
parms earch0 .1 earch1 .2 egarch1 .75 theta .65 ;
/* mean model */
lnrt = intercept ;
/* variance model */
if (_obs_ = 1 ) then
h.lnrt = exp(earch0/(1. - egarch1)) ;
else h.lnrt = exp(earch0 + earch1*zlag(g) + egarch1*log(zlag(h.lnrt))) ;
g = theta*(-nresid.lnrt) + abs(-nresid.lnrt) - sqrt(2/constant('pi')) ;
/* fit the model */
fit lnrt / covbest=GLS fiml method = marquardt hessian = GLS out=eg_hat normal
/*Solve for 15-period forecast*/
solve h.lnrt / data=returns estdata=eg_param sdata=eg_cvm nahead=15
However, SAS gives me the following error message:
ERROR: The number of variables to solve for, 1, does not equal the number of
equations, 0, that the solution is to satisfy.
Am I approaching this the wrong way? Which equation has to be satisfied to solve
for h.lnrt? Is there a better way to get SAS to forecast n-periods conditional
variance (h.lnrt) for GARCH?
Any suggestions would be much appreciated as I'm just learning SAS for my thesis.
This mail sent through www.mywaterloo.ca