I am currently working on programming a VAR one-step ahead forecast using a rolling window (static):
Code: Select all
for !i = 1 to @obsrange-!windowlength
'Set sample to estimation period (window)
smpl !i @first+!i+!window-2
for !p = 1 to !max_lag
var var_test{!p}.ls !p !p hours
'set sample to forecast period (one-step-ahead)
smpl !i+1 @first+!i+!window-1
var_test{!p}.fcast(s) _f _se
next
next
Where:
!windowlength: is the length of the moving window
hours: a group of the relevant series.
I have several issues:
1. Whenever specifying a static forecast, I received an error message saying 'Not enough observations'.
2. When I use a dynamic forecast, the program generates series _vh / _vl / _vm / _vs => What are these series? They are all simply NA.
3. When a dynamic forecast is used, after the first window the program pops an error message "Series X already exists" - Is there a way to extract these forecasts to an external series rather than the ones used in the Add In?
Thank you!
Oren