Sorry, my fault, thanks for
responding. I am adding my data to the email. I have 5-minute
realised variance data for FTSE.
Basically, I am trying to do
rolling windows forecasting using the HAR-RV model (in time
series). I will have the initial sample; observation 24-336
(I labelled observation date as numbers). Observations between
337-437 will be the out-of-sample. First, I want to estimate
HAR model with 24-336 obs. and then forecast one-step-ahead
forecast [337]. Next, estimate HAR with 25-337 obs. and then
forecast [338]. Estimate with 26-338 and then forecast [339]
...
I am not sure I am doing
right with my codes and in my case rolling windows forecasting
is; one-step-ahead forecasted values are generated by each
sliding different HAR model (i.e. 24-336, 25-337, 26-338 ...).
I am doing that with HAR-RV model and later on, I will add to
the model as an exogenous variable –VIX, EPU, Industrial
production etc.– and compare forecasting performance.
OK, for convenience let me paste your code from the attached
mycode.inp here again:
<hansl>
set verbose off
loop i=1..100 -q
smpl 23+i 335+i
ols RV5_FTSE const RV5_FTSE(-1) HARWEEK HARMONTH
fcast 336+i 336+i 1 forecasted --recursive
endloop
</hansl>
Basically I'd say this looks fine. However, two or three
comments:
1) At first glance it appears that HARWEEK and HARMONTH are
contemporaneous variables. If that's true, it's not a real
forecasting equation. But perhaps in the background those
variables actually refer to the past.
2) The '--recursive' option is redundant here, since you're only
specifying a single obs to be forecast -- apart from the fact that
you don't want a recursively estimated model (where the starting
obs of the estimation window is fixed).