I am using code for rolling regression for GARCH given in user manual to estimate GARCH-M. Please see if I have done everything in correct way. I am getting the outputs and graphs. I have done following things:
I have added %garchv to make it GARCH-M
I have changed coeff (2) to (3), (3) to (4), and (4) to (5)
Also, at the end I want to collect estimation of GARCH-V and window date in each estimation in two columns. How can I do that?
Thanks
Victor
0000000000000
Code: Select all
CALENDAR(M) 1997:07
DATA(FORMAT=XLS,ORG=COLUMNS) 1997:07 2012:07 STK
table
compute width=50
dec vect[series] coeffs(5)
clear coeffs
do gend=width,180
if gend==width
garch(p=1,q=1,regressors) gend-width+1 gend STK
#constant %garchv
else
garch(p=1,q=1,initial=%beta,hessian=%xx,regressors) $
gend-width+1 gend STK
#constant %garchv
compute %pt(coeffs,gend,%beta)
end do gend
spgraph(vfields=3,samesize,$
footer="Rolling GARCH Estimates, Window Width = 50")
set lrstd = sqrt(coeffs(3)/(1-coeffs(4)-coeffs(5)))
graph(hlabel="Estimated Process Standard Deviation",min=0.0)
# lrstd width *
graph(hlabel="Lagged Variance Coefficient")
# coeffs(5) width *
graph(hlabel="Lagged Squared Residuals Coefficient")
# coeffs(4) width *
spgraph(done)