## nonparametric VAR-GARCH-M codes

Discussions of ARCH, GARCH, and related models

### nonparametric VAR-GARCH-M codes

Dear,

I need to estimate a VAR-GARCH-M (BEKK) using nonparametric or semiparametric methods. Where can I find RATS codes for it.

Vinícius dos Santos Cerqueira
vcerqueira

Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

### Re: nonparametric VAR-GARCH-M codes

Did you have a specific model in mind?
TomDoan

Posts: 2761
Joined: Wed Nov 01, 2006 5:36 pm

### Re: nonparametric VAR-GARCH-M codes

Yes I have. Here's the code that I'm working.

Code: Select all
`all 133open data dados(ipa2).xlsdata(format=xls,org=columns) / juros cambiocompute n=2compute gstart=4,gend=133*dec series[vect] yvdec frml[vect] residvdec vect[series] u(n)** The paths of the covariance matrices and uu' are saved in the* SERIES[SYMM] named H and UU. UX and HX are used for the current values* of the residual vector and H matrices*declare series[symm] h uu** ux is used when extracting a u vector*declare symm hx(n,n)declare vect ux(n)** These will be the parameters for the mean equations. These are adjusted to add* variance or covariance terms as needed.*dec vect b(n)dec rect ar(n,n) ars(n,n) gm(n,n)nonlin(parmset=meanparms)   ar ars gm** Mean model = VARMA(1,1) with sqrt(h) "M" term*frml residv = yv-ar*yv{1}-ars*yv{2}-gm*%sqrt(%xdiag(h))*gset yv = ||juros,cambio||** Run preliminary VAR(1) to get estimates of residuals*linreg juros / u(1)# constant cambio{1 to 2} juros{1 to 2}linreg cambio / u(2)# constant cambio{1 to 2} juros{1 to 2}vcv(matrix=rr,noprint)# u** These are used to initialize pre-sample variances.*gset h  * gend = rrgset uu * gend = rrset u(1) = 0.0set u(2) = 0.0*declare frml[symm] hf*frml logl = \$    hx    = hf(t) , \$    h(t)  = hx, \$    ux    = residv , \$    uu(t) = %outerxx(ux), \$    %pt(u,t,ux),\$    %logdensity(hx,ux)** This does a simple GARCH(1,1) model for the variance.*NLPAR(SUBITERS=10)dec symm vcs(n,n) vas(n,n) vbs(n,n)compute vcs=rr,vbs=%const(0.50),vas=%const(0.05)nonlin(parmset=garchparms) vcs vas vbsfrml hf = vcs+vbs.*h{1}+vas.*uu{1}maximize(trace,parmset=meanparms+garchparms,pmethod=simplex,piters=10,method=bfgs,iters=400) logl gstart gend** This does a BEKK model for the variance*dec rect vab(n,n) vbb(n,n)compute vab=.05*%identity(n),vbb=.50*%identity(n)nonlin(parmset=garchparms) vcs vab vbbcompute vcs=%decomp(rr)frml hf = vcs*tr(vcs)+vbb*h{1}*tr(vbb)+vab*uu{1}*tr(vab)maximize(trace,parmset=meanparms+garchparms,pmethod=simplex,piters=10,method=bfgs,robustererros,iters=400) logl gstart gend`

vcerqueira

Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

### Re: nonparametric VAR-GARCH-M codes

What is it that's supposed to be semi or non-parametric?
TomDoan

Posts: 2761
Joined: Wed Nov 01, 2006 5:36 pm

### Re: nonparametric VAR-GARCH-M codes

The component GARCH of the model. Apparently the standardized residuals are not Gaussian. In this context, semiparametric (nonparametric) estimators for variance can be more efficient than the quasi-maximum likelihood estimators. I intend to compare the results.
vcerqueira

Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

### Re: nonparametric VAR-GARCH-M codes

Do you have a reference on the use of semi-parametric estimators for multivariate GARCH models? We have our GARCHSEMIPARAM.RPF example which does univariate semi parametric estimation, but multivariate kernel estimates are much more difficult to work with.
TomDoan

Posts: 2761
Joined: Wed Nov 01, 2006 5:36 pm

### Re: nonparametric VAR-GARCH-M codes

Yes, I have two references, but none for a BEKK model.

1 Long, X.; Ullah (2005)
https://editorialexpress.com/cgi-bin/co ... per_id=127
2 Audrino, F.; Barone-Adesi, G. (2011)
http://doc.rero.ch/lm.php?url=1000,43,6 ... A_2006.pdf
vcerqueira

Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

### Re: nonparametric VAR-GARCH-M codes

Alternatively, codes for a Bayesian approach of the VARMA-GARCH-M could help me.

http://ideas.repec.org/a/kap/compec/v21 ... 65-85.html
vcerqueira

Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

### Re: nonparametric VAR-GARCH-M codes

Jansen and Mahel (2010) have a Bayesian nonparametric approach.

http://qed.econ.queensu.ca/paper/maheu.pdf
vcerqueira

Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm