by moderator » Wed Jun 22, 2011 12:59 pm
You have a line continuation symbol ($) here,
garch(p=1,q=1,reg,resids=u,hseries=h,initial=%beta,hessian=%xx,noprint) $ gend-width+1 gend rt
but aren't continuing the command on the next line. RATS stops processing the line when it hits the $, so it is expecting to find the start, end, and dependent variable parameters on the next line, but sees the "#" instead.
You should either get rid of the $, or insert the expected line break--that is, either:
garch(p=1,q=1,reg,resids=u,hseries=h,initial=%beta,hessian=%xx,noprint) gend-width+1 gend rt
# constant rt{1}
or
garch(p=1,q=1,reg,resids=u,hseries=h,initial=%beta,hessian=%xx,noprint) $
gend-width+1 gend rt
# constant rt{1}
Also, I don't think your starting period is correct: "gend-width+1" returns "1" for the first trip through the loop, but you can't start the estimation at entry 1 due to the lags in the model.
Finally, you should have 5 coefficients, not 4, so you want to adjust the dimensions on that vector of series accordingly. The order in which GARCH presents the coefficients is described in the Reference Manual, and can be easily seen by removing the NOPRINT option on GARCH, but in this case, they are pretty straightforward: the constant and the AR{1} coefficients are first and second, then the constant term in the variance equation (C), followed by the lagged squared residual and lagged variance terms (A and B).
Regards,
Tom Maycock
Estima