I'm writing a master thesis about volatility forecasting using GARCH and GJR models (with Normal, stud-t and GED distributions). I need to prepare out-of-sample forecasting for that models. Thus, I've tried to prepare scripts using gig package.

I've got the following script for GARCH (1,1) with GED distribution:

include gig.gfn

open file.gdt

model = gig_setup(RETURN,1,const)

gig_set_dist(&model, 2)

gig_estimate(&model)

#gig_plot(&emodel)

#gig_dplot(&emodel)

series e = $uhat

series h = $h

dataset addobs 1

a0 = $coeff[2]

a1 = $coeff[3]

b1 = $coeff[4]

series hfc = h

# set future errors to their expectation

e = misszero(e)

# forecast the variance

hfc = a0 + a1 * e(-1)^2 + b1 * hfc(-1)

smpl 165 ;

print e h hfc --byobs

However, the commands series e = $uhat and series h = $h don't work. The information is that: "The statistic you requested is not available"

I'll be really grateful if you can write me how to get 'uhat' and 'h' series in that case. Or maybe it is some another way for preparing out-of-sample forecasting for GARCH and GJR models.

Best regards,

Marta