楼主: 110teddy
54383 94

[问答] 用winrats做dcc-mvgarch出的结果,求解释!   [推广有奖]

11
epoh 发表于 2011-11-27 13:49:58 |只看作者 |坛友微信交流群
ywh19860616 发表于 2011-11-27 08:55
epoh老师,我执行garchmv.rpf

出现如下错误:
garchmv.rpf 要在winrats 8.0执行.
*****
garch(p=1,q=1,mv=bek,pmethod=simplex,piters=10) / xjpn xfra xsui
test(zeros,title="Test for variance causality of JPN to FRA/SUI")
# 11 12 20 21
test(zeros,title="Test for variance causality of FRA/SUI to JPN")
# 13 16 22 25

MV-GARCH, BEKK - Estimation by BFGS
Convergence in    87 Iterations. Final criterion was  0.0000093 <=  0.0000100
Usable Observations                      6236
Log Likelihood                    -11821.7455

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  Mean(1)                       0.005278177  0.005518962      0.95637  0.33888471
2.  Mean(2)                      -0.002365984  0.004518602     -0.52361  0.60055006
3.  Mean(3)                      -0.002512107  0.005320535     -0.47215  0.63681761
4.  C(1,1)                        0.082828772  0.005122224     16.17047  0.00000000
5.  C(2,1)                        0.029933861  0.007314906      4.09217  0.00004273
6.  C(2,2)                        0.055797735  0.005307613     10.51277  0.00000000
7.  C(3,1)                        0.037972521  0.008606669      4.41199  0.00001024
8.  C(3,2)                       -0.003979676  0.009517354     -0.41815  0.67583788
9.  C(3,3)                       -0.058514159  0.006216049     -9.41340  0.00000000
10. A(1,1)                        0.359530466  0.011784037     30.50996  0.00000000
11. A(1,2)                        0.102641871  0.010187145     10.07563  0.00000000
12. A(1,3)                        0.111019209  0.012618953      8.79781  0.00000000
13. A(2,1)                        0.038167505  0.015178945      2.51450  0.01192003
14. A(2,2)                        0.403489268  0.016769724     24.06058  0.00000000
15. A(2,3)                       -0.066144826  0.018860799     -3.50700  0.00045319
16. A(3,1)                       -0.047561302  0.010583094     -4.49408  0.00000699
17. A(3,2)                       -0.125573453  0.012383922    -10.14004  0.00000000
18. A(3,3)                        0.291200900  0.014644629     19.88448  0.00000000
19. B(1,1)                        0.935266962  0.003806609    245.69560  0.00000000
20. B(1,2)                       -0.026702929  0.003263623     -8.18199  0.00000000
21. B(1,3)                       -0.028560663  0.004168472     -6.85159  0.00000000
22. B(2,1)                       -0.012473994  0.005833941     -2.13818  0.03250243
23. B(2,2)                        0.909755280  0.006548866    138.91798  0.00000000
24. B(2,3)                        0.029207433  0.007109654      4.10814  0.00003989
25. B(3,1)                        0.016555260  0.004447981      3.72197  0.00019767
26. B(3,2)                        0.048818993  0.005584890      8.74126  0.00000000
27. B(3,3)                        0.946900683  0.005807772    163.04025  0.00000000


Test for variance causality of JPN to FRA/SUI
Chi-Squared(4)=    104.448074 or F(4,*)=     26.11202 with Significance Level 0.00000000


Test for variance causality of FRA/SUI to JPN
Chi-Squared(4)=     21.639456 or F(4,*)=      5.40986 with Significance Level 0.00023641


已有 1 人评分学术水平 热心指数 信用等级 收起 理由
ywh19860616 + 5 + 5 + 5 谢谢epoh老师

总评分: 学术水平 + 5  热心指数 + 5  信用等级 + 5   查看全部评分

使用道具

12
ywh19860616 发表于 2011-11-27 14:17:19 |只看作者 |坛友微信交流群
epoh 发表于 2011-11-27 13:49
garchmv.rpf 要在winrats 8.0执行.
*****
garch(p=1,q=1,mv=bek,pmethod=simplex,piters=10) / xjpn  ...
谢谢epoh老师,您前面提到了需要再Rats8才能执行,我忘记了

一份耕耘,一份收获。

使用道具

13
daming3775 发表于 2012-2-5 20:11:23 |只看作者 |坛友微信交流群
关注!!!!!!!!!!

使用道具

14
bang4kimo 发表于 2012-2-15 23:12:10 |只看作者 |坛友微信交流群
超厲害!!

使用道具

15
bang4kimo 发表于 2012-2-15 23:19:48 |只看作者 |坛友微信交流群
老師您太厲害了!!
我想請問老師
garch(p=1,q=1,mv=cc,variances=varma,pmethod=simplex,piters=5,$
method=bfgs,iters=200) / xjpn xfra xsui
用這個跑出來的

MV_GARCH, CC - Estimation by BFGS
Convergence in    99 Iterations. Final criterion was  0.0000048 <=  0.0000100
Usable Observations   6236
Log Likelihood                  -12626.28389714

   Variable                     Coeff       Std Error      T-Stat     Signif
*******************************************************************************
1.  Mean(1)                  -0.003240676  0.006033464     -0.53712  0.59118674
2.  Mean(2)                  -0.005185562  0.006381431     -0.81260  0.41644649
3.  Mean(3)                  -0.000811918  0.007404525     -0.10965  0.91268569
4.  C(1)                      0.010809705  0.002181673      4.95478  0.00000072
5.  C(2)                      0.006009577  0.002574518      2.33425  0.01958248
6.  C(3)                      0.022066838  0.002711035      8.13963  0.00000000
7.  A(1,1)                    0.172943296  0.014074311     12.28787  0.00000000
8.  A(1,2)                   -0.009960189  0.014731346     -0.67612  0.49896311
9.  A(1,3)                   -0.034030889  0.011106260     -3.06412  0.00218313
10. A(2,1)                   -0.053389844  0.007785546     -6.85756  0.00000000
11. A(2,2)                    0.246273111  0.016671849     14.77179  0.00000000
12. A(2,3)                   -0.106152271  0.010370393    -10.23609  0.00000000
13. A(3,1)                    0.004512321  0.005246395      0.86008  0.38974479
14. A(3,2)                   -0.070379329  0.008839563     -7.96186  0.00000000
15. A(3,3)                    0.134783277  0.009197977     14.65358  0.00000000
16. B(1,1)                    0.793053149  0.019832717     39.98712  0.00000000
17. B(1,2)                    0.096902403  0.034278923      2.82688  0.00470039
18. B(1,3)                   -0.004328195  0.036201584     -0.11956  0.90483317
19. B(2,1)                   -0.014992540  0.019753452     -0.75898  0.44786255
20. B(2,2)                    0.582848149  0.031327356     18.60509  0.00000000
21. B(2,3)                    0.323593697  0.033305031      9.71606  0.00000000
22. B(3,1)                   -0.044612436  0.015991744     -2.78972  0.00527542
23. B(3,2)                    0.163766879  0.026734923      6.12558  0.00000000
24. B(3,3)                    0.779046653  0.023219775     33.55100  0.00000000
25. R(2,1)                    0.574453431  0.007950819     72.25085  0.00000000
26. R(3,1)                    0.585473892  0.008108436     72.20553  0.00000000
27. R(3,2)                    0.836347792  0.003613616    231.44343  0.00000000
中的R(2,1)R(3,1)R(3,2)是不是
-Constant conditional correlations??
請問這個模型的MLE是什麼啊?RATS我沒有看到有寫??

使用道具

16
epoh 发表于 2012-2-16 20:12:43 |只看作者 |坛友微信交流群
bang4kimo 发表于 2012-2-15 23:19
老師您太厲害了!!
我想請問老師
garch(p=1,q=1,mv=cc,variances=varma,pmethod=simplex,piters=5,$
对,你说得没错.
R(2,1),R(3,1),R(3,2)就是Conditional Constant Correlation
底下结果供你参考:
######Winrats
open data hp_ibm.xls
data(format=xls,org=columns) 1 2000 hp ibm
garch(p=1,q=1,mv=cc) / hp ibm

MV-GARCH, CC - Estimation by BFGS
Convergence in    37 Iterations. Final criterion was  0.0000010 <=  0.0000100
Usable Observations                      2000
Log Likelihood                     -7460.8505

    Variable                        Coeff      Std Error      T-Stat      Signif
************************************************************************************
1.  Mean(1)                      0.0703503402 0.0439740896      1.59981  0.10963997
2.  Mean(2)                      0.0337063730 0.0263874638      1.27736  0.20147408
3.  C(1)                         0.4945525353 0.1734626409      2.85106  0.00435736
4.  C(2)                         0.2832963467 0.0651551560      4.34803  0.00001374
5.  A(1)                         0.0863703033 0.0189162868      4.56592  0.00000497
6.  A(2)                         0.1364780331 0.0221326421      6.16637  0.00000000
7.  B(1)                         0.8157046806 0.0495222315     16.47148  0.00000000
8.  B(2)                         0.7230643330 0.0480618155     15.04447  0.00000000
9.  R(2,1)                       0.5454331146 0.0137223360     39.74783  0.00000000


######S-plus
module("finmetrics")
hp.ibm = seriesMerge(hp.s, ibm.s)
hp.ibm=100*hp.ibm
hp.ibm.ccc = mgarch(hp.ibm~-1, ~ccc.g(1,1),cccor.choice=1)
summary(hp.ibm.ccc)

Call:
mgarch(formula.mean = hp.ibm ~ 1, formula.var =  ~ ccc.g(1, 1), cccor.choice = 1)

Mean Equation: structure(.Data = hp.ibm ~ 1
, class = "formula"
)

Conditional Variance Equation: structure(.Data =  ~ ccc.g(1, 1)
, class = "formula"
)

Conditional Distribution:  gaussian

--------------------------------------------------------------

Estimated Coefficients:
--------------------------------------------------------------
                 Value Std.Error t value   Pr(>|t|)
          C(1) 0.06646  0.046068   1.443 1.493e-001
          C(2) 0.03164  0.028489   1.111 2.668e-001
       A(1, 1) 0.48479  0.089104   5.441 5.960e-008
       A(2, 2) 0.27125  0.038166   7.107 1.643e-012
ARCH(1; 1, 1) 0.08217  0.012492   6.578 6.066e-011
ARCH(1; 2, 2) 0.11974  0.007401  16.178 0.000e+000
GARCH(1; 1, 1) 0.82067  0.024932  32.916 0.000e+000
GARCH(1; 2, 2) 0.74001  0.025822  28.658 0.000e+000

Estimated Conditional Constant Correlation Matrix:
--------------------------------------------------------------
        HP    IBM
HP 1.0000 0.5421
IBM 0.5421 1.0000

Standard Errors:
        [,1]    [,2]
[1,]      NA 0.01441
[2,] 0.01441      NA

--------------------------------------------------------------

AIC(8) = 14938.63
BIC(8) = 14983.43

Normality Test:
--------------------------------------------------------------
    Jarque-Bera P-value Shapiro-Wilk    P-value
HP       644.3       0       0.9806 7.782e-016
IBM      2116.9       0       0.9657 2.099e-021

Ljung-Box test for standardized residuals:
--------------------------------------------------------------
    Statistic P-value Chi^2-d.f.
HP     18.21  0.1094         12
IBM     12.01  0.4451         12

Ljung-Box test for squared standardized residuals:
--------------------------------------------------------------
    Statistic P-value Chi^2-d.f.
HP     9.755  0.6374         12
IBM     4.171  0.9801         12

Lagrange multiplier test:
--------------------------------------------------------------
      Lag 1    Lag 2   Lag 3  Lag 4 Lag 5   Lag 6   Lag 7    Lag 8   Lag 9   Lag 10  Lag 11   Lag 12      C
HP -0.4529 -0.04954 -0.8559  2.511 0.107 -0.2790 -0.2066 -0.02665 -0.7302 -0.01505 -0.9074 -0.03416 1.3006
IBM -0.6517 -0.62115 -0.5411 -1.113 0.840 -0.2107 -0.3907 -0.25896 -0.4875 -0.70344  0.1933  0.02945 0.1288

      TR^2 P-value F-stat P-value
HP 10.135  0.6042 0.9261  0.6265
IBM  4.122  0.9811 0.3755  0.9978

hp.ibm.ccc$likelihood
[1] -7461.313

使用道具

17
110teddy 发表于 2012-2-16 22:18:17 |只看作者 |坛友微信交流群
epoh 发表于 2011-10-27 19:05
Engle and Sheppard (2001)将 DCC 的估计简化成两步骤:第一阶段利用单变量的 GARCH模型估计出 N 个市场的条 ...
老师 请问动态相关系数的图是怎么做出来的?

另外利用图形界面做dcc-garch 变量用什么样的序列啊 是收益率序列(平稳)吗?这样出来的结果肯定不对……用原始价格序列(股指)也不对……真是一塌糊涂啊  老师你一定帮帮我啊
界面.jpg

结果.jpg

使用道具

18
bang4kimo 发表于 2012-2-16 23:55:34 |只看作者 |坛友微信交流群
epoh 发表于 2012-2-16 20:12
对,你说得没错.
R(2,1),R(3,1),R(3,2)就是Conditional Constant Correlation
底下结果供你参考:
這是用s-plus算的嗎?
他可以一次就知道 estimates conditional constant corrlation matrix
AIC BIC 也可以自己找到最適落後階數??這軟體也太強了吧??
normality test
ljung box test for standardized residuals
lagrange multiplier test
p-value f-test p-value
likehood
也太強的軟體了吧!!不用再打程式碼??
我正在搜尋rats的多元變量應該要怎麼做 ljung box test
我用的是rats 7.0,論壇上有8.0可是我沒有
這些在RATS 都要自己打程式令吧?
我正在尋找 ljung box test和落後階數的指令?
不知道老師可以回答我嗎??謝謝您!!

使用道具

19
epoh 发表于 2012-2-17 10:17:54 |只看作者 |坛友微信交流群
110teddy 发表于 2012-2-16 22:18
老师 请问动态相关系数的图是怎么做出来的?

另外利用图形界面做dcc-garch 变量用什么样的序列啊 是收 ...
这个很简单
只要加入hmatrices=hh
就可以算出rho12 = hh(t)(1,2)/sqrt(hh(t)(1,1)*hh(t)(2,2))
#########
open data dcc_rets.xls
data(format=xls,org=columns) 1 2469 sp100 ftse
garch(p=1,q=1,mv=dcc,nomean,hmatrices=hh) / sp100 ftse
*
* Compute the correlations from the multivariate GARCH
*
set rho12 = hh(t)(1,2)/sqrt(hh(t)(1,1)*hh(t)(2,2))

graph(header="Dynamic Correlation of SP100 with FTSE")
# rho12
已有 2 人评分学术水平 热心指数 信用等级 收起 理由
Sliverhhh + 1 + 1 精彩帖子
Bastet. + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 2  热心指数 + 2  信用等级 + 1   查看全部评分

使用道具

20
epoh 发表于 2012-2-17 11:28:26 |只看作者 |坛友微信交流群
bang4kimo 发表于 2012-2-16 23:55
這是用s-plus算的嗎?
他可以一次就知道 estimates conditional constant corrlation matrix
AIC BIC 也 ...
没有错 S+FinMetrics module
使用function summary ()
summary(hp.ibm.ccc),就可得到底下这些结果
  normality test
  ljung box test for standardized residuals
  lagrange multiplier test
  .....
  .....
详细可以参考
Modelling Financial Time Series with S-PLUS.pdf
chap 13 Multivariate GARCH Modeling

full bekk
  可以考虑使用S-plus or Matlab Ucsd_garch
  https://bbs.pinggu.org/thread-1300638-1-1.html
DCC-Garch
  可以考虑使用 Matlab Ucsd_garch or Winrats

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-19 19:52