forecasting specific code query

For questions regarding programming in the EViews programming language.

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

justin_m
Posts: 13
Joined: Sun Feb 01, 2015 8:37 pm

forecasting specific code query

Postby justin_m » Sun Jun 26, 2016 11:23 am

Dear all

Could you please let me know whether I am doing this right please? I am basically trying to do one-period ahead forecasts with a rolling window that must be stored in the series t_forecast_ar. The estimation window is the first 456 periods, in a total of 600 periods.

My question is whether this code is actually accomplishing this task or whether it is doing something else.

equation eq1

series y_temp_forecast_ar
series y_forecast_ar

for !i = 0 to 143
smpl @first+!i @first+455+!i ' @first is first observation (here 1)
eq1.ls _2_year_bond_excess_retu c ar(1) ar(2)
smpl @first+456+!i @first+456+!i

forecast(f=NA) y_temp_forecast_ar

' y forecast will contain all forecasts:
y_forecast_ar(457+!i) = y_temp_forecast_ar(457+!i)

next

Thanks

Justin

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: forecasting specific code query

Postby dakila » Mon Jul 11, 2016 5:27 am

Hi Justin

I think your code is correct.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 42 guests