I need to write a rolling regression and forecast for a series including data of 204 months
The idea is that I divide the whole sample into 2 halves (102 months for each half). I make regression for the first half and use that estimator to forecast the first value of the second half. Then, I update the model every month with the value of previous month.
My programming code is as follows:
================
for !i =102 to 203
smpl 1 !i
equation eq1_!i.ls return_1 c aluminum(-1)
eq1_!i.forecast returnf_1(!i+1)
next
================
I don't know why the result does not match with logics.
Can you please help me!
rolling regression and forecast
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: rolling regression and forecast
You need to change the sample before forecasting.
You should read through this:
viewtopic.php?f=15&t=878
You should read through this:
viewtopic.php?f=15&t=878
Follow us on Twitter @IHSEViews
Re: rolling regression and forecast
My result shows that the forecasted value is the fitted value estimated for the entire sample.
But the forecasted value at a point of time should be based on the estimators of the regression at that roll.
But the forecasted value at a point of time should be based on the estimators of the regression at that roll.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 28 guests