Page 1 of 1

Kalman GARCH

Posted: Tue Nov 27, 2012 10:21 am
by Macbeth
Hello,

I saw various subject on the forum dealing with how to include garch effect into the state space object. As it require to use a modified kalman filter to deal with the non-linearity, there is no solution directly in Eviews.

My objective is to estimate a CAPM and to get thanks to the kalman filter time varying coefficient. I would like to put a garch(1,1) effect on the error of my CAPM (like in GROUT and ZALEWSKA). To deal with this problem i have proceed recursively :
:arrow: Estimate time varying beta
:arrow: Estimate garch volatility using the previously estimated beta
:arrow: Estimating again time varying beta but with the exogenous volatility previously estimated
:arrow: Estimating again the volatility with new beta
:arrow: doing the procedure again and again until convergence of parameters

For me this procedure work fine, and beginning with the kalman filter or the garch don't seem to change nothing. However, I would like to know if this methods is not misleading. For me it's better than estimating the CAPM without garch effect, but i would like to have your advice.

I hope i've made myself clear (sorry for my english), here i put my eviews code, thank you very much for your help :

smpl @all

'Initial values estimation
smpl @first @first+91
equation eq_ftel_ini.ls rfc_ftel rfc_sbf c
sym(2) svar2=eq_ftel_ini.@coefcov
vector svec2=eq_ftel_ini.@coef

smpl @all

'Time varying beta estimation with constant volatility
sspace ftel_ss
ftel_ss.append @signal rfc_ftel = sv2 + sv1*rfc_sbf + [var = exp(c(1))]
ftel_ss.append @state sv1 = sv1(-1) + [var = exp(c(2))]
ftel_ss.append @state sv2 = sv2(-1) + [var = exp(c(3))]
ftel_ss.append @mprior svec2
ftel_ss.append @vprior svar2
ftel_ss.ml
ftel_ss.makestates(filt) ftel_beta ftel_alpha

'Volatility estimation with GARCH(1,1)
equation eq_garch1.arch rfc_ftel-ftel_beta*rfc_sbf-ftel_alpha
eq_garch1.makegarch ftel_garch1

'Beta estimation with previously estimated volatility
sspace ftel_ss1
ftel_ss1.append @signal rfc_ftel = sv2 + sv1*rfc_sbf + [var = ftel_garch1]
ftel_ss1.append @state sv1 = sv1(-1) + [var = exp(c(1))]
ftel_ss1.append @state sv2 = sv2(-1) + [var = exp(c(2))]
ftel_ss1.append @mprior svec2
ftel_ss1.append @vprior svar2
ftel_ss1.ml
ftel_ss1.makestates(filt) ftel_beta_1 ftel_alpha_1

'Iterative estimation between kalman and garch
for %num %pnum 2 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14

equation eq_garch{%num}.arch rfc_ftel-ftel_beta_{%pnum}*rfc_sbf-ftel_alpha_{%pnum}
eq_garch{%num}.makegarch ftel_garch{%num}

sspace ftel_ss{%num}
ftel_ss{%num}.append @signal rfc_ftel = sv2 + sv1*rfc_sbf + [var =ftel_garch{%num}]
ftel_ss{%num}.append @state sv1 = sv1(-1) + [var = exp(c(1))]
ftel_ss{%num}.append @state sv2 = sv2(-1) + [var = exp(c(2)) ]
ftel_ss{%num}.append @mprior svec2
ftel_ss{%num}.append @vprior svar2
ftel_ss{%num}.ml
ftel_ss{%num}.makestates(filt) ftel_beta_{%num} ftel_alpha_{%num}

next

Re: Kalman GARCH

Posted: Wed Nov 28, 2012 6:41 am
by trubador
The problem with recursive or multi step estimation is known as "generated regressor bias", which leads to inconsistent estimates of parameters. The proper approach would be to build a simultaneous framework and estimate the parameters jointly. There is of course a significant trade-off in doing so, since you'll loose more degrees-of-freedom and may experience severe convergence problems.

I usually use this multi step framework to obtain good starting points for the simultaneous estimation. However, it is not always possible to build a formal model, as in your case. Just make sure that usual diagnostics are fine and that your model indeed provides a statistically significant improvement over the constant variance specification.

Re: Kalman GARCH

Posted: Mon Dec 03, 2012 6:46 am
by Macbeth
Thank you very much for your quick answer ! By usual diagnostic you think of standard coefficient significativity, Akaike info criterion and Schwarz criterion ? Am I omitting important check ?

Thank you again

Re: Kalman GARCH

Posted: Tue Dec 04, 2012 2:10 am
by trubador
Yes, and also Correlogram, Histogram, CUSUM, etc.