COPULA
TRƯỚC COVID
CN3_COPULA = read_excel("C:\\Users\\84896\\Desktop\\CN3.xlsx", sheet="Pre")
SP500 <- CN3_COPULA$y
VNI <- CN3_COPULA$x1
MERVAL <- CN3_COPULA$x2
CROBEX <- CN3_COPULA$x3
MASIA <- CN3_COPULA$x4
MSM30 <- CN3_COPULA$x5MÔ HÌNH GJR-GARCH PHÙ HỢP
SP500
a21.SP500.garch21ss.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(2, 1)),mean.model = list(armaOrder = c(2, 1), include.mean = TRUE), distribution.model = "sstd")
a21.SP500.garch21ss.fit <- ugarchfit(spec = a21.SP500.garch21ss.spec,SP500)
a21.SP500.garch21ss.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(2,1)
## Mean Model : ARFIMA(2,0,1)
## Distribution : sstd
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.068022 0.003761 18.0859 0.000000
## ar1 0.867267 0.029914 28.9916 0.000000
## ar2 0.076999 0.028764 2.6769 0.007431
## ma1 -0.980973 0.000390 -2515.3058 0.000000
## omega 0.103369 0.025502 4.0534 0.000050
## alpha1 0.000000 0.164120 0.0000 1.000000
## alpha2 0.000000 0.103800 0.0000 1.000000
## beta1 0.693221 0.057169 12.1258 0.000000
## gamma1 0.179824 0.154707 1.1623 0.245093
## gamma2 0.222843 0.160603 1.3875 0.165276
## skew 0.821067 0.033807 24.2871 0.000000
## shape 3.844892 0.614983 6.2520 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.068022 0.002895 23.49633 0.000000
## ar1 0.867267 0.031262 27.74149 0.000000
## ar2 0.076999 0.027220 2.82872 0.004673
## ma1 -0.980973 0.000415 -2362.41217 0.000000
## omega 0.103369 0.033104 3.12256 0.001793
## alpha1 0.000000 0.389789 0.00000 1.000000
## alpha2 0.000000 0.209002 0.00000 1.000000
## beta1 0.693221 0.102809 6.74284 0.000000
## gamma1 0.179824 0.313281 0.57400 0.565967
## gamma2 0.222843 0.320023 0.69634 0.486219
## skew 0.821067 0.030847 26.61732 0.000000
## shape 3.844892 1.138083 3.37839 0.000729
##
## LogLikelihood : -1161.214
##
## Information Criteria
## ------------------------------------
##
## Akaike 2.3968
## Bayes 2.4567
## Shibata 2.3965
## Hannan-Quinn 2.4195
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 1.355 0.2445
## Lag[2*(p+q)+(p+q)-1][8] 3.927 0.8246
## Lag[4*(p+q)+(p+q)-1][14] 5.898 0.7689
## d.o.f=3
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.08884 0.7657
## Lag[2*(p+q)+(p+q)-1][8] 0.60875 0.9934
## Lag[4*(p+q)+(p+q)-1][14] 1.06871 0.9995
## d.o.f=3
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[4] 0.1310 0.500 2.000 0.7174
## ARCH Lag[6] 0.2287 1.461 1.711 0.9622
## ARCH Lag[8] 0.3821 2.368 1.583 0.9899
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 3.4395
## Individual Statistics:
## mu 0.22275
## ar1 0.19772
## ar2 0.23808
## ma1 0.04268
## omega 0.30372
## alpha1 0.40988
## alpha2 0.20857
## beta1 0.26131
## gamma1 0.18789
## gamma2 0.13338
## skew 0.59038
## shape 0.30895
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.69 2.96 3.51
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.6505 0.5155
## Negative Sign Bias 0.2103 0.8335
## Positive Sign Bias 0.5372 0.5912
## Joint Effect 1.6414 0.6500
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 20.37 0.37282
## 2 30 26.87 0.57854
## 3 40 53.28 0.06343
## 4 50 43.83 0.68221
##
##
## Elapsed time : 1.313412
VNI
a10.VNI.garch21ss.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(2, 1)),mean.model = list(armaOrder = c(1, 0), include.mean = TRUE), distribution.model = "sstd")
a10.VNI.garch21ss.fit <- ugarchfit(spec = a10.VNI.garch21ss.spec,VNI)
a10.VNI.garch21ss.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(2,1)
## Mean Model : ARFIMA(1,0,0)
## Distribution : sstd
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.077918 0.036198 2.15255 0.031354
## ar1 0.043243 0.028987 1.49178 0.135756
## omega 0.114400 0.052194 2.19181 0.028393
## alpha1 0.000000 0.047715 0.00000 1.000000
## alpha2 0.076069 0.058753 1.29473 0.195412
## beta1 0.799818 0.051847 15.42647 0.000000
## gamma1 0.118184 0.085364 1.38447 0.166214
## gamma2 0.020535 0.099061 0.20729 0.835782
## skew 0.933939 0.040156 23.25774 0.000000
## shape 3.841487 0.508074 7.56088 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.077918 0.039889 1.95336 0.050777
## ar1 0.043243 0.027481 1.57356 0.115589
## omega 0.114400 0.070497 1.62277 0.104640
## alpha1 0.000000 0.055152 0.00000 1.000000
## alpha2 0.076069 0.066875 1.13748 0.255338
## beta1 0.799818 0.062349 12.82802 0.000000
## gamma1 0.118184 0.093708 1.26120 0.207236
## gamma2 0.020535 0.115505 0.17778 0.858895
## skew 0.933939 0.042900 21.77001 0.000000
## shape 3.841487 0.445018 8.63221 0.000000
##
## LogLikelihood : -1491.878
##
## Information Criteria
## ------------------------------------
##
## Akaike 3.0682
## Bayes 3.1181
## Shibata 3.0680
## Hannan-Quinn 3.0872
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.3547 0.5515
## Lag[2*(p+q)+(p+q)-1][2] 2.2347 0.1450
## Lag[4*(p+q)+(p+q)-1][5] 3.4634 0.3242
## d.o.f=1
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.2493 0.6176
## Lag[2*(p+q)+(p+q)-1][8] 2.2967 0.8109
## Lag[4*(p+q)+(p+q)-1][14] 4.1420 0.8664
## d.o.f=3
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[4] 0.02996 0.500 2.000 0.8626
## ARCH Lag[6] 2.21327 1.461 1.711 0.4455
## ARCH Lag[8] 2.79062 2.368 1.583 0.5833
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.9008
## Individual Statistics:
## mu 0.12956
## ar1 0.06918
## omega 0.36535
## alpha1 0.07254
## alpha2 0.11718
## beta1 0.29617
## gamma1 0.10806
## gamma2 0.18726
## skew 0.15519
## shape 0.28165
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.29 2.54 3.05
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.3412 0.7330
## Negative Sign Bias 0.8446 0.3985
## Positive Sign Bias 0.7057 0.4805
## Joint Effect 1.3799 0.7102
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 9.498 0.9643
## 2 30 13.574 0.9933
## 3 40 26.965 0.9275
## 4 50 38.926 0.8481
##
##
## Elapsed time : 0.8004849
MERVAL
a22.MERVAL.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "std")
a22.MERVAL.garch11s.fit <- ugarchfit(spec = a22.MERVAL.garch11s.spec,MERVAL)
a22.MERVAL.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.277841 0.068957 4.0292 0.000056
## ar1 -0.521307 0.009254 -56.3315 0.000000
## ar2 -0.974242 0.003855 -252.7221 0.000000
## ma1 0.517755 0.004091 126.5609 0.000000
## ma2 0.993414 0.000227 4378.3810 0.000000
## omega 1.245206 0.500698 2.4869 0.012885
## alpha1 0.051223 0.043974 1.1648 0.244085
## beta1 0.664436 0.086163 7.7114 0.000000
## gamma1 0.346201 0.123475 2.8038 0.005050
## shape 3.975936 0.543385 7.3170 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.277841 0.074941 3.7074 0.000209
## ar1 -0.521307 0.011623 -44.8524 0.000000
## ar2 -0.974242 0.005062 -192.4759 0.000000
## ma1 0.517755 0.004214 122.8592 0.000000
## ma2 0.993414 0.000253 3922.4917 0.000000
## omega 1.245206 0.831296 1.4979 0.134157
## alpha1 0.051223 0.048872 1.0481 0.294595
## beta1 0.664436 0.129484 5.1314 0.000000
## gamma1 0.346201 0.157801 2.1939 0.028243
## shape 3.975936 0.665439 5.9749 0.000000
##
## LogLikelihood : -2295.482
##
## Information Criteria
## ------------------------------------
##
## Akaike 4.7099
## Bayes 4.7598
## Shibata 4.7097
## Hannan-Quinn 4.7289
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 3.287 0.06982
## Lag[2*(p+q)+(p+q)-1][11] 6.877 0.07752
## Lag[4*(p+q)+(p+q)-1][19] 9.299 0.58745
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.06812 0.7941
## Lag[2*(p+q)+(p+q)-1][5] 0.15324 0.9956
## Lag[4*(p+q)+(p+q)-1][9] 0.25034 0.9998
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.05656 0.500 2.000 0.8120
## ARCH Lag[5] 0.08175 1.440 1.667 0.9901
## ARCH Lag[7] 0.14257 2.315 1.543 0.9986
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.8134
## Individual Statistics:
## mu 0.18841
## ar1 0.05171
## ar2 0.10500
## ma1 0.04349
## ma2 0.09059
## omega 0.76437
## alpha1 0.36269
## beta1 0.42732
## gamma1 0.08814
## shape 0.26010
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.29 2.54 3.05
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.9423 0.3463
## Negative Sign Bias 0.3756 0.7073
## Positive Sign Bias 1.3502 0.1773
## Joint Effect 2.1762 0.5366
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 15.95 0.6603
## 2 30 34.41 0.2245
## 3 40 49.11 0.1287
## 4 50 52.82 0.3288
##
##
## Elapsed time : 0.9835651
CROBEX
a10.CROBEX.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(1, 0), include.mean = TRUE), distribution.model = "std")
a10.CROBEX.garch11s.fit <- ugarchfit(spec = a10.CROBEX.garch11s.spec,CROBEX)
a10.CROBEX.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(1,0,0)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.020689 0.016673 1.24085 0.214662
## ar1 0.023459 0.029892 0.78479 0.432575
## omega 0.106664 0.054419 1.96006 0.049989
## alpha1 0.115286 0.069081 1.66886 0.095145
## beta1 0.705803 0.118784 5.94191 0.000000
## gamma1 0.044463 0.074602 0.59600 0.551177
## shape 3.010641 0.345872 8.70448 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.020689 0.017807 1.16182 0.245307
## ar1 0.023459 0.029784 0.78763 0.430912
## omega 0.106664 0.059707 1.78645 0.074027
## alpha1 0.115286 0.065095 1.77106 0.076552
## beta1 0.705803 0.130382 5.41335 0.000000
## gamma1 0.044463 0.088408 0.50293 0.615017
## shape 3.010641 0.273873 10.99284 0.000000
##
## LogLikelihood : -901.7151
##
## Information Criteria
## ------------------------------------
##
## Akaike 1.8564
## Bayes 1.8914
## Shibata 1.8563
## Hannan-Quinn 1.8697
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.01167 0.9140
## Lag[2*(p+q)+(p+q)-1][2] 0.92283 0.7852
## Lag[4*(p+q)+(p+q)-1][5] 2.10167 0.6819
## d.o.f=1
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.1712 0.6791
## Lag[2*(p+q)+(p+q)-1][5] 1.3334 0.7807
## Lag[4*(p+q)+(p+q)-1][9] 2.2260 0.8764
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.2259 0.500 2.000 0.6346
## ARCH Lag[5] 1.1179 1.440 1.667 0.6983
## ARCH Lag[7] 1.3814 2.315 1.543 0.8448
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.3479
## Individual Statistics:
## mu 0.09265
## ar1 0.27841
## omega 0.12987
## alpha1 0.43241
## beta1 0.22066
## gamma1 0.23992
## shape 0.22201
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 1.69 1.9 2.35
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.06162 0.9509
## Negative Sign Bias 0.25980 0.7951
## Positive Sign Bias 0.24190 0.8089
## Joint Effect 0.29876 0.9603
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 31.07 0.03965
## 2 30 43.91 0.03742
## 3 40 52.22 0.07663
## 4 50 62.42 0.09434
##
##
## Elapsed time : 0.58672
MASIA
a21.MASIA.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 1), include.mean = TRUE), distribution.model = "std")
a21.MASIA.garch11s.fit <- ugarchfit(spec = a21.MASIA.garch11s.spec,MASIA)
a21.MASIA.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,1)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.018255 0.018038 1.0121e+00 0.311510
## ar1 -0.908347 0.005637 -1.6114e+02 0.000000
## ar2 0.082713 0.002210 3.7418e+01 0.000000
## ma1 0.982917 0.000038 2.5726e+04 0.000000
## omega 0.103061 0.120655 8.5418e-01 0.393004
## alpha1 0.110461 0.099883 1.1059e+00 0.268768
## beta1 0.688064 0.313996 2.1913e+00 0.028429
## gamma1 -0.001818 0.059215 -3.0709e-02 0.975502
## shape 3.384525 0.408882 8.2775e+00 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.018255 0.020916 8.7278e-01 0.38278
## ar1 -0.908347 0.008116 -1.1193e+02 0.00000
## ar2 0.082713 0.003964 2.0864e+01 0.00000
## ma1 0.982917 0.000039 2.4944e+04 0.00000
## omega 0.103061 0.330194 3.1212e-01 0.75495
## alpha1 0.110461 0.242669 4.5519e-01 0.64897
## beta1 0.688064 0.860351 7.9975e-01 0.42386
## gamma1 -0.001818 0.073754 -2.4655e-02 0.98033
## shape 3.384525 0.604178 5.6019e+00 0.00000
##
## LogLikelihood : -889.6914
##
## Information Criteria
## ------------------------------------
##
## Akaike 1.8359
## Bayes 1.8809
## Shibata 1.8358
## Hannan-Quinn 1.8530
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 7.851 5.079e-03
## Lag[2*(p+q)+(p+q)-1][8] 10.182 1.439e-12
## Lag[4*(p+q)+(p+q)-1][14] 13.237 9.579e-03
## d.o.f=3
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.1204 0.7286
## Lag[2*(p+q)+(p+q)-1][5] 0.7080 0.9214
## Lag[4*(p+q)+(p+q)-1][9] 1.5578 0.9507
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.01121 0.500 2.000 0.9157
## ARCH Lag[5] 0.99100 1.440 1.667 0.7356
## ARCH Lag[7] 1.23885 2.315 1.543 0.8719
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.1801
## Individual Statistics:
## mu 0.12240
## ar1 0.09409
## ar2 0.10514
## ma1 0.07518
## omega 0.04179
## alpha1 0.16352
## beta1 0.05072
## gamma1 0.02840
## shape 0.07510
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.1 2.32 2.82
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 1.53526 0.1250
## Negative Sign Bias 0.02004 0.9840
## Positive Sign Bias 0.24274 0.8083
## Joint Effect 4.01580 0.2598
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 19.10 0.4504
## 2 30 23.32 0.7618
## 3 40 34.73 0.6650
## 4 50 43.42 0.6979
##
##
## Elapsed time : 0.7602339
MSM30
a10.MSM30.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(1, 0), include.mean = TRUE), distribution.model = "std")
a10.MSM30.garch11s.fit <- ugarchfit(spec = a10.MSM30.garch11s.spec,MSM30)
a10.MSM30.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(1,0,0)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu -0.043944 0.019025 -2.3099 0.020896
## ar1 0.198942 0.031281 6.3599 0.000000
## omega 0.075732 0.024231 3.1254 0.001776
## alpha1 0.146188 0.074458 1.9634 0.049605
## beta1 0.683249 0.071786 9.5178 0.000000
## gamma1 0.123332 0.081116 1.5204 0.128400
## shape 3.166000 0.351182 9.0153 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu -0.043944 0.020834 -2.1093 0.034922
## ar1 0.198942 0.030454 6.5325 0.000000
## omega 0.075732 0.031043 2.4396 0.014703
## alpha1 0.146188 0.086069 1.6985 0.089412
## beta1 0.683249 0.095662 7.1423 0.000000
## gamma1 0.123332 0.089598 1.3765 0.168669
## shape 3.166000 0.375487 8.4317 0.000000
##
## LogLikelihood : -866.7273
##
## Information Criteria
## ------------------------------------
##
## Akaike 1.7849
## Bayes 1.8199
## Shibata 1.7848
## Hannan-Quinn 1.7982
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 2.186 0.139296
## Lag[2*(p+q)+(p+q)-1][2] 3.723 0.007863
## Lag[4*(p+q)+(p+q)-1][5] 6.364 0.033970
## d.o.f=1
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.215 0.6429
## Lag[2*(p+q)+(p+q)-1][5] 1.268 0.7966
## Lag[4*(p+q)+(p+q)-1][9] 2.233 0.8755
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.4655 0.500 2.000 0.4951
## ARCH Lag[5] 1.3081 1.440 1.667 0.6442
## ARCH Lag[7] 1.8328 2.315 1.543 0.7527
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.8466
## Individual Statistics:
## mu 0.28764
## ar1 0.05088
## omega 0.17714
## alpha1 0.07239
## beta1 0.11191
## gamma1 0.19706
## shape 0.19195
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 1.69 1.9 2.35
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.4400 0.6600
## Negative Sign Bias 0.2678 0.7889
## Positive Sign Bias 0.5218 0.6019
## Joint Effect 0.3621 0.9480
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 13.95 0.7865
## 2 30 34.23 0.2310
## 3 40 23.70 0.9746
## 4 50 52.41 0.3432
##
##
## Elapsed time : 0.4192569
CHUẨN HÓA MÔ HÌNH BIÊN DUYÊN
SP500
SP500.res <- residuals(a21.SP500.garch21ss.fit)/sigma(a21.SP500.garch21ss.fit)
fitdist(distribution = "sstd", SP500.res, control = list())$pars## mu sigma skew shape
## -0.01820042 1.00515109 0.81049786 3.85925854
VNI
VNI.res <- residuals(a10.VNI.garch21ss.fit)/sigma(a10.VNI.garch21ss.fit)
fitdist(distribution = "sstd", VNI.res, control = list())$pars## mu sigma skew shape
## -0.003169081 1.010092211 0.932044158 3.768024578
MERVAL
MERVAL.res <- residuals(a22.MERVAL.garch11s.fit)/sigma(a22.MERVAL.garch11s.fit)
fitdist(distribution = "std", MERVAL.res, control = list())$pars## mu sigma shape
## -0.001498038 0.997465124 3.997829452
CROBEX
CROBEX.res <- residuals(a10.CROBEX.garch11s.fit)/sigma(a10.CROBEX.garch11s.fit)
fitdist(distribution = "std", CROBEX.res, control = list())$pars## mu sigma shape
## 5.035496e-05 9.918756e-01 3.040521e+00
MASIA
MASIA.res <- residuals(a21.MASIA.garch11s.fit)/sigma(a21.MASIA.garch11s.fit)
fitdist(distribution = "std", MASIA.res, control = list())$pars## mu sigma shape
## -0.0002994237 1.0160885622 3.3037084579
COPULA
SP500 - VNI
## Bivariate copula: t (par = 0.11, par2 = 5.4, tau = 0.07)
## Family
## ------
## No: 2
## Name: t
##
## Parameter(s)
## ------------
## par: 0.11 (SE = 0.04)
## par2: 5.4 (SE = 1.17)
## Dependence measures
## -------------------
## Kendall's tau: 0.07 (empirical = 0.06, p value < 0.01)
## Upper TD: 0.06
## Lower TD: 0.06
##
## Fit statistics
## --------------
## logLik: 22.44
## AIC: -40.88
## BIC: -31.1
SP500 - MERVAL
## Bivariate copula: t (par = 0.4, par2 = 6.74, tau = 0.26)
## Family
## ------
## No: 2
## Name: t
##
## Parameter(s)
## ------------
## par: 0.4 (SE = 0.03)
## par2: 6.74 (SE = 1.66)
## Dependence measures
## -------------------
## Kendall's tau: 0.26 (empirical = 0.26, p value < 0.01)
## Upper TD: 0.11
## Lower TD: 0.11
##
## Fit statistics
## --------------
## logLik: 90.64
## AIC: -177.29
## BIC: -167.51
SP500 - CROBEX
## Bivariate copula: t (par = 0.14, par2 = 5.22, tau = 0.09)
## Family
## ------
## No: 2
## Name: t
##
## Parameter(s)
## ------------
## par: 0.14 (SE = 0.04)
## par2: 5.22 (SE = 1.02)
## Dependence measures
## -------------------
## Kendall's tau: 0.09 (empirical = 0.08, p value < 0.01)
## Upper TD: 0.07
## Lower TD: 0.07
##
## Fit statistics
## --------------
## logLik: 25.6
## AIC: -47.2
## BIC: -37.42
SP500 - MASIA
## Bivariate copula: Gaussian (par = 0.11, tau = 0.07)
## Family
## ------
## No: 1
## Name: Gaussian
##
## Parameter(s)
## ------------
## par: 0.11 (SE = 0.03)
##
## Dependence measures
## -------------------
## Kendall's tau: 0.07 (empirical = 0.06, p value < 0.01)
## Upper TD: 0
## Lower TD: 0
##
## Fit statistics
## --------------
## logLik: 5.56
## AIC: -9.11
## BIC: -4.22
SP500 - MSM30
## Bivariate copula: t (par = 0.07, par2 = 6.12, tau = 0.04)
## Family
## ------
## No: 2
## Name: t
##
## Parameter(s)
## ------------
## par: 0.07 (SE = 0.04)
## par2: 6.12 (SE = 1.41)
## Dependence measures
## -------------------
## Kendall's tau: 0.04 (empirical = 0.05, p value = 0.03)
## Upper TD: 0.04
## Lower TD: 0.04
##
## Fit statistics
## --------------
## logLik: 14.45
## AIC: -24.89
## BIC: -15.12
TRONG COVID
CN3_COPULA = read_excel("C:\\Users\\84896\\Desktop\\CN3.xlsx", sheet="During")
SP500 <- CN3_COPULA$y
VNI <- CN3_COPULA$x1
MERVAL <- CN3_COPULA$x2
CROBEX <- CN3_COPULA$x3
MASIA <- CN3_COPULA$x4
MSM30 <- CN3_COPULA$x5MÔ HÌNH GJR-GARCH PHÙ HỢP
SP500
a22.SP500.garch21s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(2, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "std")
a22.SP500.garch21s.fit <- ugarchfit(spec = a22.SP500.garch21s.spec,SP500)
a22.SP500.garch21s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(2,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.181453 0.000858 2.1158e+02 0.000000
## ar1 -1.486892 0.001183 -1.2570e+03 0.000000
## ar2 -0.519675 0.000600 -8.6630e+02 0.000000
## ma1 1.452378 0.000214 6.7806e+03 0.000000
## ma2 0.438588 0.000392 1.1200e+03 0.000000
## omega 0.058056 0.029884 1.9427e+00 0.052049
## alpha1 0.000086 0.217669 3.9500e-04 0.999685
## alpha2 0.001120 0.158342 7.0760e-03 0.994354
## beta1 0.835469 0.061267 1.3637e+01 0.000000
## gamma1 0.398927 0.139326 2.8633e+00 0.004193
## gamma2 -0.123406 0.144305 -8.5518e-01 0.392454
## shape 4.154986 0.675306 6.1527e+00 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.181453 0.024168 7.508090 0.000000
## ar1 -1.486892 0.066422 -22.385492 0.000000
## ar2 -0.519675 0.030380 -17.105976 0.000000
## ma1 1.452378 0.016600 87.490910 0.000000
## ma2 0.438588 0.021086 20.799671 0.000000
## omega 0.058056 0.530515 0.109433 0.912859
## alpha1 0.000086 1.417663 0.000061 0.999952
## alpha2 0.001120 2.759797 0.000406 0.999676
## beta1 0.835469 2.345890 0.356142 0.721734
## gamma1 0.398927 4.999152 0.079799 0.936397
## gamma2 -0.123406 2.053582 -0.060093 0.952082
## shape 4.154986 1.198104 3.467968 0.000524
##
## LogLikelihood : -514.2015
##
## Information Criteria
## ------------------------------------
##
## Akaike 3.1699
## Bayes 3.3074
## Shibata 3.1674
## Hannan-Quinn 3.2247
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.7093 0.3997
## Lag[2*(p+q)+(p+q)-1][11] 4.9251 0.9691
## Lag[4*(p+q)+(p+q)-1][19] 8.7914 0.6731
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.01163 0.9141
## Lag[2*(p+q)+(p+q)-1][8] 0.53838 0.9954
## Lag[4*(p+q)+(p+q)-1][14] 0.88745 0.9998
## d.o.f=3
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[4] 0.06472 0.500 2.000 0.7992
## ARCH Lag[6] 0.34830 1.461 1.711 0.9330
## ARCH Lag[8] 0.59047 2.368 1.583 0.9741
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 5.9265
## Individual Statistics:
## mu 0.1485
## ar1 0.1461
## ar2 0.1463
## ma1 0.1474
## ma2 0.1469
## omega 0.1974
## alpha1 0.1381
## alpha2 0.2085
## beta1 0.2128
## gamma1 0.3268
## gamma2 0.1689
## shape 0.1037
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.69 2.96 3.51
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.9908 0.3225
## Negative Sign Bias 0.4583 0.6470
## Positive Sign Bias 0.4991 0.6180
## Joint Effect 2.2999 0.5125
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 17.88 0.53050
## 2 30 30.17 0.40562
## 3 40 46.55 0.18941
## 4 50 65.89 0.05394
##
##
## Elapsed time : 1.108939
VNI
a10.VNI.garch11g.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(1, 0), include.mean = TRUE), distribution.model = "ged")
a10.VNI.garch11g.fit <- ugarchfit(spec = a10.VNI.garch11g.spec,VNI)
a10.VNI.garch11g.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(1,0,0)
## Distribution : ged
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.237188 0.008750 27.1067 0.000000
## ar1 -0.011243 0.001053 -10.6729 0.000000
## omega 0.648506 0.366645 1.7688 0.076934
## alpha1 0.000000 0.124980 0.0000 1.000000
## beta1 0.679827 0.161029 4.2218 0.000024
## gamma1 0.187108 0.157962 1.1845 0.236209
## shape 0.715879 0.071564 10.0033 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.237188 0.002487 95.3893 0.000000
## ar1 -0.011243 0.000065 -172.9858 0.000000
## omega 0.648506 0.277488 2.3371 0.019436
## alpha1 0.000000 0.125732 0.0000 1.000000
## beta1 0.679827 0.123464 5.5063 0.000000
## gamma1 0.187108 0.160469 1.1660 0.243610
## shape 0.715879 0.070535 10.1493 0.000000
##
## LogLikelihood : -582.6352
##
## Information Criteria
## ------------------------------------
##
## Akaike 3.5520
## Bayes 3.6322
## Shibata 3.5512
## Hannan-Quinn 3.5840
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.003355 0.9538
## Lag[2*(p+q)+(p+q)-1][2] 1.123455 0.6641
## Lag[4*(p+q)+(p+q)-1][5] 2.792874 0.4852
## d.o.f=1
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.8426 0.3586
## Lag[2*(p+q)+(p+q)-1][5] 1.8784 0.6474
## Lag[4*(p+q)+(p+q)-1][9] 2.9421 0.7685
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.9878 0.500 2.000 0.3203
## ARCH Lag[5] 1.5611 1.440 1.667 0.5764
## ARCH Lag[7] 2.2481 2.315 1.543 0.6649
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 2.2035
## Individual Statistics:
## mu 0.11266
## ar1 0.67830
## omega 0.21361
## alpha1 0.06659
## beta1 0.35821
## gamma1 0.21121
## shape 0.10362
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 1.69 1.9 2.35
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.07575 0.9397
## Negative Sign Bias 0.63398 0.5265
## Positive Sign Bias 0.62270 0.5339
## Joint Effect 0.82730 0.8429
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 35.11 0.01355
## 2 30 46.98 0.01872
## 3 40 61.73 0.01165
## 4 50 69.51 0.02854
##
##
## Elapsed time : 2.053163
MERVAL
a22.MERVAL.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "std")
a22.MERVAL.garch11s.fit <- ugarchfit(spec = a22.MERVAL.garch11s.spec,MERVAL)
a22.MERVAL.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.100539 0.146029 0.68849 0.491144
## ar1 -1.082255 0.003652 -296.35464 0.000000
## ar2 -1.000131 0.010475 -95.48015 0.000000
## ma1 1.100175 0.000899 1223.81352 0.000000
## ma2 1.012412 0.001409 718.74137 0.000000
## omega 0.253077 0.175617 1.44107 0.149564
## alpha1 0.000000 0.029935 0.00000 1.000000
## beta1 0.939282 0.036539 25.70658 0.000000
## gamma1 0.093008 0.048070 1.93485 0.053009
## shape 3.894813 0.979950 3.97450 0.000071
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.100539 0.160311 0.62715 0.530558
## ar1 -1.082255 0.009845 -109.92635 0.000000
## ar2 -1.000131 0.024539 -40.75733 0.000000
## ma1 1.100175 0.005504 199.90060 0.000000
## ma2 1.012412 0.004610 219.62726 0.000000
## omega 0.253077 0.335926 0.75337 0.451228
## alpha1 0.000000 0.063280 0.00000 1.000000
## beta1 0.939282 0.059371 15.82061 0.000000
## gamma1 0.093008 0.060375 1.54052 0.123435
## shape 3.894813 0.995455 3.91259 0.000091
##
## LogLikelihood : -838.7228
##
## Information Criteria
## ------------------------------------
##
## Akaike 5.1128
## Bayes 5.2274
## Shibata 5.1110
## Hannan-Quinn 5.1585
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.02426 0.8762
## Lag[2*(p+q)+(p+q)-1][11] 4.66258 0.9912
## Lag[4*(p+q)+(p+q)-1][19] 8.47132 0.7246
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.02031 0.8867
## Lag[2*(p+q)+(p+q)-1][5] 0.88397 0.8853
## Lag[4*(p+q)+(p+q)-1][9] 7.12247 0.1891
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.2180 0.500 2.000 0.6406
## ARCH Lag[5] 0.4833 1.440 1.667 0.8886
## ARCH Lag[7] 7.2497 2.315 1.543 0.0767
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 0.9222
## Individual Statistics:
## mu 0.06971
## ar1 0.03543
## ar2 0.10260
## ma1 0.06582
## ma2 0.05907
## omega 0.07436
## alpha1 0.10132
## beta1 0.09768
## gamma1 0.20331
## shape 0.11479
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.29 2.54 3.05
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.05245 0.9582
## Negative Sign Bias 0.37134 0.7106
## Positive Sign Bias 1.06624 0.2871
## Joint Effect 2.42266 0.4894
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 27.76 0.08818
## 2 30 46.07 0.02308
## 3 40 40.77 0.39247
## 4 50 49.93 0.43627
##
##
## Elapsed time : 1.247425
CROBEX
a22.CROBEX.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "std")
a22.CROBEX.garch11s.fit <- ugarchfit(spec = a22.CROBEX.garch11s.spec,CROBEX)
a22.CROBEX.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.070039 0.029655 2.36180 0.018186
## ar1 -1.447073 0.016331 -88.60895 0.000000
## ar2 -0.948452 0.012129 -78.19475 0.000000
## ma1 1.484790 0.004076 364.23480 0.000000
## ma2 0.999979 0.001479 676.19718 0.000000
## omega 0.125313 0.097082 1.29079 0.196775
## alpha1 0.120746 0.122258 0.98764 0.323331
## beta1 0.832705 0.071926 11.57725 0.000000
## gamma1 0.091099 0.159732 0.57032 0.568459
## shape 2.315662 0.253247 9.14387 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.070039 0.033610 2.08384 0.037175
## ar1 -1.447073 0.068144 -21.23557 0.000000
## ar2 -0.948452 0.053620 -17.68839 0.000000
## ma1 1.484790 0.017094 86.85796 0.000000
## ma2 0.999979 0.006296 158.82585 0.000000
## omega 0.125313 0.104755 1.19625 0.231601
## alpha1 0.120746 0.108559 1.11227 0.266023
## beta1 0.832705 0.074619 11.15947 0.000000
## gamma1 0.091099 0.201802 0.45143 0.651682
## shape 2.315662 0.360184 6.42911 0.000000
##
## LogLikelihood : -354.9405
##
## Information Criteria
## ------------------------------------
##
## Akaike 2.1984
## Bayes 2.3130
## Shibata 2.1967
## Hannan-Quinn 2.2441
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 1.62 0.203043
## Lag[2*(p+q)+(p+q)-1][11] 12.75 0.000000
## Lag[4*(p+q)+(p+q)-1][19] 17.61 0.003513
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.1115 7.384e-01
## Lag[2*(p+q)+(p+q)-1][5] 0.3135 9.823e-01
## Lag[4*(p+q)+(p+q)-1][9] 28.7394 9.631e-07
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.2308 0.500 2.000 6.309e-01
## ARCH Lag[5] 0.3750 1.440 1.667 9.197e-01
## ARCH Lag[7] 35.8519 2.315 1.543 4.548e-09
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 2.149
## Individual Statistics:
## mu 0.29127
## ar1 0.06141
## ar2 0.04369
## ma1 0.32931
## ma2 0.07388
## omega 0.27894
## alpha1 0.24204
## beta1 0.28490
## gamma1 0.23041
## shape 0.23172
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.29 2.54 3.05
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 1.16124 0.2464
## Negative Sign Bias 0.04888 0.9610
## Positive Sign Bias 0.17941 0.8577
## Joint Effect 1.63410 0.6517
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 16.67 0.6119
## 2 30 33.06 0.2753
## 3 40 40.53 0.4027
## 4 50 49.02 0.4722
##
##
## Elapsed time : 1.395093
MASIA
a22.MASIA.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "std")
a22.MASIA.garch11s.fit <- ugarchfit(spec = a22.MASIA.garch11s.spec,MASIA)
a22.MASIA.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.080296 0.029514 2.72055 0.006517
## ar1 -1.823565 0.021649 -84.23504 0.000000
## ar2 -0.854700 0.023917 -35.73618 0.000000
## ma1 1.880464 0.000283 6646.97641 0.000000
## ma2 0.918420 0.002466 372.39799 0.000000
## omega 0.037877 0.023260 1.62844 0.103432
## alpha1 0.123762 0.106325 1.16399 0.244426
## beta1 0.842473 0.054703 15.40077 0.000000
## gamma1 0.052962 0.104932 0.50473 0.613749
## shape 2.754975 0.392026 7.02753 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.080296 0.035456 2.26467 0.023533
## ar1 -1.823565 0.023784 -76.67162 0.000000
## ar2 -0.854700 0.027585 -30.98448 0.000000
## ma1 1.880464 0.000160 11755.38887 0.000000
## ma2 0.918420 0.003348 274.30738 0.000000
## omega 0.037877 0.029186 1.29779 0.194360
## alpha1 0.123762 0.146930 0.84232 0.399608
## beta1 0.842473 0.088471 9.52264 0.000000
## gamma1 0.052962 0.123769 0.42791 0.668716
## shape 2.754975 0.379396 7.26147 0.000000
##
## LogLikelihood : -361.1834
##
## Information Criteria
## ------------------------------------
##
## Akaike 2.2360
## Bayes 2.3507
## Shibata 2.2343
## Hannan-Quinn 2.2818
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.002122 0.9633
## Lag[2*(p+q)+(p+q)-1][11] 6.572118 0.1702
## Lag[4*(p+q)+(p+q)-1][19] 10.574801 0.3761
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.0002034 0.9886
## Lag[2*(p+q)+(p+q)-1][5] 2.0871722 0.5980
## Lag[4*(p+q)+(p+q)-1][9] 3.2700955 0.7137
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.7788 0.500 2.000 0.3775
## ARCH Lag[5] 3.5618 1.440 1.667 0.2180
## ARCH Lag[7] 3.7948 2.315 1.543 0.3771
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 2.0985
## Individual Statistics:
## mu 0.2252
## ar1 0.2537
## ar2 0.2326
## ma1 0.1394
## ma2 0.1367
## omega 0.1659
## alpha1 0.5201
## beta1 0.2375
## gamma1 0.8817
## shape 0.5036
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.29 2.54 3.05
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.4352 0.6637
## Negative Sign Bias 0.3238 0.7463
## Positive Sign Bias 0.7059 0.4808
## Joint Effect 0.6032 0.8957
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 24.75 0.1690
## 2 30 37.04 0.1453
## 3 40 42.94 0.3061
## 4 50 54.75 0.2656
##
##
## Elapsed time : 0.8016829
MSM30
a21.MSM30.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 1), include.mean = TRUE), distribution.model = "std")
a21.MSM30.garch11s.fit <- ugarchfit(spec = a21.MSM30.garch11s.spec,MSM30)
a21.MSM30.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,1)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.052474 0.034466 1.5225 0.127888
## ar1 -0.260719 0.258716 -1.0077 0.313579
## ar2 0.216652 0.058745 3.6880 0.000226
## ma1 0.448288 0.264216 1.6967 0.089758
## omega 0.056542 0.032994 1.7137 0.086581
## alpha1 0.370886 0.239101 1.5512 0.120861
## beta1 0.697935 0.123046 5.6721 0.000000
## gamma1 -0.273140 0.222011 -1.2303 0.218584
## shape 3.131114 0.512159 6.1136 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.052474 0.040279 1.3028 0.192649
## ar1 -0.260719 0.238601 -1.0927 0.274526
## ar2 0.216652 0.052795 4.1036 0.000041
## ma1 0.448288 0.250588 1.7889 0.073624
## omega 0.056542 0.031843 1.7756 0.075795
## alpha1 0.370886 0.249664 1.4855 0.137400
## beta1 0.697935 0.120128 5.8099 0.000000
## gamma1 -0.273140 0.224338 -1.2175 0.223399
## shape 3.131114 0.576636 5.4300 0.000000
##
## LogLikelihood : -278.6484
##
## Information Criteria
## ------------------------------------
##
## Akaike 1.7328
## Bayes 1.8360
## Shibata 1.7314
## Hannan-Quinn 1.7740
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.1274 0.7212
## Lag[2*(p+q)+(p+q)-1][8] 2.6537 0.9998
## Lag[4*(p+q)+(p+q)-1][14] 5.0280 0.8946
## d.o.f=3
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.01102 0.9164
## Lag[2*(p+q)+(p+q)-1][5] 0.03564 0.9998
## Lag[4*(p+q)+(p+q)-1][9] 0.13664 1.0000
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 5.958e-09 0.500 2.000 0.9999
## ARCH Lag[5] 2.460e-02 1.440 1.667 0.9982
## ARCH Lag[7] 1.247e-01 2.315 1.543 0.9990
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 2.0251
## Individual Statistics:
## mu 0.23878
## ar1 0.87775
## ar2 0.10179
## ma1 0.96579
## omega 0.07482
## alpha1 0.21283
## beta1 0.08992
## gamma1 0.24148
## shape 0.06410
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.1 2.32 2.82
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.9733 0.3311
## Negative Sign Bias 0.8589 0.3910
## Positive Sign Bias 0.1751 0.8611
## Joint Effect 1.3368 0.7204
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 19.33 0.4362
## 2 30 26.37 0.6055
## 3 40 44.87 0.2394
## 4 50 45.41 0.6195
##
##
## Elapsed time : 0.4752638
CHUẨN HÓA MÔ HÌNH BIÊN DUYÊN
SP500
SP500.res <- residuals(a22.SP500.garch21s.fit)/sigma(a22.SP500.garch21s.fit)
fitdist(distribution = "std", SP500.res, control = list())$pars## mu sigma shape
## 0.00657977 0.99539435 4.08866461
VNI
VNI.res <- residuals(a10.VNI.garch11g.fit)/sigma(a10.VNI.garch11g.fit)
fitdist(distribution = "ged", VNI.res, control = list())$pars## mu sigma shape
## -0.004231206 0.997282602 0.717814048
MERVAL
MERVAL.res <- residuals(a22.MERVAL.garch11s.fit)/sigma(a22.MERVAL.garch11s.fit)
fitdist(distribution = "std", MERVAL.res, control = list())$pars## mu sigma shape
## 0.01737988 0.97724159 4.10745139
CROBEX
CROBEX.res <- residuals(a22.CROBEX.garch11s.fit)/sigma(a22.CROBEX.garch11s.fit)
fitdist(distribution = "std", CROBEX.res, control = list())$pars## mu sigma shape
## 0.001538027 0.894284439 2.421654254
MASIA
MASIA.res <- residuals(a22.MASIA.garch11s.fit)/sigma(a22.MASIA.garch11s.fit)
fitdist(distribution = "std", MASIA.res, control = list())$pars## mu sigma shape
## -0.007768722 1.100005763 2.566381306
COPULA
SP500 - VNI
## Bivariate copula: BB7 (par = 1.13, par2 = 0.14, tau = 0.13)
## Family
## ------
## No: 9
## Name: BB7
##
## Parameter(s)
## ------------
## par: 1.13 (SE = 0.07)
## par2: 0.14 (SE = 0.06)
## Dependence measures
## -------------------
## Kendall's tau: 0.13 (empirical = 0.08, p value = 0.03)
## Upper TD: 0.16
## Lower TD: 0.01
##
## Fit statistics
## --------------
## logLik: 9.11
## AIC: -14.22
## BIC: -6.61
SP500 - MERVAL
## Bivariate copula: BB7 (par = 1.2, par2 = 0.33, tau = 0.22)
## Family
## ------
## No: 9
## Name: BB7
##
## Parameter(s)
## ------------
## par: 1.2 (SE = 0.08)
## par2: 0.33 (SE = 0.08)
## Dependence measures
## -------------------
## Kendall's tau: 0.22 (empirical = 0.22, p value < 0.01)
## Upper TD: 0.22
## Lower TD: 0.12
##
## Fit statistics
## --------------
## logLik: 25.21
## AIC: -46.41
## BIC: -38.8
SP500 - CROBEX
## Bivariate copula: Survival Gumbel (par = 1.19, tau = 0.16)
## Family
## ------
## No: 14
## Name: Survival Gumbel
##
## Parameter(s)
## ------------
## par: 1.19 (SE = 0.04)
##
## Dependence measures
## -------------------
## Kendall's tau: 0.16 (empirical = 0.15, p value < 0.01)
## Upper TD: 0
## Lower TD: 0.21
##
## Fit statistics
## --------------
## logLik: 19.07
## AIC: -36.14
## BIC: -32.33
SP500 - MASIA
## Bivariate copula: Survival Joe (par = 1.11, tau = 0.06)
## Family
## ------
## No: 16
## Name: Survival Joe
##
## Parameter(s)
## ------------
## par: 1.11 (SE = 0.05)
##
## Dependence measures
## -------------------
## Kendall's tau: 0.06 (empirical = 0.07, p value = 0.07)
## Upper TD: 0
## Lower TD: 0.13
##
## Fit statistics
## --------------
## logLik: 4.9
## AIC: -7.79
## BIC: -3.99
SP500 - MSM30
## Bivariate copula: t (par = 0.11, par2 = 7.62, tau = 0.07)
## Family
## ------
## No: 2
## Name: t
##
## Parameter(s)
## ------------
## par: 0.11 (SE = 0.06)
## par2: 7.62 (SE = 3.57)
## Dependence measures
## -------------------
## Kendall's tau: 0.07 (empirical = 0.07, p value = 0.06)
## Upper TD: 0.03
## Lower TD: 0.03
##
## Fit statistics
## --------------
## logLik: 6.06
## AIC: -8.12
## BIC: -0.51
SAU COVID
CN3_COPULA = read_excel("C:\\Users\\84896\\Desktop\\CN3.xlsx", sheet="After")
SP500 <- CN3_COPULA$y
VNI <- CN3_COPULA$x1
MERVAL <- CN3_COPULA$x2
CROBEX <- CN3_COPULA$x3
MASIA <- CN3_COPULA$x4
MSM30 <- CN3_COPULA$x5MÔ HÌNH GJR-GARCH PHÙ HỢP
SP500
a22.SP500.garch11ss.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "sstd")
a22.SP500.garch11ss.fit <- ugarchfit(spec = a22.SP500.garch11ss.spec,SP500)
a22.SP500.garch11ss.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : sstd
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.097506 0.058616 1.66347 0.096218
## ar1 0.602826 0.000638 944.56844 0.000000
## ar2 -1.009258 0.000739 -1365.45294 0.000000
## ma1 -0.603811 0.000744 -811.37326 0.000000
## ma2 1.007919 0.000645 1561.74859 0.000000
## omega 0.006344 0.011474 0.55292 0.580320
## alpha1 0.000000 0.017136 0.00000 1.000000
## beta1 0.960286 0.010908 88.03715 0.000000
## gamma1 0.057749 0.040186 1.43703 0.150709
## skew 0.856395 0.074846 11.44206 0.000000
## shape 23.143852 20.782433 1.11363 0.265440
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.097506 0.057295 1.70182 0.088789
## ar1 0.602826 0.000515 1170.43036 0.000000
## ar2 -1.009258 0.001132 -891.47060 0.000000
## ma1 -0.603811 0.000550 -1098.27312 0.000000
## ma2 1.007919 0.000944 1068.07878 0.000000
## omega 0.006344 0.015396 0.41207 0.680288
## alpha1 0.000000 0.026244 0.00000 1.000000
## beta1 0.960286 0.023529 40.81324 0.000000
## gamma1 0.057749 0.053524 1.07894 0.280613
## skew 0.856395 0.081088 10.56129 0.000000
## shape 23.143852 21.084594 1.09767 0.272350
##
## LogLikelihood : -626.5523
##
## Information Criteria
## ------------------------------------
##
## Akaike 3.4094
## Bayes 3.5248
## Shibata 3.4077
## Hannan-Quinn 3.4552
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.4788 0.4890
## Lag[2*(p+q)+(p+q)-1][11] 3.7606 1.0000
## Lag[4*(p+q)+(p+q)-1][19] 6.7005 0.9322
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.6082 0.4355
## Lag[2*(p+q)+(p+q)-1][5] 1.6259 0.7089
## Lag[4*(p+q)+(p+q)-1][9] 2.4890 0.8394
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.00941 0.500 2.000 0.9227
## ARCH Lag[5] 0.19872 1.440 1.667 0.9658
## ARCH Lag[7] 0.69770 2.315 1.543 0.9572
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 5.1846
## Individual Statistics:
## mu 0.12921
## ar1 0.04022
## ar2 0.04032
## ma1 0.04135
## ma2 0.04070
## omega 0.03474
## alpha1 0.04002
## beta1 0.04037
## gamma1 0.03872
## skew 0.14851
## shape 0.18951
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.49 2.75 3.27
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.9894 0.3231
## Negative Sign Bias 0.5337 0.5939
## Positive Sign Bias 0.7649 0.4448
## Joint Effect 1.0534 0.7883
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 12.84 0.8464
## 2 30 25.14 0.6707
## 3 40 31.35 0.8034
## 4 50 41.78 0.7583
##
##
## Elapsed time : 1.637359
VNI
a22.VNI.garch11sg.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "sged")
a22.VNI.garch11sg.fit <- ugarchfit(spec = a22.VNI.garch11sg.spec,VNI)
a22.VNI.garch11sg.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : sged
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.025572 0.007030 3.6378 0.000275
## ar1 0.393133 0.004355 90.2627 0.000000
## ar2 -0.931927 0.014611 -63.7825 0.000000
## ma1 -0.432532 0.004119 -105.0213 0.000000
## ma2 0.901083 0.024682 36.5081 0.000000
## omega 0.121363 0.014180 8.5588 0.000000
## alpha1 0.021786 0.005748 3.7899 0.000151
## beta1 0.858664 0.012170 70.5538 0.000000
## gamma1 0.113890 0.018235 6.2457 0.000000
## skew 0.778491 0.021808 35.6982 0.000000
## shape 1.097015 0.084706 12.9508 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.025572 0.002654 9.6365 0
## ar1 0.393133 0.017212 22.8402 0
## ar2 -0.931927 0.045753 -20.3687 0
## ma1 -0.432532 0.015070 -28.7007 0
## ma2 0.901083 0.062750 14.3600 0
## omega 0.121363 0.004400 27.5807 0
## alpha1 0.021786 0.001476 14.7609 0
## beta1 0.858664 0.011620 73.8952 0
## gamma1 0.113890 0.006719 16.9494 0
## skew 0.778491 0.047969 16.2291 0
## shape 1.097015 0.051001 21.5095 0
##
## LogLikelihood : -655.5471
##
## Information Criteria
## ------------------------------------
##
## Akaike 3.5644
## Bayes 3.6798
## Shibata 3.5628
## Hannan-Quinn 3.6102
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.6194 0.4313
## Lag[2*(p+q)+(p+q)-1][11] 3.0196 1.0000
## Lag[4*(p+q)+(p+q)-1][19] 7.2630 0.8834
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 2.682 0.1015
## Lag[2*(p+q)+(p+q)-1][5] 3.130 0.3838
## Lag[4*(p+q)+(p+q)-1][9] 5.083 0.4172
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.3268 0.500 2.000 0.5676
## ARCH Lag[5] 0.9823 1.440 1.667 0.7382
## ARCH Lag[7] 2.7500 2.315 1.543 0.5619
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.5849
## Individual Statistics:
## mu 0.40254
## ar1 0.25584
## ar2 0.04420
## ma1 0.21499
## ma2 0.04032
## omega 0.03723
## alpha1 0.09136
## beta1 0.06636
## gamma1 0.04367
## skew 0.08770
## shape 0.03273
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.49 2.75 3.27
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 1.210 0.2271
## Negative Sign Bias 1.210 0.2272
## Positive Sign Bias 1.019 0.3087
## Joint Effect 4.855 0.1827
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 8.032 0.9863
## 2 30 20.813 0.8659
## 3 40 26.642 0.9338
## 4 50 35.626 0.9235
##
##
## Elapsed time : 1.756379
MERVAL
a22.MERVAL.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 2), include.mean = TRUE), distribution.model = "std")
a22.MERVAL.garch11s.fit <- ugarchfit(spec = a22.MERVAL.garch11s.spec,MERVAL)
a22.MERVAL.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,2)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.633462 0.134580 4.70694 0.000003
## ar1 -1.176512 0.084812 -13.87208 0.000000
## ar2 -0.829896 0.162877 -5.09523 0.000000
## ma1 1.217303 0.086399 14.08930 0.000000
## ma2 0.803423 0.155319 5.17273 0.000000
## omega 0.088333 0.227194 0.38880 0.697423
## alpha1 0.029206 0.022329 1.30797 0.190884
## beta1 1.000000 0.002489 401.84366 0.000000
## gamma1 -0.060412 0.094731 -0.63772 0.523654
## shape 2.419868 0.177401 13.64063 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.633462 0.162792 3.89123 0.000100
## ar1 -1.176512 0.092396 -12.73342 0.000000
## ar2 -0.829896 0.377641 -2.19758 0.027979
## ma1 1.217303 0.068031 17.89339 0.000000
## ma2 0.803423 0.349841 2.29654 0.021645
## omega 0.088333 0.598596 0.14757 0.882684
## alpha1 0.029206 0.060745 0.48080 0.630661
## beta1 1.000000 0.006411 155.99163 0.000000
## gamma1 -0.060412 0.229466 -0.26327 0.792341
## shape 2.419868 0.257126 9.41121 0.000000
##
## LogLikelihood : -970.7406
##
## Information Criteria
## ------------------------------------
##
## Akaike 5.2446
## Bayes 5.3495
## Shibata 5.2432
## Hannan-Quinn 5.2863
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.2989 0.5846
## Lag[2*(p+q)+(p+q)-1][11] 4.3209 0.9989
## Lag[4*(p+q)+(p+q)-1][19] 6.8656 0.9196
## d.o.f=4
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.8427 0.3586
## Lag[2*(p+q)+(p+q)-1][5] 0.9784 0.8645
## Lag[4*(p+q)+(p+q)-1][9] 1.3961 0.9636
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.1716 0.500 2.000 0.6787
## ARCH Lag[5] 0.1994 1.440 1.667 0.9657
## ARCH Lag[7] 0.3861 2.315 1.543 0.9875
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 2.1
## Individual Statistics:
## mu 0.13839
## ar1 0.09639
## ar2 0.08580
## ma1 0.07816
## ma2 0.10213
## omega 0.11535
## alpha1 0.13770
## beta1 0.13253
## gamma1 0.13363
## shape 0.11344
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.29 2.54 3.05
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 1.2708 0.2046
## Negative Sign Bias 0.2654 0.7908
## Positive Sign Bias 0.5395 0.5899
## Joint Effect 3.0013 0.3914
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 11.99 0.8861
## 2 30 28.19 0.5076
## 3 40 39.69 0.4392
## 4 50 37.50 0.8847
##
##
## Elapsed time : 0.795218
CROBEX
a10.CROBEX.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(1, 0), include.mean = TRUE), distribution.model = "std")
a10.CROBEX.garch11s.fit <- ugarchfit(spec = a10.CROBEX.garch11s.spec,CROBEX)
a10.CROBEX.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(1,0,0)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.112552 0.029659 3.79491 0.000148
## ar1 -0.009283 0.046444 -0.19988 0.841575
## omega 0.070875 0.046333 1.52969 0.126093
## alpha1 0.118099 0.081512 1.44885 0.147380
## beta1 0.802920 0.090765 8.84614 0.000000
## gamma1 -0.014537 0.083044 -0.17506 0.861034
## shape 3.139557 0.535630 5.86142 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.112552 0.032552 3.45757 0.000545
## ar1 -0.009283 0.041879 -0.22167 0.824574
## omega 0.070875 0.038372 1.84706 0.064739
## alpha1 0.118099 0.074779 1.57931 0.114266
## beta1 0.802920 0.080941 9.91981 0.000000
## gamma1 -0.014537 0.083545 -0.17401 0.861860
## shape 3.139557 0.457662 6.85999 0.000000
##
## LogLikelihood : -395.5627
##
## Information Criteria
## ------------------------------------
##
## Akaike 2.1527
## Bayes 2.2262
## Shibata 2.1521
## Hannan-Quinn 2.1819
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.004901 0.9442
## Lag[2*(p+q)+(p+q)-1][2] 0.164400 0.9995
## Lag[4*(p+q)+(p+q)-1][5] 2.731846 0.5017
## d.o.f=1
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.5809 0.4460
## Lag[2*(p+q)+(p+q)-1][5] 1.8089 0.6642
## Lag[4*(p+q)+(p+q)-1][9] 2.8501 0.7834
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 1.582 0.500 2.000 0.2085
## ARCH Lag[5] 2.000 1.440 1.667 0.4712
## ARCH Lag[7] 2.317 2.315 1.543 0.6505
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.2526
## Individual Statistics:
## mu 0.29512
## ar1 0.14626
## omega 0.07811
## alpha1 0.04797
## beta1 0.11702
## gamma1 0.09695
## shape 0.05193
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 1.69 1.9 2.35
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 0.08796 0.9300
## Negative Sign Bias 0.75148 0.4528
## Positive Sign Bias 0.07973 0.9365
## Joint Effect 0.63278 0.8889
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 15.20 0.7099
## 2 30 27.39 0.5507
## 3 40 32.20 0.7712
## 4 50 43.38 0.6995
##
##
## Elapsed time : 0.7270329
MASIA
a10.MASIA.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(1, 0), include.mean = TRUE), distribution.model = "std")
a10.MASIA.garch11s.fit <- ugarchfit(spec = a10.MASIA.garch11s.spec,MASIA)
a10.MASIA.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(1,0,0)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu 0.025691 0.041381 0.62086 0.534695
## ar1 0.261380 0.050388 5.18737 0.000000
## omega 0.090422 0.038204 2.36680 0.017943
## alpha1 0.045023 0.054453 0.82682 0.408340
## beta1 0.700821 0.075653 9.26368 0.000000
## gamma1 0.336843 0.145534 2.31453 0.020639
## shape 3.448966 0.657895 5.24243 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu 0.025691 0.041771 0.61506 0.538518
## ar1 0.261380 0.058024 4.50469 0.000007
## omega 0.090422 0.037443 2.41490 0.015740
## alpha1 0.045023 0.043192 1.04239 0.297229
## beta1 0.700821 0.066523 10.53501 0.000000
## gamma1 0.336843 0.130360 2.58394 0.009768
## shape 3.448966 0.664387 5.19120 0.000000
##
## LogLikelihood : -411.9384
##
## Information Criteria
## ------------------------------------
##
## Akaike 2.2403
## Bayes 2.3138
## Shibata 2.2396
## Hannan-Quinn 2.2695
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.4802 0.4883
## Lag[2*(p+q)+(p+q)-1][2] 1.0325 0.7203
## Lag[4*(p+q)+(p+q)-1][5] 2.3525 0.6088
## d.o.f=1
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 0.09859 0.7535
## Lag[2*(p+q)+(p+q)-1][5] 0.38183 0.9743
## Lag[4*(p+q)+(p+q)-1][9] 0.54719 0.9979
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.2408 0.500 2.000 0.6236
## ARCH Lag[5] 0.4506 1.440 1.667 0.8981
## ARCH Lag[7] 0.5077 2.315 1.543 0.9777
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 1.1733
## Individual Statistics:
## mu 0.08721
## ar1 0.23687
## omega 0.04723
## alpha1 0.04041
## beta1 0.05721
## gamma1 0.25928
## shape 0.04922
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 1.69 1.9 2.35
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 1.1977 0.2318
## Negative Sign Bias 1.0437 0.2973
## Positive Sign Bias 0.1276 0.8985
## Joint Effect 2.1084 0.5502
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 25.36 0.1491
## 2 30 32.04 0.3180
## 3 40 38.83 0.4774
## 4 50 58.35 0.1693
##
##
## Elapsed time : 0.3400378
MSM30
a21.MSM30.garch11s.spec <- ugarchspec(variance.model = list(model = "gjrGARCH", garchOrder = c(1, 1)),mean.model = list(armaOrder = c(2, 1), include.mean = TRUE), distribution.model = "std")
a21.MSM30.garch11s.fit <- ugarchfit(spec = a21.MSM30.garch11s.spec,MSM30)
a21.MSM30.garch11s.fit##
## *---------------------------------*
## * GARCH Model Fit *
## *---------------------------------*
##
## Conditional Variance Dynamics
## -----------------------------------
## GARCH Model : gjrGARCH(1,1)
## Mean Model : ARFIMA(2,0,1)
## Distribution : std
##
## Optimal Parameters
## ------------------------------------
## Estimate Std. Error t value Pr(>|t|)
## mu -0.004369 0.003379 -1.2930 0.196002
## ar1 0.416076 0.253985 1.6382 0.101382
## ar2 0.072511 0.059084 1.2273 0.219728
## ma1 -0.305675 0.256285 -1.1927 0.232981
## omega 0.006470 0.001061 6.0956 0.000000
## alpha1 0.010452 0.004273 2.4462 0.014437
## beta1 1.000000 0.000103 9732.7367 0.000000
## gamma1 -0.061825 0.002953 -20.9367 0.000000
## shape 4.133617 0.731432 5.6514 0.000000
##
## Robust Standard Errors:
## Estimate Std. Error t value Pr(>|t|)
## mu -0.004369 0.010163 -0.42991 0.667263
## ar1 0.416076 0.210979 1.97212 0.048596
## ar2 0.072511 0.046626 1.55517 0.119906
## ma1 -0.305675 0.217791 -1.40353 0.160460
## omega 0.006470 0.000825 7.84296 0.000000
## alpha1 0.010452 0.002384 4.38460 0.000012
## beta1 1.000000 0.000113 8872.79687 0.000000
## gamma1 -0.061825 0.002007 -30.80292 0.000000
## shape 4.133617 0.651500 6.34477 0.000000
##
## LogLikelihood : -351.9828
##
## Information Criteria
## ------------------------------------
##
## Akaike 1.9304
## Bayes 2.0248
## Shibata 1.9293
## Hannan-Quinn 1.9679
##
## Weighted Ljung-Box Test on Standardized Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 1.203 0.2727
## Lag[2*(p+q)+(p+q)-1][8] 2.689 0.9997
## Lag[4*(p+q)+(p+q)-1][14] 5.087 0.8877
## d.o.f=3
## H0 : No serial correlation
##
## Weighted Ljung-Box Test on Standardized Squared Residuals
## ------------------------------------
## statistic p-value
## Lag[1] 1.489 0.2224
## Lag[2*(p+q)+(p+q)-1][5] 2.157 0.5819
## Lag[4*(p+q)+(p+q)-1][9] 2.650 0.8150
## d.o.f=2
##
## Weighted ARCH LM Tests
## ------------------------------------
## Statistic Shape Scale P-Value
## ARCH Lag[3] 0.1812 0.500 2.000 0.6703
## ARCH Lag[5] 0.3514 1.440 1.667 0.9263
## ARCH Lag[7] 0.6542 2.315 1.543 0.9624
##
## Nyblom stability test
## ------------------------------------
## Joint Statistic: 3.7359
## Individual Statistics:
## mu 0.05672
## ar1 0.29892
## ar2 0.12931
## ma1 0.34666
## omega 0.05661
## alpha1 0.05703
## beta1 0.05507
## gamma1 0.05538
## shape 0.15320
##
## Asymptotic Critical Values (10% 5% 1%)
## Joint Statistic: 2.1 2.32 2.82
## Individual Statistic: 0.35 0.47 0.75
##
## Sign Bias Test
## ------------------------------------
## t-value prob sig
## Sign Bias 1.2108 0.2267
## Negative Sign Bias 0.8022 0.4230
## Positive Sign Bias 0.8340 0.4048
## Joint Effect 4.3770 0.2235
##
##
## Adjusted Pearson Goodness-of-Fit Test:
## ------------------------------------
## group statistic p-value(g-1)
## 1 20 27.71 0.08915
## 2 30 35.25 0.19641
## 3 40 42.04 0.34052
## 4 50 65.04 0.06219
##
##
## Elapsed time : 0.5953791
CHUẨN HÓA MÔ HÌNH BIÊN DUYÊN
SP500
SP500.res <- residuals(a22.SP500.garch11ss.fit)/sigma(a22.SP500.garch11ss.fit)
fitdist(distribution = "sstd", SP500.res, control = list())$pars## mu sigma skew shape
## -0.03309969 1.01004481 0.85243420 23.07041049
VNI
VNI.res <- residuals(a22.VNI.garch11sg.fit)/sigma(a22.VNI.garch11sg.fit)
fitdist(distribution = "sged", VNI.res, control = list())$pars## mu sigma skew shape
## -0.02628145 1.01366810 0.76521380 1.09584922
MERVAL
MERVAL.res <- residuals(a22.MERVAL.garch11s.fit)/sigma(a22.MERVAL.garch11s.fit)
fitdist(distribution = "std", MERVAL.res, control = list())$pars## mu sigma shape
## 0.002463484 0.708820573 3.286986279
CROBEX
CROBEX.res <- residuals(a10.CROBEX.garch11s.fit)/sigma(a10.CROBEX.garch11s.fit)
fitdist(distribution = "std", CROBEX.res, control = list())$pars## mu sigma shape
## 0.002249163 1.042910819 2.984126381
MASIA
MASIA.res <- residuals(a10.MASIA.garch11s.fit)/sigma(a10.MASIA.garch11s.fit)
fitdist(distribution = "std", MASIA.res, control = list())$pars## mu sigma shape
## 0.0002867923 1.0144706997 3.3698767024
COPULA
SP500 - VNI
## Bivariate copula: Survival Joe (par = 1.16, tau = 0.08)
## Family
## ------
## No: 16
## Name: Survival Joe
##
## Parameter(s)
## ------------
## par: 1.16 (SE = 0.05)
##
## Dependence measures
## -------------------
## Kendall's tau: 0.08 (empirical = 0.08, p value = 0.03)
## Upper TD: 0
## Lower TD: 0.18
##
## Fit statistics
## --------------
## logLik: 7.67
## AIC: -13.35
## BIC: -9.42
SP500 - MERVAL
## Bivariate copula: t (par = 0.33, par2 = 8.45, tau = 0.21)
## Family
## ------
## No: 2
## Name: t
##
## Parameter(s)
## ------------
## par: 0.33 (SE = 0.05)
## par2: 8.45 (SE = 4.24)
## Dependence measures
## -------------------
## Kendall's tau: 0.21 (empirical = 0.22, p value < 0.01)
## Upper TD: 0.06
## Lower TD: 0.06
##
## Fit statistics
## --------------
## logLik: 23.28
## AIC: -42.55
## BIC: -34.7
SP500 - CROBEX
## Bivariate copula: Survival Gumbel (par = 1.12, tau = 0.11)
## Family
## ------
## No: 14
## Name: Survival Gumbel
##
## Parameter(s)
## ------------
## par: 1.12 (SE = 0.04)
##
## Dependence measures
## -------------------
## Kendall's tau: 0.11 (empirical = 0.11, p value < 0.01)
## Upper TD: 0
## Lower TD: 0.14
##
## Fit statistics
## --------------
## logLik: 7.93
## AIC: -13.86
## BIC: -9.93
SP500 - MASIA
## Bivariate copula: Gaussian (par = 0.08, tau = 0.05)
## Family
## ------
## No: 1
## Name: Gaussian
##
## Parameter(s)
## ------------
## par: 0.08 (SE = 0.05)
##
## Dependence measures
## -------------------
## Kendall's tau: 0.05 (empirical = 0.04, p value = 0.23)
## Upper TD: 0
## Lower TD: 0
##
## Fit statistics
## --------------
## logLik: 1.08
## AIC: -0.16
## BIC: 3.77
SP500 - MSM30
## Bivariate copula: Rotated Joe 270 degrees (par = -1.06, tau = -0.03)
## Family
## ------
## No: 36
## Name: Rotated Joe 270 degrees
##
## Parameter(s)
## ------------
## par: -1.06 (SE = 0.05)
##
## Dependence measures
## -------------------
## Kendall's tau: -0.03 (empirical = 0, p value = 0.96)
## Upper TD: 0
## Lower TD: 0
##
## Fit statistics
## --------------
## logLik: 1.13
## AIC: -0.27
## BIC: 3.66