n step rolling forecast using garch
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
n step rolling forecast using garch
Hi
I am using eviews 6. Is it possible to produce n-step rolling forecasts of the garch model in eviews? Is there a specific fucntion in eviews to carry it out?
Thanks
I am using eviews 6. Is it possible to produce n-step rolling forecasts of the garch model in eviews? Is there a specific fucntion in eviews to carry it out?
Thanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: n step rolling forecast using garch
There is nothing built in, no.
Re: n step rolling forecast using garch
Hmm is there any program available to do it in eviews? I have been trying to work on the codes i found on the forum itself but to no avail!!
Re: n step rolling forecast using garch
Please find attached the workfile and program i have been trying. It is giving me 2 error messages:
1. error in sample : attempt to set sample outside of workfile range
structure/resize (from \workfile\proc menu) can expand the workfile range in 'SMPL 9/05/2016 9/06/2016'
My comments or queries: I have been estimating the data from 01/01/2000 to 05/03/2008 which represents the window= 3046. How come it is giving result for 2016??
2. WINSE is an illegal or reseerved name in 'DO_EQ1.FIT WIN8F [WINSE WINVAR]'
My comments or queries: I have tried to change the standard errors and variance series name but i am still getting the same error message.
Hope someone can help me.
Thanks
1. error in sample : attempt to set sample outside of workfile range
structure/resize (from \workfile\proc menu) can expand the workfile range in 'SMPL 9/05/2016 9/06/2016'
My comments or queries: I have been estimating the data from 01/01/2000 to 05/03/2008 which represents the window= 3046. How come it is giving result for 2016??
2. WINSE is an illegal or reseerved name in 'DO_EQ1.FIT WIN8F [WINSE WINVAR]'
My comments or queries: I have tried to change the standard errors and variance series name but i am still getting the same error message.
Hope someone can help me.
Thanks
- Attachments
-
- usd-nov11.wf1
- (782.33 KiB) Downloaded 431 times
-
- forecast.prg
- (605 Bytes) Downloaded 575 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: n step rolling forecast using garch
1. The sample error is from the line:
It isn't particularly easy to follow your code, but I believe you have set %1pere to be the date associated with the value 1 + !i + !window. Since !i runs from 1 to !length-!window+1-!step, the final run of the iteration loop, will be:
Since !length is the size of the workfile, you've just set %!pere to be the date associated with the first value outside of the workfile. That won't work.
2. You don't need the square brackets:
Code: Select all
smpl {%1pers} {%1pere}
Code: Select all
%1pere = date associated with 1+!length-!window+1-!step + !window = 1+!length
2. You don't need the square brackets:
Code: Select all
EQ1.FIT WIN8F WINSE WINVAR
Re: n step rolling forecast using garch
Well I have tried to produce 1 step ahead rolling forecast with the garch using as guide the code posted by eviews esther on may 25, 2011 where 4 period ahead forecast was generated for rolling regression. This is what was done to generate the 4 period ahead forecast.
' 4-period-ahead forecast
%4pers = @otod(@dtoo(%start)+!i+!window-1) 'start point
%4pere = @otod(@dtoo(%start)+!i+!window+2) 'end point: %4pere - %4pers +1 = 4
if {%end} < {%4pere} then 'check whether the forecast end point is greater than the workfile end point
return
endif
So i tried to adjust it to generate 1 period ahead forecast but dont know if its correct.
I am confused about one thing. With the eq1.fit function, am I forecasting the error or the variance??
Thanks
' 4-period-ahead forecast
%4pers = @otod(@dtoo(%start)+!i+!window-1) 'start point
%4pere = @otod(@dtoo(%start)+!i+!window+2) 'end point: %4pere - %4pers +1 = 4
if {%end} < {%4pere} then 'check whether the forecast end point is greater than the workfile end point
return
endif
So i tried to adjust it to generate 1 period ahead forecast but dont know if its correct.
I am confused about one thing. With the eq1.fit function, am I forecasting the error or the variance??
Thanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: n step rolling forecast using garch
The fit function, as it states in the documentation, lets you forecast the mean equation's dependent variable, the standard error of that variable, and the GARCH conditional variance.
Re: n step rolling forecast using garch
Ok thanks
Think I will have to work out the n-step ahead forecast and try to understand better how to generate it.
Thanks for your help
Think I will have to work out the n-step ahead forecast and try to understand better how to generate it.
Thanks for your help
Re: n step rolling forecast using garch
hi
I have tried a new code for the 1 step ahead garch (1,1) forecast but it is giving me the following error
error in sample: attempt to set sample outside of workfile range
Structure/Resize (from Workfile/Proc menu) can expand the workfile range in 'SMPL 12 12+3046-1
I know its got to do with the sample estimation but I cant see what's wrong. Could someone please look into the matter? i am attaching the program as well as the workfile.
Thanks
I have tried a new code for the 1 step ahead garch (1,1) forecast but it is giving me the following error
error in sample: attempt to set sample outside of workfile range
Structure/Resize (from Workfile/Proc menu) can expand the workfile range in 'SMPL 12 12+3046-1
I know its got to do with the sample estimation but I cant see what's wrong. Could someone please look into the matter? i am attaching the program as well as the workfile.
Thanks
- Attachments
-
- forecast.prg
- (448 Bytes) Downloaded 755 times
-
- usd-nov11.wf1
- (738.45 KiB) Downloaded 473 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: n step rolling forecast using garch
I just ran that program on the workfile, and it didn't error.
Re: n step rolling forecast using garch
Oh did u run it on eviews6?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 2 guests
