Multi-step ahead forecast

For questions regarding programming in the EViews programming language.

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

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Thu Jul 31, 2014 11:26 am

ah yes, there is a next statement at the bottom of my program, like this:

'calculate RMSE
scalar rmse=@rmse(returns, fcast)

'calculate MAE
Scalar mae=@mae(returns, fcast)

next

However, the results are still not consistent. Am I missing next statements in other places?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Multi-step ahead forecast

Postby EViews Gareth » Thu Jul 31, 2014 11:28 am

What is the build date of your copy of EViews (Help->About EViews)?
Follow us on Twitter @IHSEViews

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Thu Jul 31, 2014 11:30 am

standard edition - Jun 19 2013 build

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Multi-step ahead forecast

Postby EViews Gareth » Thu Jul 31, 2014 11:58 am

Update to the latest version.
Follow us on Twitter @IHSEViews

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Mon Aug 04, 2014 10:39 am

Hi,

I have now been able to get the same forecast results by trying the two different methods (commands and dropdown menu), which I am really happy about! :)
However I still get incorrect answers for RMSE and MAE. I have not been able to update eviews yet, as I am not allowed to do it myself as only admins are entitled to do it at the university.
Do you think m problems are caused by not having the latest update, or am I doing something else incorrectly?

Nicole
Attachments
Screenshot (93).png
Screenshot (93).png (222.52 KiB) Viewed 8791 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Multi-step ahead forecast

Postby EViews Gareth » Mon Aug 04, 2014 12:01 pm

Your sample is set to a single observation. RMSE and MAE will give identical results for a single observation.
Follow us on Twitter @IHSEViews

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Tue Aug 05, 2014 3:00 am

What do you mean? When doing it from the drop down menu I do get two different values. Am I not doing the same thing with the program?
Also, when changing my sample to 21 when I am using the programme, my forecasted values come out exactly the same as when I set the sample to 1 day.
Obviously I must be doing something wrong.. :?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Multi-step ahead forecast

Postby EViews Gareth » Tue Aug 05, 2014 6:18 am

You need to forecast one value at a time. I presume you don't want to calculate RMSE one value at a time.
Follow us on Twitter @IHSEViews

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Tue Aug 05, 2014 6:45 am

That is correct. So how do I do that? Which part of my program is incorrect?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Multi-step ahead forecast

Postby EViews Gareth » Tue Aug 05, 2014 7:07 am

The part where you calculate RMSE and MAE with the sample set to be only one observation.
Follow us on Twitter @IHSEViews

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Wed Aug 06, 2014 2:24 am

Oh.. So how do I change it to include all the observations?

Furthermore, when I change my program from 1 day to 21 days:

'1-period-ahead forecast
%1pers=@otod(@dtoo(%start)+!i+!window-1)
%1pere=@otod(@dtoo(%start)+!i+!window+0)
'set smpl for forecasting period
smpl {%1pers} {%1pere}

'21-period-ahead forecast
%21pers=@otod(@dtoo(%start)+!i+!window-1)
%21pere=@otod(@dtoo(%start)+!i+!window+20)

'set smpl for forecasting period
smpl {%21pers} {%21pere}

The forcasted values remain the same.. Why? :?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Multi-step ahead forecast

Postby EViews Gareth » Wed Aug 06, 2014 3:20 am

smpl @all
Follow us on Twitter @IHSEViews

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Wed Aug 06, 2014 3:53 am

aah thanks, that helped! :D

However I have run into another problem. When changing my step-ahead forecast from 1 day to 21 days as shown above, I get the same forecast values. Do I need to change anything else than "period-ahead" and "sample for forecasting period" in my program in order to change the horizon?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: Multi-step ahead forecast

Postby EViews Gareth » Wed Aug 06, 2014 4:46 am

Use .forecast rather than .fit
Follow us on Twitter @IHSEViews

Nicole
Posts: 22
Joined: Thu Jul 17, 2014 12:34 pm

Re: Multi-step ahead forecast

Postby Nicole » Wed Aug 06, 2014 5:23 am

I have changed it but still get the same forecast values as I do when I forecast for 1 step ahead.
I really do not see what I am doing wrong, to me my program looks correct... :shock:
Attachments
Screenshot (95).png
Screenshot (95).png (160 KiB) Viewed 8757 times


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 16 guests