3

I am writing a paper about contagion effect on financial markets. I have fitted a DCC-GARCH model using dccfit function from "rmgarch" package in R. The results and the code are below:

library(rmgarch)
garch.spec<-ugarchspec(mean.model = list(armaOrder=c(0,0)),variance.model = list(garchOrder=c(1,1),model="sGARCH"),distribution.model = "std")
dcc_garch.spec<-dccspec(uspec = multispec(replicate(5,garch.spec)),dccOrder = c(1,1),distribution = "mvnorm",fixed.pars=(c(0,0)))
dcc.model<-dccfit(dcc_garch.spec,dane)

*---------------------------------*
*          DCC GARCH Fit          *
*---------------------------------*

Distribution         :  mvnorm
Model                :  DCC(1,1)
No. Parameters       :  37
[VAR GARCH DCC UncQ] : [0+25+2+10]
No. Series           :  5
No. Obs.             :  2133
Log-Likelihood       :  33040.77
Av.Log-Likelihood    :  15.49 

Optimal Parameters
-----------------------------------
                Estimate  Std. Error   t value Pr(>|t|)
[set].mu       -0.000463    0.000236 -1.963445 0.049594
[set].omega     0.000007    0.000010  0.707854 0.479036
[set].alpha1    0.159600    0.039701  4.020008 0.000058
[set].beta1     0.826963    0.060240 13.727911 0.000000
[set].shape     4.298032    1.091724  3.936920 0.000083
[jci].mu        0.000279    0.000186  1.504632 0.132419
[jci].omega     0.000004    0.000016  0.270505 0.786772
[jci].alpha1    0.286313    0.176156  1.625338 0.104091
[jci].beta1     0.712686    0.387752  1.837997 0.066063
[jci].shape     3.374667    1.137219  2.967474 0.003003
[klci].mu       0.000190    0.000163  1.162613 0.244987
[klci].omega    0.000002    0.000013  0.141293 0.887639
[klci].alpha1   0.115581    0.183842  0.628695 0.529549
[klci].beta1    0.883419    0.162858  5.424485 0.000000
[klci].shape    3.992326    1.539661  2.592990 0.009515
[kospi].mu     -0.000017    0.000250 -0.067697 0.946027
[kospi].omega   0.000004    0.000005  0.758252 0.448300
[kospi].alpha1  0.118852    0.053993  2.201257 0.027718
[kospi].beta1   0.866701    0.062038 13.970540 0.000000
[kospi].shape  12.481904    3.682076  3.389909 0.000699
[psei].mu       0.000114    0.000199  0.570436 0.568382
[psei].omega    0.000004    0.000004  1.012793 0.311159
[psei].alpha1   0.123092    0.043843  2.807562 0.004992
[psei].beta1    0.871677    0.045946 18.971850 0.000000
[psei].shape    3.948307    0.367651 10.739287 0.000000
[Joint]dcca1    0.011300    0.004190  2.696611 0.007005
[Joint]dccb1    0.972213    0.015088 64.436650 0.000000

Information Criteria
---------------------

Akaike       -30.946
Bayes        -30.848
Shibata      -30.946
Hannan-Quinn -30.910


Elapsed time : 10.4624 

I need to test the total significance of parameters.
H0: alpha = beta = 0
H1: alpha =! 0 OR beta =! 0

To do that I need a test statistic:

$$D = -2(\ln Mz - \ln Mp),$$

where $\ln Mp$ is the log-likelihood of the full DCC model (in my case 33040.77) and $\ln Mz$ is the log-likelihood of the reduced DCC model, where alpha and beta equal 0.

I have no idea how I can built reduced DCC model and how to get log-likelihood of it. Do you have any idea how to do that?

Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
PJ1991
  • 33
  • 4
  • 1
    Trying to understand what the reduced DCC model is: do you want to set the GARCH parameters `alpha1` and `beta1` for each equation to zero but retain the DCC parameters in both cases? Also, what does `fixed.pars=(c(0,0))` do in row 3 of the code? – Richard Hardy Sep 15 '16 at 08:59
  • 1
    It should be log-likelihood of DCC model where both alpha and beta parameters equal zero. The correlation of the model should be constant (like in CCC), but I'm not sure if I get it right. – PJ1991 Sep 15 '16 at 09:53
  • 1
    Then the answer you accepted does not do what you want. Also, there is more than one alpha and more than one beta! There are $k$ alphas and $k$ betas where $k$ is the number of the time series you have in the system. Be very careful here and tell us again what hypothesis (in words, not only as a formula) do you want to test. D o you probably want to test constant vs. dynamic conditional correlation? I.e. CCC versus DCC? – Richard Hardy Sep 15 '16 at 10:10
  • 1
    The point of my paper is whether there was a contagion effect or not. To do that, I have to check if correlation between markets during crisis was higher than normal. I already made test of correlation using global factor (Corsetti, Pericoli, Sbracia, 2001) and test with adjusted correlation (Forbes, Rigobon, 1999). They both indicated that there was a contagion effect. – PJ1991 Sep 15 '16 at 13:43
  • 1
    Then I have built DCC model as in the code above (don’t bother about this 'fixed.pars=c(0,0)', I deleted it). Now I need to check whether the correlation was dynamic in this time series or not. If it is (H1: alfa or beta =!0) there was a contagion effect. If it is constant, there wasn.t. The test statistic is above, I need log-likelihood of full DCC model and the "reduced" one (probably CCC but when I have built a model, its log-likelihood was higher than in DCC and it shouldn't be that way). I have also made other test of this DCC model and it gave strong result that there was a contagion. – PJ1991 Sep 15 '16 at 13:44
  • 1
    Still not clear what your null model is. Does reduced model reduce the univariate GARCH models to constant conditional variance (alphas, betas = 0) or the dynamic conditional correlation to constant conditional correlation (`dcca=0`, `dccb=0`)? Also note that DCC does not allow modelling contagion in terms of marginal conditional variances because the marginal cond. variances do not depend on other series, only on own history. I advise you to be very careful with what exactly you are doing and what exactly your goal is. – Richard Hardy Sep 15 '16 at 14:17
  • 1
    You seem to have two different goals: *Now I need to check whether the correlation was dynamic in this time series or not* meaning constant versus time-varying **conditional** correlation AND *I have to check if correlation between markets during crisis was higher than normal* meaning different **unconditional** correlation at different time periods. – Richard Hardy Sep 15 '16 at 14:21
  • If I am testing H0: alpha1 + beta1 = 1, H1: alpha1 + beta1 ≠ 1 how can I do it for GARCH in R programming? My question is here:https://stats.stackexchange.com/questions/333256/restriction-test-h0-alpha1beta1-1-h1alpha1-beta1-%e2%89%a0-1-on-garch-model-in – Eric Mar 13 '18 at 17:57

1 Answers1

1

You can set fixed parameters in the individual GARCH specifications:

garch.spec <- ugarchspec(mean.model = list(armaOrder=c(0,0)), 
  variance.model = list(garchOrder=c(1,1), model="sGARCH"), 
  distribution.model = "std",
  fixed.pars=list(alpha1 = 0, beta1 = 0)
)
Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
SteinarV
  • 126
  • 4
  • 1
    Unfortunately there is an error: Non-Converged: integer(0) dccfit-->error: convergence problem in univariate fit... ...returning uGARCHmultifit object instead...check and resubmit... Warning message: In .sgarchfit(spec = spec, data = data, out.sample = out.sample, : ugarchfit-->warning: solver failer to converge. – PJ1991 Sep 13 '16 at 14:57
  • 1
    Try changing solver to "nlminb" (see https://rdrr.io/rforge/rmgarch/man/dccfit-methods.html for more options), but remember that the likelihood ratio test depends on you having optimal solution for both model specifications. – SteinarV Sep 13 '16 at 18:11
  • If I am testing H0: alpha1 + beta1 = 1, H1: alpha1 + beta1 ≠ 1 how can I do it for GARCH in R programming? My question is here: https://stats.stackexchange.com/questions/333256/restriction-test-h0-alpha1beta1-1-h1alpha1-beta1-%e2%89%a0-1-on-garch-model-in – Eric Mar 13 '18 at 17:58