Page 1 of 1

GARCH and Rolling

Posted: Tue Jul 23, 2013 7:58 am
by jeanne
Dear all,

I am running a rolling regression based on the garch-command.
Without success, I have been trying to save one of the coefficients for each window into a vector.

The following command works fine BUT only saves the very last beta(1) and not a series of coefficients (one for each i = 1,2,…):

compute start=456, end=1992
do i = 0,10
garch(p=1,q=1,noprint,reg) start+i end-i x
# constant x{1}
compute coef3 = %beta(3)
end do


I tried to use the following instead of “compute coef3 = %beta(3)”:

compute coef3(end-i) = %beta(3)

However, this always yields the following error message:
“## SX17. Missing Operator or Adjacent Operands
>>>>compute coef3(<<<<”


What is wrong in the above case?

Thank you very much!

Re: GARCH and Rolling

Posted: Tue Jul 23, 2013 9:56 am
by TomDoan
You didn't set up COEF3 to be a series. You want:

Code: Select all

set coef3 = 0.0
compute start=456, end=1992
do i = 0,10
   garch(p=1,q=1,noprint,reg) start+i end-i x
   # constant x{1}
   compute coef3(end-i) = %beta(3)
end do
However, is it your intention to squeeze the sample in from both ends? Each change in i both increases the low end and decreases the high.

Re: GARCH and Rolling

Posted: Mon Aug 12, 2013 4:00 am
by jeanne
Thank you so much for your help and prompt reply!
Yes, I deliberately chose both the start and end to shrink with each estimation. It is just an experiment... :roll: