请选择 进入手机版 | 继续访问电脑版
楼主: 110teddy
54271 94

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

urmine5683 发表于 2013-1-5 21:45:03 |显示全部楼层 |坛友微信交流群
epoh 发表于 2013-1-5 18:16
open data urmine.xls
data(format=xls,org=columns) 1 729 resid00 resid01 resid03
*
有点搞不清楚DCC的参数估计出来 与 估计copula参数的关系   

现在有三个的DCC参数估计出来了

是需要用对数收益率的序列 还是 残差的序列 进行积分变换后 再用matlab得到copula的参数呢?

感激涕零

使用道具

epoh 发表于 2013-1-5 21:54:12 |显示全部楼层 |坛友微信交流群
urmine5683 发表于 2013-1-5 21:45
有点搞不清楚DCC的参数估计出来 与 估计copula参数的关系   

现在有三个的DCC参数估计出来了
建议你下载Dynamic Copula Toolbox 3.0
先看一下Dynamic copula toolbox.pdf page 15/25
是不是适合你
Table 6 contains the estimated parameters from three elliptical copulas,
namely the static t copula (t), the time varying t (tDCC) and Gaussian (GDCC)
copulas. In both time varying copulas the time varying parameters is the correlation
that follows the DCC model of Engle

使用道具

urmine5683 发表于 2013-1-6 09:26:53 |显示全部楼层 |坛友微信交流群
epoh 发表于 2013-1-5 21:54
建议你下载Dynamic Copula Toolbox 3.0
先看一下Dynamic copula toolbox.pdf page 15/25
是不是适合你
...
多谢啊  我学习了  并且跟着步骤在matlab里面运行

但是总是提示一些函数未定义之类的情况 好头疼。。

您能帮我看下这三个对数收益率的时间序列如何用那个动态copula工具箱做出来copula的相关系数矩阵么?
suanli.xls (71 KB)

使用道具

urmine5683 发表于 2013-1-6 09:57:53 |显示全部楼层 |坛友微信交流群
epoh 发表于 2013-1-5 21:54
建议你下载Dynamic Copula Toolbox 3.0
先看一下Dynamic copula toolbox.pdf page 15/25
是不是适合你
...
fitModel(specM, data, 'fminunc')
??? Error using ==> optimset
Unrecognized parameter name 'Algorithm'.

Error in ==> G:\MATLAB\Matlab6p5FULL\toolbox\Dynamic Copula Toolbox 3.0\fitModel.m
On line 55  ==>         options = optimset('Algorithm','interior-point','Display','iter','MaxFunEvals',9000,'MaxIter',1000,'TolCon',10^-12,'TolFun',10^-4,'TolX',10^-5,'FinDiffType','central');

使用道具

urmine5683 发表于 2013-1-6 10:19:29 |显示全部楼层 |坛友微信交流群
epoh 发表于 2013-1-5 21:54
建议你下载Dynamic Copula Toolbox 3.0
先看一下Dynamic copula toolbox.pdf page 15/25
是不是适合你
...
我的matlab是6.5的免安装版  我看pdf里面说  The toolbox is tested on MATLAB R2008B
and it uses the optimization toolbox and statistics toolbox from Mathworks

是因为我缺了这两个工具箱么?

使用道具

epoh 发表于 2013-1-6 16:35:49 |显示全部楼层 |坛友微信交流群
urmine5683 发表于 2013-1-6 10:19
我的matlab是6.5的免安装版  我看pdf里面说  The toolbox is tested on MATLAB R2008B
and it uses the  ...
刚看了下,可能Dynamic Copula Toolbox 2.0更适合你
因为内含datafiles
pdf文件就是依datafiles作出的结果解释

matlab我是用R2008a,不敢用太新但也不能用太旧.
当然要安装optimization toolbox and statistics toolbox

底下程序先供你参考,
你可依自己需要的模型,设定不同条件比较.
%%%%%
load datafiles
[residuals, UnResiduals,GARCHspec,likelihoods]=filtReturnsGARCH(returns,'Gaussian','GJR', 'CML');

CopulaSpec=setCopulaLLinputs(4)

[CopParams, LogL, StrOutput]=fitCopula(UnResiduals, CopulaSpec)

Mean: ARMAX(1,0,0); Variance: GJR(1,1)

  Conditional Probability Distribution: Gaussian
  Number of Model Parameters Estimated: 6

                               Standard          T     
  Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
           C    0.00032691     0.00012645       2.5853
       AR(1)    0.00011514     0.023314         0.0049
           K    2e-007         8.9257e-008      2.2407
    GARCH(1)    0.95709        0.0063649      150.3692
     ARCH(1)    0.04371        0.0070396        6.2091
Leverage(1)    -0.010519      0.008316        -1.2649

  Mean: ARMAX(1,0,0); Variance: GJR(1,1)

  Conditional Probability Distribution: Gaussian
  Number of Model Parameters Estimated: 6

                               Standard          T     
  Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
           C    4.7617e-006    0.00012353       0.0385
       AR(1)    0.077937       0.022647         3.4414
           K    4.2585e-007    8.6719e-008      4.9107
    GARCH(1)    0.93431        0.0066265      140.9954
     ARCH(1)    0.078813       0.0064585       12.2030
Leverage(1)    -0.048788      0.010224        -4.7721

  Mean: ARMAX(1,0,0); Variance: GJR(1,1)

  Conditional Probability Distribution: Gaussian
  Number of Model Parameters Estimated: 6

                               Standard          T     
  Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
           C    0.00011945     8.2982e-005      1.4395
       AR(1)    0.079255       0.022893         3.4620
           K    2e-007         5.3109e-008      3.7658
    GARCH(1)    0.93251        0.0097878       95.2721
     ARCH(1)    0.075452       0.012664         5.9583
Leverage(1)    -0.038818      0.015887        -2.4433

  Mean: ARMAX(1,0,0); Variance: GJR(1,1)

  Conditional Probability Distribution: Gaussian
  Number of Model Parameters Estimated: 6

                               Standard          T     
  Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
           C    0.00013388     0.00012809       1.0452
       AR(1)    0.030993       0.022945         1.3507
           K    4.3695e-007    1.1277e-007      3.8748
    GARCH(1)    0.93146        0.0088601      105.1290
     ARCH(1)    0.027703       0.012464         2.2226
Leverage(1)    0.058278       0.014354         4.0600


CopParams =

    0.0318
    0.9595


LogL =

  802.6348
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
zhangtao + 5 + 5 + 5 精彩帖子

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

使用道具

urmine5683 发表于 2013-1-6 18:34:48 |显示全部楼层 |坛友微信交流群
epoh 发表于 2013-1-6 16:35
刚看了下,可能Dynamic Copula Toolbox 2.0更适合你
因为内含datafiles
pdf文件就是依datafiles作出的结 ...
做到最后一步出现了这个问题:我也是4个对数收益率序列的

>> [CopParams, LogL, StrOutput]=fitCopula(UnResiduals, CopulaSpec)
the parameters vector is a 2x1 vector.
Undefined function 'inputstartinvals' for input arguments of type 'struct'.

Error in fitCopula (line 134)
    startinvals=inputstartinvals(CopulaSpec,defvals);

使用道具

epoh 发表于 2013-1-6 19:43:18 |显示全部楼层 |坛友微信交流群
urmine5683 发表于 2013-1-6 18:34
做到最后一步出现了这个问题:我也是4个对数收益率序列的

>> [CopParams, LogL, StrOutput]=fitCopula ...
data=xlsread('suanli.xls');
data=data*100;
[residuals, UnResiduals,GARCHspec,likelihoods]=filtReturnsGARCH(data,'Gaussian','GARCH', 'CML');

CopulaSpec=setCopulaLLinputs(3)

[CopParams, LogL, StrOutput]=fitCopula(UnResiduals, CopulaSpec)


  Mean: ARMAX(0,0,0); Variance: GARCH(1,1)

  Conditional Probability Distribution: Gaussian
  Number of Model Parameters Estimated: 4

                               Standard          T     
  Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
           C    -0.034553      0.03632         -0.9513
           K    0.069842       0.02367          2.9507
    GARCH(1)    0.86663        0.032881        26.3568
     ARCH(1)    0.075959       0.01989          3.8189

  Mean: ARMAX(0,0,0); Variance: GARCH(1,1)

  Conditional Probability Distribution: Gaussian
  Number of Model Parameters Estimated: 4

                               Standard          T     
  Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
           C    0.058345       0.056334         1.0357
           K    0.21354        0.064157         3.3284
    GARCH(1)    0.81641        0.04019         20.3136
     ARCH(1)    0.11125        0.02779          4.0031

  Mean: ARMAX(0,0,0); Variance: GARCH(1,1)

  Conditional Probability Distribution: Gaussian
  Number of Model Parameters Estimated: 4

                               Standard          T     
  Parameter       Value          Error       Statistic
-----------   -----------   ------------   -----------
           C    0.00035568     0.046248         0.0077
           K    0.078873       0.030055         2.6243
    GARCH(1)    0.87508        0.03086         28.3560
     ARCH(1)    0.088385       0.02145          4.1205

CopulaSpec =

             ll: 'copula'
           type: 'Gaussian'
        depspec: 'DCC'
      optimizer: 'fmincon'
    derivatives: 'on'

the parameters vector is a 2x1 vector

                                Max     Line search  Directional  First-order
Iter F-count        f(x)   constraint   steplength   derivative   optimality Procedure
    0      3     -171.578      -0.0042                                         
    1     10     -173.667     -0.01622       0.0625         52.5    1.02e+003   
    2     17      -178.15     -0.05735       0.0625         37.2          244   
    3     20     -178.351     -0.05322            1      -0.0512         14.9   
    4     23     -178.421     -0.04846            1       -0.027         2.96   
    5     26     -178.429     -0.04695            1      0.00108        0.254   
    6     29     -178.429     -0.04709            1    3.03e-006       0.0363   
Optimization terminated: magnitude of directional derivative in search
direction less than 2*options.TolFun and maximum constraint violation
  is less than options.TolCon.
No active inequalities.
succesfull optimization!

CopParams =

    0.0472
    0.8774


LogL =

  178.4292

使用道具

urmine5683 发表于 2013-1-6 20:08:00 |显示全部楼层 |坛友微信交流群
epoh 发表于 2013-1-6 19:43
data=xlsread('suanli.xls');
data=data*100;
[residuals, UnResiduals,GARCHspec,likelihoods]=filtRe ...
实在是太感谢了   呜呜。。。。没接触过编程。。论文急用。。

太好人了   


使用道具

urmine5683 发表于 2013-1-7 12:43:47 |显示全部楼层 |坛友微信交流群
epoh 发表于 2013-1-6 19:43
data=xlsread('suanli.xls');
data=data*100;
[residuals, UnResiduals,GARCHspec,likelihoods]=filtRe ...
大神  我想请问

用上证综指和上证债指的对数收益率序列  希望能够得到股票市场与债券市场之间的动态相关性
但是做出来的DCC系数很不对劲
7.  DCC(1)                       -7.1026e-014       0.0299 -2.37273e-012  1.00000000
8.  DCC(2)                             0.0166       0.1898       0.08764  0.93016246

怎么解释呢?引进的直接就是两个指数的对数收益率序列了

使用道具

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

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

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

GMT+8, 2024-3-29 14:42