why get MAT15 in bivariate DCC-GARCH

Discussions of ARCH, GARCH, and related models

why get MAT15 in bivariate DCC-GARCH

Postby wendyyuan » Fri Sep 30, 2011 2:24 pm

I make some modification based on ''garchmvdcc2''.

The main change is colored with red. The MAT15 problem (Subscripts Too Large or Non-Positive
) appears in the Log likelihood for the DCC phase

Code: Select all
dec vect[series] eps(n)
dec vect fullbeta(2*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,2
      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   = (1-a-b)*rr+a*uu{1}+b*q{1}
frml logl =q=qf, %logdensity(%cvtocorr(q),%xt(eps,t))
compute b=.10,a=.010
maximize logl 1

* Compute the estimates into the final two slots in fullbeta
*
compute fullbeta(2*n+1)=%beta(1),fullbeta(2*n+2)=%beta(2)
*

Could you help me to find out how to correct it?
Appreciate any help!
wendyyuan
 
Posts: 20
Joined: Wed Jun 17, 2009 6:07 am

Re: why get MAT15 in bivariate DCC-GARCH

Postby TomDoan » Sat Oct 01, 2011 3:48 pm

maximize logl 1

is clearly wrong. You can't start at entry 1 since you need lags of the variance and the outer product of the residuals. The start period should be one higher than the range used in estimating the univariate GARCH models.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: why get MAT15 in bivariate DCC-GARCH

Postby wendyyuan » Sat Oct 01, 2011 4:48 pm

TomDoan wrote:maximize logl 1

is clearly wrong. You can't start at entry 1 since you need lags of the variance and the outer product of the residuals. The start period should be one higher than the range used in estimating the univariate GARCH models.

Sorry, I miss a 'star' here

it should be

Maximize logl 1 *

here the '1' is the end value for parameter.

I think there should be something wrong elsewhere. Please have a look.

Thanks a lot
wendyyuan
 
Posts: 20
Joined: Wed Jun 17, 2009 6:07 am

Re: why get MAT15 in bivariate DCC-GARCH

Postby TomDoan » Sun Oct 02, 2011 1:00 pm

The 1 for the start is what is wrong. You can't compute the likelihood starting at entry 1.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to ARCH and GARCH Models

Who is online

Users browsing this forum: No registered users and 1 guest