Recursive forecasting
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Posts: 6
- Joined: Tue May 24, 2011 2:32 am
Recursive forecasting
d
Last edited by noobie_simon on Wed Sep 28, 2011 2:30 pm, edited 1 time in total.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive forecasting
I'm not sure I follow.
If you have a given equation of Y C X(-1), then you're saying that Y depends on a constant and a single one-period lagged value of X. I don't see where the recursion comes in. A forecast of Y for 1970M02 will depend on (the exogenous) value of X in 1970M01. Nothing else.
If you have a given equation of Y C X(-1), then you're saying that Y depends on a constant and a single one-period lagged value of X. I don't see where the recursion comes in. A forecast of Y for 1970M02 will depend on (the exogenous) value of X in 1970M01. Nothing else.
Follow us on Twitter @IHSEViews
-
- EViews Developer
- Posts: 2672
- Joined: Wed Oct 15, 2008 9:17 am
Re: Recursive forecasting
I think they want the recursive least squares solutions (one-step ahead forecasts using the recursive coefficients estimated using data up-to the forecast period).
You can do this in two ways. First, you can build a state-space model with recursive coefficients to give you all of the one-step ahead forecasts. Alternately, you can estimate your OLS model using least squares (being careful to make certain that only lagged values are on the RHS), then use the recursive residuals view to give you the residuals which you can then use to obtain the forecasts.
You can do this in two ways. First, you can build a state-space model with recursive coefficients to give you all of the one-step ahead forecasts. Alternately, you can estimate your OLS model using least squares (being careful to make certain that only lagged values are on the RHS), then use the recursive residuals view to give you the residuals which you can then use to obtain the forecasts.
-
- Posts: 6
- Joined: Tue May 24, 2011 2:32 am
Re: Recursive forecasting
k
Last edited by noobie_simon on Wed Sep 28, 2011 2:31 pm, edited 1 time in total.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive forecasting
You might find Esther's program here:
viewtopic.php?f=15&t=878
useful. It performs rolling forecasts, which is, I think, what you're describing.
viewtopic.php?f=15&t=878
useful. It performs rolling forecasts, which is, I think, what you're describing.
Follow us on Twitter @IHSEViews
-
- Posts: 6
- Joined: Tue May 24, 2011 2:32 am
Re: Recursive forecasting
k
Last edited by noobie_simon on Wed Sep 28, 2011 2:32 pm, edited 4 times in total.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive forecasting
Yep, that's exactly what Esther's rolling forecast program does.
Follow us on Twitter @IHSEViews
Re: Recursive forecasting
A rolling forecast is similar to a recursive forecast but different in that the recursive forecast uses an expanding window instead of a rolling window. However, if someone has written a program that does rolling forecasts it should be very easy to change it a bit to do recursive forecasts instead.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive forecasting
True, and yes it is simple - you just anchor the start date, rather than letting it role.
Follow us on Twitter @IHSEViews
-
- Posts: 6
- Joined: Tue May 24, 2011 2:32 am
Re: Recursive forecasting
k
Last edited by noobie_simon on Wed Sep 28, 2011 2:32 pm, edited 1 time in total.
Re: Recursive forecasting
noobie_simon wrote:miksterz1 wrote:A rolling forecast is similar to a recursive forecast but different in that the recursive forecast uses an expanding window instead of a rolling window. However, if someone has written a program that does rolling forecasts it should be very easy to change it a bit to do recursive forecasts instead.
Yes, the difference between a rolling forecast and a recursive forecast is clear for me (although I didn't manage to express myself very well ). And the link Gareth provided will surely be of great help:)
But do you know if the method described above (just collecting the recursive coefficients provided by an in-sample regression) will provide the correct forecasts?
Again, thank you for all the help
In theory, I don't see why that wouldn't work. However, I would imagine it both more tedious and error-prone to writing a program that computes the forecast series for you.
Re: Recursive forecasting
noobie_simon wrote:EViews Gareth wrote:You might find Esther's program here:
viewtopic.php?f=15&t=878
useful. It performs rolling forecasts, which is, I think, what you're describing.
Thank you for the answer, I will definetely spend some time trying to implement that basic rolling regression program. I'm sorry that the explanation of recursive forecasting is not the most precise, so I refer to the explanation in Brooks' book "Introductory Econometrics for Finance"
… a useful way around this problem is to use a recursive or rolling window, which generates a series of forecasts for a given number of steps ahead. A recursive forecasting model would be one where the initial estimation date is fixed, but additional observations are added one at a time to the estimation period. A rolling window, on the other hand, is one where the length of the in-sample period used to estimate the model is fixed, so that the start date and end date successively increase by one observation. Suppose now that only one-step-ahead forecasts are of interest. They could be produced using the following recursive and rolling window approaches:
Objective: to produce.....................................Data used to estimate model parameters
1-step-ahead forecasts for:......................Rolling window.................Recursive window
1999M1............................................1990M1--1998M12 ...............1990M1--1998M12
1999M2............................................1990M2--1999M1.................1990M1--1999M1
1999M3............................................1990M3--1999M2.................1990M1--1999M2
1999M4............................................1990M4--1999M3.................1990M1--1999M3
1999M5............................................1990M5--1999M4.................1990M1--1999M4
1999M6............................................1990M6--1999M5.................1990M1--1999M5
1999M7............................................1990M7--1999M6.................1990M1--1999M6
1999M8............................................1990M8--1999M7.................1990M1--1999M7
1999M9............................................1990M9--1999M8.................1990M1--1999M8
I hope this illustration makes my previos posts a little clearer.
Hi,
I would like to ask what is real difference between the recursive window forecasting and rolling window forecasting. which situation shall I use the recursive and which situation shall I use the rolling window forecasting?
Many Thanks
Re: Recursive forecasting
Hi,
May I ask how you anchor the start date.
Best
May I ask how you anchor the start date.
Best
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive forecasting
Somewhere inside the rolling loop there will be a smpl statement that changes the sample. For a rolling window it will change the start point and the end point of the sample. If you want to anchor the start date, simply change that line so that the start date doesn't change.
Follow us on Twitter @IHSEViews
Re: Recursive forecasting
Thank you so much for your reply.
I changed this this:
To this:
I think it should do recursively, because now the start date does not roll and is fixed. Am I right?
Best
I changed this this:
Code: Select all
' set sample for estimation period
%first = @otod(@dtoo(%start)+!i-1)
%last = @otod(@dtoo(%start)+!i+!window-2)
smpl {%first} {%last}
To this:
Code: Select all
' set sample for estimation period
%first = @otod(@dtoo(%start))
%last = @otod(@dtoo(%start)+!i+!window-2)
smpl {%first} {%last}
I think it should do recursively, because now the start date does not roll and is fixed. Am I right?
Best
Who is online
Users browsing this forum: No registered users and 31 guests