Dear Sir,
I am estimating a multivariate GARCH model, utilizing yr code from garchmvmax.rpf. I had earlier estimated a DLM model, whose residuals (vhat) are used i.e. hbv1 and hbv2. the lsigsqv is adopted directly from the covariance matrix in sv. i attempted to retreive the covariance from svhat but i thought it may be incorrect? i can't use the GARCH command cos my TVP-VAR models are not a normal VAR model as the isignificant variables are excluded (unless i can define my TVP-VAR model via a command:
dlm(model=?,mu=||0,break1+break2*bsbc{1}||,c=%eqnxvector(ceqn,t)~\%eqnxvector(ceqn1,t),sw=%diag(%exp(lsigsqw)),sv=%exp(lsigsqv),presample=ergodic,y=||hh,bsbc||,$
method=bfgs,iters=500,type=smooth,vhat=hbvhat,svhat=hbsvhat,yhat=hbyhat) 1997:11:28 2011:6:24 xstates vstates
*
my equations are:
linreg(define=ceqn,noprint) hh 1997:11:28 2011:6:24 a1
# trend1 HH{1 2 3} bsbc{2}
linreg(define=ceqn1,noprint) BSBC 1997:11:28 2011:6:24 a1
# hh{1 3}
i have setup the following and do not know how to incorporate the asymetry correctly as the FRML section showed that there is a need for adjacent command, which i have tried umpteen times to solve w/o avail. i also get confused whether the asym coefficient shd be symm or vector and whether they shd be * or .*? i would like to add in the arch and garch effects from other variables but can't find any examples to modify. For example, the conditional variance of HH = constant + arch of hh + garch of hh (+ asym*arch of hh + asym*arch of bsbc + arch of bsbc + garch of bsbc). The following formula do not include the bracketed. Also, how do i estimate the shape if i use logtdensity? Pls feel free to amend and add any missing parts. Would appreciate any help.
Regarding interpretation, if i want the arch+beta<1.0, does it means e.g. a(1,1)+a(2,1)+b(1,1)+b(2,1)+asym*a(1,1)+asym(2,1)<1.0? do i just insert: nonlin vas+vbs<1.0; vas>=0.; vbs>=0. Many thanks for your help ocne again.
GARCH model
============
compute n=2
dec vect[series] u(n)
set u(1) = hbv1
set u(2) = hbv2
compute rr=%exp(lsigsqv)
declare series[symm] h uu uuif
*
* ux is used when extracting a u vector
*
declare symm hx(n,n)
declare vect ux(n)
*
* These are used to initialize pre-sample variances.
*
gset h * 2011:6:24 = rr
gset uu * 2011:6:24 = rr
gset uuif * 2011:6:24 = rr
declare frml[symm] hf
nonlin shape
do i=1,n
frml logl = $
hx = hf(t) , $
%do(i,1,n,u(i)) , $
ux = %xt(u,t), $
h(t)=hx, uu(t)=%outerxx(ux), $
%logtdensity(hx,ux,shape), $
%if(u(i){1}<0,uu(t)(i,i){1},0.)
end do i
*****************************************************
*
* Standard GARCH(1,1)
dec symm vcs(n,n) vas(n,n) vbs(n,n) asym(n,n)
compute vcs=%const(0.001),vbs=%const(0.80),vas=%const(0.01),asym=%const(0.01)
nonlin(parmset=garchparms) vcs vas vbs
nonlin(parmset=asymmparms) asym
nonlin(parmset=tparms) shape
frml hf = vcs+vbs.*h{1}+asym.*%if(u(i){1}<0,uu(t)(i,i){1},0.)+vas.*uu{1}
maximize(parmset=tparms+asymmparms+garchparms,pmethod=simplex,piters=10,$
iters=500) logl 1997:12:05 2011:6:24