N-Step ahead Out-of-Sample-Forecasts

For questions regarding programming in the EViews programming language.

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

chrisw
Posts: 3
Joined: Fri Oct 31, 2008 7:41 am

N-Step ahead Out-of-Sample-Forecasts

Postby chrisw » Wed Nov 12, 2008 2:16 pm

Good evening everybody,

I have got a problem regarding n-step ahead out-of-sample-forecasting. I would like to perform a (static) n-step ahead forecast without including actuals. Hence, the n-th step value should be derived by using the previously (n-1) forecasted values (no actual values) and so forth. Then, I would like to continue with another n-step ahead forecast after re-estimating the model and including one more observation.

How can I implement this in eViews5 and eViews6?

Thanks everybody in advance!

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

Re: N-Step ahead Out-of-Sample-Forecasts

Postby EViews Gareth » Wed Nov 12, 2008 2:55 pm

Isn't what you are describing just a dynamic forecast?
Follow us on Twitter @IHSEViews

chrisw
Posts: 3
Joined: Fri Oct 31, 2008 7:41 am

Re: N-Step ahead Out-of-Sample-Forecasts

Postby chrisw » Thu Nov 13, 2008 3:32 am

Possibly it is.

But how can I perform a dynamic forecast without using state space equations (since I am not familiar with it)? If I apply the forecast command there is no option to chose a value for n. Hence, I just perform a one-step ahead forecast before including the next observation, reestimating the model and calculating the next one-step ahead forecast.

But for my application it is crucial to calculate a n-step forecast before reestimating the model.

Thanks for your help and patience!

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: N-Step ahead Out-of-Sample-Forecasts

Postby startz » Thu Nov 13, 2008 5:34 am

chrisw wrote:Possibly it is.

But how can I perform a dynamic forecast without using state space equations (since I am not familiar with it)? If I apply the forecast command there is no option to chose a value for n. Hence, I just perform a one-step ahead forecast before including the next observation, reestimating the model and calculating the next one-step ahead forecast.

But for my application it is crucial to calculate a n-step forecast before reestimating the model.

Thanks for your help and patience!


The forecast command lets you specify a SMPL for the period to be forecast. Perhaps that will help.

chrisw
Posts: 3
Joined: Fri Oct 31, 2008 7:41 am

Re: N-Step ahead Out-of-Sample-Forecasts

Postby chrisw » Thu Nov 13, 2008 6:25 am

Thanks a lot for this advice! Actually, I could solve the problem by iteratively adjusting the forecast sample period.

kanonathena
Posts: 14
Joined: Thu Jul 15, 2010 2:24 am

Re: N-Step ahead Out-of-Sample-Forecasts

Postby kanonathena » Sun Aug 01, 2010 8:24 am

startz wrote:
chrisw wrote:Possibly it is.

But how can I perform a dynamic forecast without using state space equations (since I am not familiar with it)? If I apply the forecast command there is no option to chose a value for n. Hence, I just perform a one-step ahead forecast before including the next observation, reestimating the model and calculating the next one-step ahead forecast.

But for my application it is crucial to calculate a n-step forecast before reestimating the model.

Thanks for your help and patience!


The forecast command lets you specify a SMPL for the period to be forecast. Perhaps that will help.


What is SMPL? I can't find such an option in forecast window.

I exactly the same problem as chrisw. I want to forecast inflation 8 quarters head using lags of forcasted inflation and actual value of other regressors (that is assuming you do not know future inflation but have perfect foresight of other regressors), adding one observation at a time.

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: N-Step ahead Out-of-Sample-Forecasts

Postby startz » Sun Aug 01, 2010 8:33 am

If you'r using an equation object, look at the field in the lower left of the Forecast window labelled "Forecast sample."

kanonathena
Posts: 14
Joined: Thu Jul 15, 2010 2:24 am

Re: N-Step ahead Out-of-Sample-Forecasts

Postby kanonathena » Sun Aug 01, 2010 9:07 am

Thanks for the quick reply. I see what you mean. What should I do if I want the estimation sample to end at the 4th quarter of each year, so it is not adding one observation at a time but four(quarters)? And also my forecast horizon is 8 quarters head, how do I specify n-step ahead forecast without having to manually adjusting the sample every time?

pablotillan
Posts: 6
Joined: Mon May 20, 2013 1:01 pm

Re: N-Step ahead Out-of-Sample-Forecasts

Postby pablotillan » Sun Dec 18, 2016 4:53 am

I have the same question, I need to perfrom a 2,4 and 8 step ahead forecast from a VAR,AR and Random Walk models. I am using inflation, interest rate and unemployment data. The VAR has been performed with 9 lags. Can someone help me in do the forecast?
thanks!

KrilleJ
Posts: 40
Joined: Fri Feb 20, 2015 6:15 am

Re: N-Step ahead Out-of-Sample-Forecasts

Postby KrilleJ » Mon Dec 19, 2016 5:42 am

The RW forecast is simply the last value in the estimation sample.

For the equation object and the VAR object you can set the sample for which you want to do the forecast and then use the forecast command.

For example, with a VAR object (with series x and y and two lags) called var01 you can do

Code: Select all

smpl 1990Q1 2013Q4
var var01.ls 1 2 x y
smpl 2014Q1 2015Q4
var01.forecast(f=na) f


This will produce dynamic forecasts for the two series.

A corresponding methodology goes for the equation object.

If you want to do several forecasts, you can loop over the sample periods.

/Krille


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 45 guests