GARCH and Rolling

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
jeanne
Posts: 11
Joined: Tue Jul 23, 2013 6:42 am

GARCH and Rolling

Unread post 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!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: GARCH and Rolling

Unread post 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.
jeanne
Posts: 11
Joined: Tue Jul 23, 2013 6:42 am

Re: GARCH and Rolling

Unread post 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:
Post Reply