forecasting specific code query
Posted: 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
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