Calculating determinant of the variance-covariance from DCC

Discussions of ARCH, GARCH, and related models
hyde82
Posts: 6
Joined: Mon Sep 28, 2015 1:53 am

Calculating determinant of the variance-covariance from DCC

Unread post by hyde82 »

Hello.

I'm rats 9 user.

I want to know How I can calculate the determint of the variance-covariance after dcc-garch estimated.

Code: Select all

clear
open data data.xls
calendar(w) 2005:01:04
data(format=xls,org=columns,sheet="sheet3",top=2,left=2) 2005:01:04  2015:11:30 $
kospi	ni	jpbo	kobo	krw	jpy

garch(p=1,q=1,mv=dcc,hmatrices=hh,METHOD=BFGS,ITERS=10000) / usastock japanstock canadastock germanystock
set corr_ad3 %regstart() %regend() = %cvtocorr(hh(t))(1,2)
spgraph(hea='DCC',hfi=1,vfi=1)
gra(hea='Panel 1: us-japan') 1 ; # corr_ad3
spgraph(done)
after dcc-garch,

Code: Select all

dis hh(1)

      0.32145
      0.24642       0.44496
     -0.11834      -0.10537       0.12317
      0.03212       0.09905      -0.01116       0.08396

I can show the variance-covariance. but the form is lower tringer matrix.

Determinant of the lower tringer matrix and determinant of the 4x4 symmetric matrix is not same.

So bleow command is wrong.

Code: Select all

set determinant= %det(hh(t))
please help me.
I also want to know how Can I calculate the eigenvalue.
In symmetrix matrix, "determinant=eigenvalue1*eigenvalue2*eigenvalue3*eigenvalue4"



Thanks in advance.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Calculationg determint of the variance-covariance from D

Unread post by TomDoan »

hyde82 wrote:Hello.

I'm rats 9 user.

I want to know How I can calculate the determint of the variance-covariance after dcc-garch estimated.

Code: Select all

clear
open data data.xls
calendar(w) 2005:01:04
data(format=xls,org=columns,sheet="sheet3",top=2,left=2) 2005:01:04  2015:11:30 $
kospi	ni	jpbo	kobo	krw	jpy

garch(p=1,q=1,mv=dcc,hmatrices=hh,METHOD=BFGS,ITERS=10000) / usastock japanstock canadastock germanystock
set corr_ad3 %regstart() %regend() = %cvtocorr(hh(t))(1,2)
spgraph(hea='DCC',hfi=1,vfi=1)
gra(hea='Panel 1: us-japan') 1 ; # corr_ad3
spgraph(done)
after dcc-garch,

Code: Select all

dis hh(1)

      0.32145
      0.24642       0.44496
     -0.11834      -0.10537       0.12317
      0.03212       0.09905      -0.01116       0.08396

I can show the variance-covariance. but the form is lower tringer matrix.

Determinant of the lower tringer matrix and determinant of the 4x4 symmetric matrix is not same.

So bleow command is wrong.

Code: Select all

set determinant= %det(hh(t))
No. It's symmetric---since it is, it only shows the lower triangle.
hyde82 wrote:
please help me.
I also want to know how Can I calculate the eigenvalue.
In symmetrix matrix, "determinant=eigenvalue1*eigenvalue2*eigenvalue3*eigenvalue4"
The EIGEN instruction or %EIGDECOMP function can compute the eigenvalues. Though if all you're interested in is the determinant, you're already fine with %DET.
hyde82
Posts: 6
Joined: Mon Sep 28, 2015 1:53 am

Re: Calculationg determint of the variance-covariance from D

Unread post by hyde82 »

Thank for valueable comments TomDoan.

but the determint of the lower tringer matrix and the determint of the symmetrix matrix is not same.

So I want to know that how can i reform the lower tringer matrix to symmetrix matrix?

I also saw the 'EIGEN Instruction'

Code: Select all

eigen(cvalues=cv) %%hh(t)
disp "Eigenvalues from dcc" cv
If the name isn't mistyped, it's possible that you have a poorly formatted instruction
Common errors are
 * a space before the ( in an option field
 * a missing space before = in a SET or FRML
 * a missing $ at the end of a long line which continues to the next
## MAT1. Matrix CV Has Not Been Dimensioned
but errors occured.

please help me.

Thanks in advance.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Calculationg determint of the variance-covariance from D

Unread post by TomDoan »

HH(T) is not lower triangular---SYMMETRIC matrices are displayed just using the lower triangle.

Because EIGEN is a separate instruction, you need to put it in a loop over the entries. But again, the %DET function is what you want.
hyde82
Posts: 6
Joined: Mon Sep 28, 2015 1:53 am

Re: Calculationg determint of the variance-covariance from D

Unread post by hyde82 »

Sorry for this.

Thanks you very much Tom.
Post Reply