rolling window help
Posted: Tue Apr 21, 2009 12:41 pm
greetings everyone!
i am trying to do a rolling window static forecast out of a simple ECM model but i cannot manage to obtain the complete forecast: that is when i look in the forecast output (wtifore) i only get the results for the last iteration of the loop. here's the code
scalar obs=5490
scalar window= 500
for !i = window to obs-window
smpl !i-window+1 !i
equation prova_ecm
prova_ecm.ls d(wti) c d(wti_f3) u(-1)
smpl !i+1 !i+window
prova_ecm.fit wtifore
next
smpl @all
i know i should create something to contain the forecasted values after each iteration to avoid overwriting them, but i just can't figure out how. can anyone help me?
tx in advance [edit: i'll attach also the wf]
i am trying to do a rolling window static forecast out of a simple ECM model but i cannot manage to obtain the complete forecast: that is when i look in the forecast output (wtifore) i only get the results for the last iteration of the loop. here's the code
scalar obs=5490
scalar window= 500
for !i = window to obs-window
smpl !i-window+1 !i
equation prova_ecm
prova_ecm.ls d(wti) c d(wti_f3) u(-1)
smpl !i+1 !i+window
prova_ecm.fit wtifore
next
smpl @all
i know i should create something to contain the forecasted values after each iteration to avoid overwriting them, but i just can't figure out how. can anyone help me?
tx in advance [edit: i'll attach also the wf]