nonparametric VAR-GARCH-M codes

Discussions of ARCH, GARCH, and related models
vcerqueira
Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

nonparametric VAR-GARCH-M codes

Unread post by vcerqueira »

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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: nonparametric VAR-GARCH-M codes

Unread post by TomDoan »

Did you have a specific model in mind?
vcerqueira
Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

Re: nonparametric VAR-GARCH-M codes

Unread post by vcerqueira »

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

Code: Select all

all 133
open data dados(ipa2).xls
data(format=xls,org=columns) / juros cambio

compute n=2
compute gstart=4,gend=133
*
dec series[vect] yv
dec frml[vect] residv
dec 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 = rr
gset uu * gend = rr
set u(1) = 0.0
set 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 vbs
frml 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 vbb
compute 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

Thank for your attention.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: nonparametric VAR-GARCH-M codes

Unread post by TomDoan »

What is it that's supposed to be semi or non-parametric?
vcerqueira
Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

Re: nonparametric VAR-GARCH-M codes

Unread post by vcerqueira »

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.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: nonparametric VAR-GARCH-M codes

Unread post by TomDoan »

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.
vcerqueira
Posts: 6
Joined: Tue Sep 27, 2011 1:11 pm

Re: nonparametric VAR-GARCH-M codes

Unread post by vcerqueira »

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

Unread post by vcerqueira »

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

Unread post by vcerqueira »

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

http://qed.econ.queensu.ca/paper/maheu.pdf
Post Reply