how can i to calculate the unconditional variance of two variables mgarch(1,1)-bekk model
thank you very much
Code: Select all
garch(p=1,q=1,mv=bek,method=bfgs,iters=200,pmethod=simplex,piters=20) / xjpn xfra xsui
*
* Size of "C" matrix
*
compute ncomp=%nvar*(%nvar+1)/2
*
* Extract the C, A and B matrix coefficients
*
compute ccoeffs=%xsubvec(%beta,%nregmean+1,%nregmean+ncomp)
compute acoeffs=%xsubvec(%beta,%nregmean+ncomp+1,%nregmean+ncomp+%nvar**2)
compute bcoeffs=%xsubvec(%beta,%nregmean+ncomp+%nvar**2+1,%nregmean+ncomp+2*%nvar**2)
*
* Rearrange the C matrix to a full N x N matrix
*
dec rect cb(%nvar,%nvar)
dec packed cs(%nvar,%nvar)
compute cs=%vectosymm(ccoeffs,%nvar)
ewise cb(i,j)=%if(j<=i,cs(i,j),0.0)
*
* VEC its outer product
*
compute cb=cb*tr(cb)
compute cx=%vec(cb)
*
* The A and B coefficients are saved in the coefficient vector in the transpose of
* the standard internal organization of arrays, so they get transposed after being
* reshaped.
*
compute ab=tr(%reshape(acoeffs,%nvar,%nvar))
compute bb=tr(%reshape(bcoeffs,%nvar,%nvar))
*
* Solve for the unconditional variance. This may not exist as a valid covariance
* matrix if any of the eigenvalues of I-AxA-BxB are negative.
*
compute iab=%identity(%nvar*%nvar)-%kroneker(ab,ab)-%kroneker(bb,bb)
compute h=%reshape(%solve(iab,cx),%nvar,%nvar)Happy New Yearluxu1983 wrote:dear
how can i to calculate the unconditional variance of two variables mgarch(1,1)-bekk model
thank you very much
yesTomDoan wrote:There's no closed form solution for the unconditional variance in that case - the expectation of the asymmetry term includes CDF functions involving the variances and covariances.
TomDoan wrote:The diagonals in Eu(-)u(-)' aren't the problems; it's the off-diagonal terms, which are
integral integal x1 x2 fN(x1,x2|sigma) dx2 dx1
where the two integrals are over -inf to 0. That's a very non-linear function of sigma.