Thanks you a lot, however I'm still a little bit confused about hfc
equation.
The equation of hfc for GARCH model:
# forecast the variance
hfc = a0 + a1 * e(-1)^2 + b1 * hfc(-1)
I have got from Allin Cottrell's script from this link:
http://lists.wfu.edu/pipermail/gretl-users/2011-January/005772.html.
Moreover, I found some papers in which is it stated that for volatility
forecasting we should just keep constant parameters from our in-sample
period and add one observation to both e and h.
So, what do you suggest in GJR case, should I forecast out-of-sample
volatility using GIG equation:
h_t = omega + alpha (|e_{t-1}| - gamma e_{t-1})^2 + beta h_{t-1}
or rather the same as you suggested for GARCH model, that is:
hfc : a0 + (a1 + b1) * hfc(-1)
And btw, if I'd like to use alternative parametrization in GJR, can I just
change parameters in the coefficient matrix and forecast with that
parameters? I mean, is the volatility from model the same, no matter which
parametrization we use or not?
2012/11/9 Riccardo (Jack) Lucchetti <r.lucchetti(a)univpm.it>
On Fri, 9 Nov 2012, Marta Szymańska wrote:
Hello,
>
> 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.
>
This should be intended as a reply to Tomasz too.
Here's a variation on your script that should work as intended:
<hansl>
include gig.gfn
open djclose.gdt
RETURN = ldiff(djclose)
model = gig_setup(RETURN,1,const)
gig_set_dist(&model, 2)
gig_estimate(&model)
series e = model["uhat"]
series hfc = model["h"]
matrix coef = model["coeff"]
a0 = coef[2]
a1 = coef[3]
# coef[4] is reserved for the asymmetry coefficient
b1 = coef[5]
# forecast the variance
dataset addobs 50
setobs 5 1980/01/02
series hfc = ok(hfc) ? hfc : a0 + (a1 + b1) * hfc(-1)
smpl 1989/09/1 ;
print hfc --byobs
gnuplot hfc time --time-series --with-lines --output=display
smpl full
</hansl>
A few comments:
* we use djclose in this example so everyone has it.
* gig is an addon, so its "products" are not accessible through "$"
variables. Instead, it uses bundles, so you may fetch them by ordinary
bundle syntax; see the User's Guide and the gig documentation
* when forecasting the variance, you don't want to use the square of the
expectation of e as a predictor of e squared (Jensen's lemma): what you
need is a predictor of e^2. If you use the expectation as your predictor,
that's precisely what h is. As a consequence, in the simple case of the
garch(1,1) model with normal errors, you just forecast h by its past values
(for more complicated models, it's not so easy).
------------------------------**--------------------
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/**servizi/hpp/lucchetti<http://www2.econ.un...
------------------------------**--------------------
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users