[Gretl-users] forecasting dow jones with garch

Allin Cottrell cottrell at wfu.edu
Thu Jun 18 16:20:46 EDT 2009


On Wed, 17 Jun 2009, alisson rocha wrote:

> i`ve been trying to make forecast with a garch model.
> For example, using the data djclose, i wrote the code below:
> ########################################################
> open djclose # open data
> genr return=ldiff(djclose) # generate returns
> garch 1 1; return # garch(1,1)
> ########################################################
>
> Question: From here, what gretl code i can use to make a 'out of
> sample' forecast to the dow jones return serie(return) - for
> example, for the days 1/2/1990,1/3/1990,1/4/1990 - with a 95%
> confidence interval?

Here's script which will do what you want:

open djclose.gdt
genr y = ldiff(djclose)
scalar n = $nobs
# add three extra observations
addobs 3
# restrict sample to real data
smpl ; -3
garch 1 1 ; y
# set out-of-sample range
smpl +n +3
# and ask for a forecast
fcast

Allin Cottrell


More information about the Gretl-users mailing list