GARCH and Rolling
GARCH and Rolling
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!
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
You didn't set up COEF3 to be a series. You want:
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.
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
Re: GARCH and Rolling
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...
Yes, I deliberately chose both the start and end to shrink with each estimation. It is just an experiment...