Deperately seeking rolling forecast help

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: Deperately seeking rolling forecast help

Postby EViews Esther » Tue Aug 07, 2012 8:49 am

Please upload the program with your adjustment.

Mo'
Posts: 8
Joined: Wed Aug 01, 2012 5:05 am

Re: Deperately seeking rolling forecast help

Postby Mo' » Tue Aug 07, 2012 9:51 am

Thank you for the prompt response.

Attached is the program (supposedly) adjusted to carry out a 5-step ahead forecast also with the corresponding workfile.

Regards,
Attachments
program5.prg
The code
(1.64 KiB) Downloaded 482 times
series (5).wf1
The workfile
(21.78 KiB) Downloaded 470 times

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: Deperately seeking rolling forecast help

Postby EViews Esther » Tue Aug 07, 2012 9:57 am

Code: Select all

' 5-period-ahead forecast %5pers = @otod(@dtoo(%start)+!i+!window-1) 'start point %5pere = @otod(@dtoo(%start)+!i+!window+4) 'end point if {%end} < {%5pere} then 'check whether the forecast end point is greater than the workfile end point return endif
Please note that the string %pere should be renamed to be %5pere.

Mo'
Posts: 8
Joined: Wed Aug 01, 2012 5:05 am

Re: Deperately seeking rolling forecast help

Postby Mo' » Tue Aug 07, 2012 10:20 am

Thanks again.
I'd try it out as soon as I have access to Eviews7.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Deperately seeking rolling forecast help

Postby EViews Glenn » Tue Aug 07, 2012 10:58 am

As the error message suggests, the following code snippet isn't valid

Code: Select all

if {%end} < {%5pere} then 'check whether the forecast end point is greater than the workfile end point return endif
since the keywods "@FIRST" and "@LAST" are only recognized in commands to set samples. What you'll have to do is to set up your window loop so that it knows the number of times to be calculated rather than trying to test for a condition inside the loop. There are a number of workfile functions which will tell you how many observations in the workfile, etc. that should be enough for you to find the correct number. I think some of the rolling examples that we provide use tehse functions.

Mo'
Posts: 8
Joined: Wed Aug 01, 2012 5:05 am

Re: Deperately seeking rolling forecast help

Postby Mo' » Wed Aug 08, 2012 9:30 am

Eviews Glenn,

I am sorry to disturb but I am a bit confused by your suggestion. Please could you expansiate as I have made the corrections suggested by Eviews Esther but I still end up getting the same error.

Regards,

Mo'

wlai4
Posts: 4
Joined: Sat Sep 08, 2012 12:35 am

Re: Deperately seeking rolling forecast help

Postby wlai4 » Sat Sep 08, 2012 12:44 am

Hi all,

i am very new to eviews and i am trying to do a rolling window one step ahead forecast using a arma23 model and then a garch11 model.

in the LOOP program im not too sure how to specify these equations. i see in the discussion that the forecast can be done by simply opening the equation in eviews. So does that mean that the line of code below allows you to forecast whichever model you specify. Further to this im not sure i understand what you mean by opening the equation and running the program

[%cmnd = _this.@command 'EDIT: get the equation specification]

Sorry, i a real beginner with eviews so some of the terminology is to really new to me and im not too sure what it means and it would be tremendous help if someone could clarify this for me.

wlai4
Posts: 4
Joined: Sat Sep 08, 2012 12:35 am

Re: Deperately seeking rolling forecast help

Postby wlai4 » Sat Sep 08, 2012 1:44 am

Hi,

i have played around with the program lines but i dont think i am getting the correct results. I have attached a file of the program i used to run the one step ahead rolling window forecast with eq.01 been a ARMA23 model. Basically my in sample is 1388 observations from 1/05/2007 6/22/2012 and my out sample is 50 observations from 6/25/2012 ending on 8/31/2012. (total observations is 1438)

Please advise where i have gone wrong which im sure there will be a few as this is my first time programming in eviews.

your help will be much appreciated.

thank you
Attachments
aord_rolling forecast.prg
(1.34 KiB) Downloaded 597 times


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests