Beginner problems in DCC-GARCH

Discussions of ARCH, GARCH, and related models
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

ChongoA wrote:Good Day Tom,
I am indeed a beginner in DCC-GARCH and need encougement. I modelled a Univariate AR(1) mean models for each series, DCC model for the variance with the following codes and results.

Code: Select all

equation(constant) spq dstpr 1
equation(constant) bozq dboz 1
equation(constant) tbq tb1 1
group ar1 spq tbq bozq
garch(p=1,q=1,model=ar1,mv=dcc,pmethod=simplex,piter=10,iter=200)

Code: Select all

MV-GARCH, DCC - Estimation by BFGS
Convergence in    80 Iterations. Final criterion was  0.0000000 <=  0.0000100
Monthly Data From 2001:05 To 2014:12
Usable Observations                       164
Log Likelihood                       -80.9807

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  Constant                      0.010569822  0.002321832      4.55236  0.00000530
2.  DSTPR{1}                      0.155954869  0.090163092      1.72970  0.08368435
3.  Constant                      0.439474660  0.058276811      7.54116  0.00000000
4.  TB1{1}                        0.002277418  0.019985327      0.11395  0.90927387
5.  Constant                      0.440757291  0.057072721      7.72273  0.00000000
6.  DBOZ{1}                       0.001996035  0.018854322      0.10587  0.91568855
7.  C(1)                         -0.000022434  0.000015127     -1.48307  0.13805620
8.  C(2)                          2.529424553  0.347706134      7.27460  0.00000000
9.  C(3)                          2.561119132  0.345578953      7.41110  0.00000000
10. A(1)                          0.411814867  0.143348995      2.87281  0.00406835
11. A(2)                          0.377140497  0.135923249      2.77466  0.00552598
12. A(3)                          0.375281034  0.135099724      2.77781  0.00547270
13. B(1)                          0.761236715  0.062887849     12.10467  0.00000000
14. B(2)                          0.004423171  0.019107584      0.23149  0.81693594
15. B(3)                          0.004072750  0.019120777      0.21300  0.83132595
16. DCC(1)                        0.393664956  0.045142969      8.72040  0.00000000
17. DCC(2)                        0.592641482  0.045281987     13.08780  0.00000000
\***** The problem is that I am not sure of the interpretation of the above output, then I do not have the code for Ljungbox test and Bollerslev test, conditional Correlation coefficients. Is there any diagnostic tests for the model above? please help. Sorry for asking too muck I seem not to find answers, been searching for long. Thank you in advance.
Are those series which are ordinarily modeled with GARCH? Your DBOX and TB1 are showing very, very weak GARCH effects. By contrast, DSTPR has a borderline unstable GARCH process. A DCC model really isn't appropriate for series with such completely different variance dynamics.
juustone
Posts: 17
Joined: Mon Jul 20, 2015 11:40 am

Re: Beginner problems in DCC-GARCH

Unread post by juustone »

I´m just quickly returning on my previous subject on multivariate Q-test.

I got now following result:

Multivariate Q(24)= 367.13853
Significance Level as Chi-Squared(96)= 2.45577e-033

Seems that the results are extremely high (Q24) and low (chi). Correct me, if I´m wrong: the model used helps to remove large part of autocorrelation? But I´m still quite insecure about the unusually high results.

In the picture I previously sent (and now again). The first and third (Q24) row show the residuals of series, second and fourth row show the squared residuals of each series. So if I´m using both CCC- and DCC-GARCH -models, I have to calculate Q-stat for both of them (like done in example pic, I suppose) ? How I can calculate squared residuals ?


And again, thanks for your patience dear Tom!
Attachments
picture 1.png
picture 1.png (66.08 KiB) Viewed 159469 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

juustone wrote:I´m just quickly returning on my previous subject on multivariate Q-test.

I got now following result:

Multivariate Q(24)= 367.13853
Significance Level as Chi-Squared(96)= 2.45577e-033

Seems that the results are extremely high (Q24) and low (chi). Correct me, if I´m wrong: the model used helps to remove large part of autocorrelation? But I´m still quite insecure about the unusually high results.

In the picture I previously sent (and now again). The first and third (Q24) row show the residuals of series, second and fourth row show the squared residuals of each series. So if I´m using both CCC- and DCC-GARCH -models, I have to calculate Q-stat for both of them (like done in example pic, I suppose) ? How I can calculate squared residuals ?


And again, thanks for your patience dear Tom!
You would have to post your program and data set---I'm not sure why you are showing four different MV Q statistics. That result doesn't look promising, though that's a LOT of lags for a test in a GARCH model.

@MVARCHTEST is used to test for residual ARCH in a multivariate setting---tests on autocorrelation of squares is for univariate models.
juustone
Posts: 17
Joined: Mon Jul 20, 2015 11:40 am

Re: Beginner problems in DCC-GARCH

Unread post by juustone »

Here´s the data. I´m using rats 8.2.

The results I posted in previous message was MV-Q between Russia and Kazakhstan.
Attachments
countries.xlsx
(204.8 KiB) Downloaded 1000 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

I need the program, too.
ChongoA
Posts: 3
Joined: Tue Aug 04, 2015 7:13 am

Re: Beginner problems in DCC-GARCH

Unread post by ChongoA »

Dear Tom,
Thank you once again so if DCC is not appropriate which model is?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

ChongoA wrote:Dear Tom,
Thank you once again so if DCC is not appropriate which model is?
BEKK would be better, but why do you think any multivariate GARCH model is appropriate when two of the series don't seem to have GARCH properties?
ChongoA
Posts: 3
Joined: Tue Aug 04, 2015 7:13 am

Re: Beginner problems in DCC-GARCH

Unread post by ChongoA »

Thank you Sir,
I am required to run M-GARCH model. I have run BEKK and it looks like this.

Code: Select all

MV-GARCH, BEKK - Estimation by BFGS
Convergence in   113 Iterations. Final criterion was  0.0000067 <=  0.0000100
Monthly Data From 2001:05 To 2014:12
Usable Observations                       164
Log Likelihood                      -668.1428

    Variable                        Coeff      Std Error      T-Stat       Signif
*************************************************************************************
1.  Constant                       0.03727185   0.00520390       7.16229  0.00000000
2.  DSTPR{1}                      -0.26898769   0.03922757      -6.85711  0.00000000
3.  Constant                       1.02587988   0.10250179      10.00841  0.00000000
4.  TB1{1}                        -0.01395865   0.03537958      -0.39454  0.69318264
5.  Constant                       0.58008073   0.10659810       5.44175  0.00000005
6.  DBOZ{1}                        0.08819554   0.03563103       2.47525  0.01331448
7.  C(1,1)                         0.03851185   0.00904723       4.25676  0.00002074
8.  C(2,1)                         0.24700218   0.40154564       0.61513  0.53846983
9.  C(2,2)                         1.42674325   0.21193262       6.73206  0.00000000
10. C(3,1)                         0.26129975   0.32103474       0.81393  0.41568515
11. C(3,2)                         1.29048769   0.13354110       9.66360  0.00000000
12. C(3,3)                        -0.00000114   0.23224824 -4.89322e-006  0.99999610
13. A(1,1)                        -1.75801393   0.15467734     -11.36568  0.00000000
14. A(1,2)                        15.44773786   2.27757033       6.78255  0.00000000
15. A(1,3)                       -32.48792831   3.69727168      -8.78700  0.00000000
16. A(2,1)                         0.00068156   0.00622645       0.10946  0.91283665
17. A(2,2)                         1.90535887   0.17084280      11.15270  0.00000000
18. A(2,3)                        -0.01268327   0.10678046      -0.11878  0.90545048
19. A(3,1)                        -0.02149820   0.00459926      -4.67427  0.00000295
20. A(3,2)                         0.37636796   0.06337034       5.93918  0.00000000
21. A(3,3)                         1.72900945   0.11754717      14.70907  0.00000000
22. B(1,1)                         0.37874937   0.06365474       5.95006  0.00000000
23. B(1,2)                         2.24261950   1.13792680       1.97079  0.04874742
24. B(1,3)                         1.60536555   1.80834798       0.88775  0.37467387
25. B(2,1)                        -0.00601468   0.00235550      -2.55346  0.01066586
26. B(2,2)                         0.38554068   0.05982087       6.44492  0.00000000
27. B(2,3)                         0.11328014   0.05853471       1.93526  0.05295786
28. B(3,1)                         0.01664974   0.00337134       4.93861  0.00000079
29. B(3,2)                        -0.18480410   0.04188651      -4.41202  0.00001024
30. B(3,3)                        -0.25748393   0.04485473      -5.74040  0.00000001
How does it look like? Any technical interpretation, does it fit well. I am depending much on the RATs Handbook for ARCH/GARCH I got yesterday. Thank you for your help.
juustone
Posts: 17
Joined: Mon Jul 20, 2015 11:40 am

Re: Beginner problems in DCC-GARCH

Unread post by juustone »

TomDoan wrote:I need the program, too.

system(model=varmodel)
variables lrus lkaz
lags 1 2
det constant
end(system)
estimate(resids=resids) * 2007
compute basesigma=%sigma
@mvqstat(lags=24)
#resids

... so the same as in the example in user´s guide (8) on page 305 and here https://estima.com/ratshelp/index.html? ... edure.html
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

Those are the residuals from the OLS VAR. The asymptotics for the MV-Q statistic assume homoscedastic residuals. Since you have strongly GARCHed data, that assumption fails and fails badly. If you get results like that from the diagnostic multivariate test, you should be concerned, but not from the residuals before you take into account the GARCH process.
juustone
Posts: 17
Joined: Mon Jul 20, 2015 11:40 am

Re: Beginner problems in DCC-GARCH

Unread post by juustone »

Thank you!

Can you give any hints how can I now proceed with diagnostics ?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

The GARCHMV.RPF program shows standard diagnostics and the GARCH e-course has many examples with interpretation of the results.

I don't know what those other MV Q tests were that you posted earlier, but those looked OK if they were the diagnostics on the jointly standardized residuals.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

ChongoA wrote:Thank you Sir,
I am required to run M-GARCH model. I have run BEKK and it looks like this.

Code: Select all

MV-GARCH, BEKK - Estimation by BFGS
Convergence in   113 Iterations. Final criterion was  0.0000067 <=  0.0000100
Monthly Data From 2001:05 To 2014:12
Usable Observations                       164
Log Likelihood                      -668.1428

    Variable                        Coeff      Std Error      T-Stat       Signif
*************************************************************************************
1.  Constant                       0.03727185   0.00520390       7.16229  0.00000000
2.  DSTPR{1}                      -0.26898769   0.03922757      -6.85711  0.00000000
3.  Constant                       1.02587988   0.10250179      10.00841  0.00000000
4.  TB1{1}                        -0.01395865   0.03537958      -0.39454  0.69318264
5.  Constant                       0.58008073   0.10659810       5.44175  0.00000005
6.  DBOZ{1}                        0.08819554   0.03563103       2.47525  0.01331448
7.  C(1,1)                         0.03851185   0.00904723       4.25676  0.00002074
8.  C(2,1)                         0.24700218   0.40154564       0.61513  0.53846983
9.  C(2,2)                         1.42674325   0.21193262       6.73206  0.00000000
10. C(3,1)                         0.26129975   0.32103474       0.81393  0.41568515
11. C(3,2)                         1.29048769   0.13354110       9.66360  0.00000000
12. C(3,3)                        -0.00000114   0.23224824 -4.89322e-006  0.99999610
13. A(1,1)                        -1.75801393   0.15467734     -11.36568  0.00000000
14. A(1,2)                        15.44773786   2.27757033       6.78255  0.00000000
15. A(1,3)                       -32.48792831   3.69727168      -8.78700  0.00000000
16. A(2,1)                         0.00068156   0.00622645       0.10946  0.91283665
17. A(2,2)                         1.90535887   0.17084280      11.15270  0.00000000
18. A(2,3)                        -0.01268327   0.10678046      -0.11878  0.90545048
19. A(3,1)                        -0.02149820   0.00459926      -4.67427  0.00000295
20. A(3,2)                         0.37636796   0.06337034       5.93918  0.00000000
21. A(3,3)                         1.72900945   0.11754717      14.70907  0.00000000
22. B(1,1)                         0.37874937   0.06365474       5.95006  0.00000000
23. B(1,2)                         2.24261950   1.13792680       1.97079  0.04874742
24. B(1,3)                         1.60536555   1.80834798       0.88775  0.37467387
25. B(2,1)                        -0.00601468   0.00235550      -2.55346  0.01066586
26. B(2,2)                         0.38554068   0.05982087       6.44492  0.00000000
27. B(2,3)                         0.11328014   0.05853471       1.93526  0.05295786
28. B(3,1)                         0.01664974   0.00337134       4.93861  0.00000079
29. B(3,2)                        -0.18480410   0.04188651      -4.41202  0.00001024
30. B(3,3)                        -0.25748393   0.04485473      -5.74040  0.00000001
How does it look like? Any technical interpretation, does it fit well. I am depending much on the RATs Handbook for ARCH/GARCH I got yesterday. Thank you for your help.
Not surprisingly, it doesn't look very good as a GARCH model. Have you done the first step of trying to analyze these using univariate GARCH models? Your results are showing all the signs of data that are dominated more by structural breaks than by a GARCH process.
juustone
Posts: 17
Joined: Mon Jul 20, 2015 11:40 am

Re: Beginner problems in DCC-GARCH

Unread post by juustone »

Thomas, please accept my apologies for naïve questions.

I was just mixed with different procedures. The example paper I was given and which methods I should replicate in my assignment (only with different data) is quite unclear. It´s said only that first and third row pairs represents residuals of each series while second and fourth row shows the squared residuals of each series (attachment).

I know followed the GARCHMV.RPF example:
Input

Code: Select all

 
group garchm ruseq geoeq
garch(model=garchm,p=1,q=1,pmethod=simplex,piters=10,$
   mvhseries=hhs)
garch(p=1,q=1,pmethod=simplex,piters=10,$
   hmatrices=hh,rvectors=rd) / lrus lgeo
set z1 = rd(t) (1)/sqrt(hh(t)(1,1))
set z2 = rd(t) (2)/sqrt(hh(t)(2,2))
@bdindtests(number=40) z1
@bdindtests(number=40) z2

dec vect[series] zu(%nvar)
do time=%regstart(),%regend()
   compute %pt(zu,time,%solve(%decomp(hh(time)),rd(time)))
end do time
@mvqstat(lags=8)
# zu 
Out. there was errors while setting z1 and z2

Code: Select all

MV-GARCH - Estimation by BFGS
Convergence in    61 Iterations. Final criterion was  0.0000000 <=  0.0000100
Daily(5) Data From 2007:03:15 To 2015:04:28
Usable Observations                      2119
Log Likelihood                     -8799.2584

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  Mean(1)                       0.061132290  0.032328962      1.89094  0.05863169
2.  Mean(2)                      -0.054176701  0.042469043     -1.27568  0.20207039
3.  C(1,1)                        0.062626774  0.012656080      4.94835  0.00000075
4.  C(2,1)                        0.048134039  0.108171860      0.44498  0.65633605
5.  C(2,2)                        0.080188190  0.017092868      4.69132  0.00000271
6.  A(1,1)                        0.090363693  0.011203688      8.06553  0.00000000
7.  A(2,1)                        0.000801563  0.000613797      1.30591  0.19158325
8.  A(2,2)                        0.074671250  0.008336419      8.95723  0.00000000
9.  B(1,1)                        0.893161150  0.012220517     73.08702  0.00000000
10. B(2,1)                       -1.000001932  0.000373692  -2676.00305  0.00000000
11. B(2,2)                        0.921209025  0.007972403    115.54973  0.00000000

## MAT15. Subscripts Too Large or Non-Positive
Error was evaluating entry 2121
## MAT15. Subscripts Too Large or Non-Positive
Error was evaluating entry 2121

Independence Tests for Series Z1
Test            Statistic  P-Value
Ljung-Box Q(40)  39.725318     0.4825
McLeod-Li(40)    15.332518     0.9999
Turning Points   -2.027414     0.0426
Difference Sign  -1.805652     0.0710
Rank Test        -0.733048     0.4635


Independence Tests for Series Z2
Test            Statistic  P-Value
Ljung-Box Q(40)   54.71083     0.0605
McLeod-Li(40)    100.57191     0.0000
Turning Points     2.66313     0.0077
Difference Sign    3.08465     0.0020
Rank Test         -3.09000     0.0020

Multivariate Q(8)=      39.10582
Significance Level as Chi-Squared(32)=       0.18091
According to results, used model do not remove the series autocorrelations quite well? Is it same as you got ? And how many lags should be used ?

Thanks again! You have helped me a lot!
Attachments
Qstat.JPG
Qstat.JPG (50.6 KiB) Viewed 159387 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Beginner problems in DCC-GARCH

Unread post by TomDoan »

I'm really confused about what you're posting. What is Table 10? Your program is for Russia and Georgia, so why are you posting the results for Russia vs large aggregates of other nations?

Your data for Russia and Georgia show almost no relationship between the two---the periods of high volatility are basically disjoint.
Post Reply