Hello everybody,
I am finishing my thesis on volatility prediction and I would like to compare 1-step-ahead
forecasts of various models. I tried to use the following code
open D:\Thesis\VECM\all_data.gdt
smpl full
scalar DataLen = $nobs
scalar WindowLen = 400
scalar FirstObs = 1
scalar LastObs = WindowLen
matrix Forecasts = zeros( DataLen, 1)
matrix StdErrors = zeros( DataLen, 1)
matrix FCDest = zeros(DataLen, 1 )
matrix ErrDest = zeros(DataLen, 1 )
scalar FDestVal= 0
scalar EddDestVal= 0
loop ForecastPeriod = LastObs + 1..DataLen - 1
smpl FirstObs LastObs
ols allRR allRR(-1) allRR(-2) allRR(-3) --robust --quiet
fcast FDestVal
FCDest[$ForecastPeriod,1] = FDestVal
FirstObs = FirstObs + 1;
LastObs = LastObs + 1;
endloop
but when trying to save FDestVal after fcasting I receive an error message. I previously
tried to write
fcast FCDest[$ForecastPeriod,1]
but that didnt work either. Even though it must be really simple, Im kindof lost, so I
will appreciate any hint.
Best regards,
Daniel