经管之家送您一份
应届毕业生专属福利!
求职就业群
感谢您参与论坛问题回答
经管之家送您两个论坛币!
+2 论坛币
先说下做这个的初衷。
从做论文以来 一直集中与各种时间序列模型
包括VAR GARCH SV还有各种非线性模型
从最早的一元garch开始做,后面接触到多元garch。一直有两个模型在我脑中挥之不去,BEKK_GARCH DCC_GARCH.
后面看了那个Tsay的书,对这些有点了解。
DCC_GARCH这个早已经掌握,我这个是用R语言实现。(有点跑题了,下次再说这个)
bekk,我也尝试过用R语言,但是美中不足,R语言中,我寻找良久,好像没有*** 厚尾分布的***(T分布,ged分布)。
昨晚睡前,刷手机,又想到了bekk。同时有点失眠,随 起来准备搞他一下。
刚开始,就是下 这个 winrats。一直听说从没用过的软件。随便导入数据,点击bekk,然后就出来结果了。但是这太傻瓜了,得出的只有输出结果,没有各种检验。
经过我昨晚摸索+今下午尝试,终于解决了。
全部内容包括bekk建模,LM test,ARCH test,wald 溢出效应检验。
环境:winrats7.0
代码和输出截图我给到***附录文件****
*注:但是真的这个rats,用的我很烦躁,有时候明明代码没错,一直报错,重启就又可以了,特别是在wald检验哪里,
有时候要1行1行运行,有时候又要一起运行,作为一个R语言loser,真的搞得浑身难受。
数据:A B两个资产收益序列。时间点1130多个。
=================正文==========================================
第一种:直接对收益率建立BEKK——GARCH
==============================================================
MV-GARCH, BEKK - Estimation by BFGS
Convergence in 43 Iterations. Final criterion was 0.0000079 <= 0.0000100
Usable Observations 1137
Log Likelihood -2409.50741583
Variable Coeff Std Error T-Stat Signif
*******************************************************************************
1. Mean(1) -0.60404693 0.02640927 -22.87254 0.00000000
2. Mean(2) -0.56970218 0.02889530 -19.71608 0.00000000
3. C(1,1) 0.38562901 0.03759302 10.25800 0.00000000
4. C(2,1) 0.17613212 0.02967763 5.93484 0.00000000
5. C(2,2) 0.15120476 0.05066848 2.98420 0.00284323
6. A(1,1) 0.47447685 0.05020890 9.45005 0.00000000
7. A(1,2) 0.07496893 0.04583801 1.63552 0.10194030
8. A(2,1) 0.11549185 0.03427387 3.36968 0.00075257
9. A(2,2) 0.57723379 0.05605015 10.29852 0.00000000
10. B(1,1) 0.66976423 0.06351397 10.54515 0.00000000
11. B(1,2) -0.16659870 0.05441054 -3.06188 0.00219949
12. B(2,1) -0.02249617 0.02814460 -0.79931 0.42411257
13. B(2,2) 0.82769908 0.04538578 18.23697 0.00000000
14. Shape 16.71545911 3.46472752 4.82447 0.00000140
Multivariate Q(1)= 0.15303
Significance Level as Chi-Squared(1)= 0.69565
Multivariate Q(1)= 2.65772
Significance Level as Chi-Squared(1)= 0.10305
Multivariate Q(1)= 0.00382
Significance Level as Chi-Squared(1)= 0.95072
Multivariate Q(1)= 0.02975
Significance Level as Chi-Squared(1)= 0.86305
Wald Test
Chi-Squared(2)= 9.501589 or F(2,*)= 4.75079 with Significance Level 0.00864483
Wald Test
Chi-Squared(2)= 14.442402 or F(2,*)= 7.22120 with Significance Level 0.00073092
Wald Test
Chi-Squared(4)= 19.026393 or F(4,*)= 4.75660 with Significance Level 0.00077662
====================================================================
第二种加入sim(1980)自回归结构建立 VAR_BEKK_GARCH
====================================================================
VAR/System - Estimation by Least Squares
Dependent Variable A
Usable Observations 1135 Degrees of Freedom 1130
Mean of Dependent Variable -0.437789648
Std Error of Dependent Variable 0.806794630
Standard Error of Estimate 0.607554663
Sum of Squared Residuals 417.10861555
Durbin-Watson Statistic 2.089362
Variable Coeff Std Error T-Stat Signif
*******************************************************************************
1. A{1} 0.343725366 0.030815039 11.15447 0.00000000
2. A{2} 0.225986443 0.030829118 7.33029 0.00000000
3. B{1} 0.052768949 0.035255632 1.49675 0.13473696
4. B{2} 0.108609869 0.035192705 3.08615 0.00207702
5. Constant -0.157562605 0.021630214 -7.28438 0.00000000
F-Tests, Dependent Variable A
Variable F-Statistic Signif
A 153.7683 0.0000000
B 24.6897 0.0000000
Dependent Variable B
Usable Observations 1135 Degrees of Freedom 1130
Mean of Dependent Variable -0.192893903
Std Error of Dependent Variable 1.057809512
Standard Error of Estimate 0.521841553
Sum of Squared Residuals 307.72002506
Durbin-Watson Statistic 2.117574
Variable Coeff Std Error T-Stat Signif
*******************************************************************************
1. A{1} 0.032438714 0.026467689 1.22560 0.22060582
2. A{2} -0.039570741 0.026479781 -1.49438 0.13535664
3. B{1} 0.564665935 0.030281808 18.64703 0.00000000
4. B{2} 0.339581904 0.030227759 11.23411 0.00000000
5. Constant -0.021134688 0.018578649 -1.13758 0.25553729
F-Tests, Dependent Variable B
Variable F-Statistic Signif
A 1.3208 0.2673445
B 1042.2643 0.0000000
MV-GARCH, BEKK - Estimation by BFGS
NO CONVERGENCE IN 100 ITERATIONS
LAST CRITERION WAS 0.0019851
Usable Observations 1135
Log Likelihood -1762.70532645
Variable Coeff Std Error T-Stat Signif
*******************************************************************************
1. A{1} 0.369644488 0.027493436 13.44483 0.00000000
2. A{2} 0.238075030 0.026015672 9.15122 0.00000000
3. B{1} 0.018995124 0.030335086 0.62618 0.53119904
4. B{2} 0.111409829 0.029950838 3.71976 0.00019941
5. Constant -0.179944045 0.019397139 -9.27683 0.00000000
6. A{1} 0.034736336 0.026173190 1.32717 0.18445165
7. A{2} -0.017835684 0.025517779 -0.69895 0.48458248
8. B{1} 0.555802869 0.026064213 21.32437 0.00000000
9. B{2} 0.332608891 0.026012150 12.78667 0.00000000
10. Constant -0.040767246 0.017651881 -2.30951 0.02091514
11. C(1,1) 0.488086893 0.060064487 8.12605 0.00000000
12. C(2,1) 0.062314371 0.110343474 0.56473 0.57225680
13. C(2,2) 0.195875509 0.393961800 0.49719 0.61905213
14. A(1,1) 0.239974129 0.072348324 3.31693 0.00091013
15. A(1,2) 0.145992818 0.063569613 2.29658 0.02164264
16. A(2,1) 0.033572511 0.077861055 0.43118 0.66633394
17. A(2,2) 0.264692585 0.068611194 3.85786 0.00011438
18. B(1,1) 0.346607304 0.294608727 1.17650 0.23939495
19. B(1,2) -0.363220341 0.452753145 -0.80225 0.42240947
20. B(2,1) 0.298226313 0.250222179 1.19185 0.23332162
21. B(2,2) 0.890821221 0.324231200 2.74749 0.00600538
22. Shape 8.184735275 1.069853335 7.65033 0.00000000
Multivariate Q(1)= 3.47255
Significance Level as Chi-Squared(1)= 0.06240
Multivariate Q(1)= 2.75608
Significance Level as Chi-Squared(1)= 0.09689
Multivariate Q(1)= 0.02866
Significance Level as Chi-Squared(1)= 0.86556
Multivariate Q(1)= 0.04189
Significance Level as Chi-Squared(1)= 0.83782
Wald Test
Chi-Squared(2)= 5.298103 or F(2,*)= 2.64905 with Significance Level 0.07071825
Wald Test
Chi-Squared(2)= 2.348553 or F(2,*)= 1.17428 with Significance Level 0.30904254
Wald Test
Chi-Squared(4)= 6.994139 or F(4,*)= 1.74853 with Significance Level 0.13619827
===================================================================
有什么问题(关于别的模型的也行)可以留言或者私聊,小问题可以无偿。
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
|