Page 1 of 1

dcc grach

Posted: Fri Aug 14, 2009 11:29 am
by luxu1983
dear Tom Doan

i have two variables lx ly, i will estimate a dcc-garch model, i set the variance as:

H1(t)=c1+a1*H1(t-1)+b1*e1(t-1)e1(t-1)'+a12*H2(t-1)
H2(t)=c2+a2*H2(t-1)+b2*e2(t-1)e2(t-1)'+a21*H1(t-1)

how can i modify the code mgarchdcc2? in the first step ,the code estimate the univariate GARCH models ,but could not include the the term a12*H2(t-1) and a21*H1(t-1)
meanwhile i try the garch VARIANCE option , and it can not exlude the MA term

thank you very much


*
* Multivariate GARCH with two-step DCC estimator
*
all 6237
open data g10xrate.xls
data(format=xls,org=columns) / usxjpn usxfra usxsui usxnld usxuk usxbel usxger usxcan
*
compute n=8
dec vect[series] x(n)
compute i=0
dofor [string] s = 'jpn' 'fra' 'sui' 'nld' 'uk' 'bel' 'ger' 'can'
compute xrate='usx'+s,i=i+1
set x(i) = 100.0*log(%s(xrate)/%s(xrate){1})
end dofor
*
*
dec vect[series] eps(n)
dec vect fullbeta(4*n+2)
*
* Do univariate GARCH models. Save the standardized residuals
* into eps(i). Copy the coefficients into the proper slots in
* the full beta matrix.
*
do i=1,n
garch(p=1,q=1,resids=r,hseries=h) / x(i)
set eps(i) = r/sqrt(h)
do j=1,4
compute fullbeta(n*(j-1)+i)=%beta(j)
end do j
end do i
*
* Compute the covariance matrix of the standardized residuals
*
vcv(matrix=rr)
# eps
*
* Create the series[symm] uu (outer product of residuals). Make
* it the unconditional value prior to the sample.
*
dec series[symm] uu q
gset uu %regstart() %regend() = %outerxx(%xt(eps,t))
gset uu 1 %regstart()-1 = rr
gset q = rr
*
* Log likelihood for the DCC phase, taking the residuals as given
*
nonlin a b
dec frml[symm] qf
frml qf = (qx=(1-a-b)*rr+a*uu{1}+b*q{1})
frml logl = q=qf,%logdensity(%cvtocorr(q),%xt(eps,t))
compute b=.80,a=.10
maximize logl 2 *
*
*

Re: dcc grach

Posted: Sat Aug 15, 2009 8:36 am
by TomDoan
You might want to look at the "VARMA" GARCH model which is built in to RATS (MV=DCC,VARIANCES=VARMA). You're one term short of that (it includes the lagged e^2 terms of both residuals in each equation), and it probably makes sense to include those if you including the lagged cross variance.

Re: dcc grach

Posted: Sat Aug 15, 2009 3:16 pm
by luxu1983
TomDoan wrote:You might want to look at the "VARMA" GARCH model which is built in to RATS (MV=DCC,VARIANCES=VARMA). You're one term short of that (it includes both residuals in each equation), and it probably makes sense to include those if you including the lagged cross variance.
thank you TomDoan, i have coded the garch model i mentioned above
but now question is the initial value setting for cross terms