楼主: zhuguiyu0213
7238 7

RATS DCC-MVGARCH怎样导出动态条件相关系数? [推广有奖]

  • 0关注
  • 0粉丝

大专生

38%

还不是VIP/贵宾

-

威望
0
论坛币
637 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
235 点
帖子
7
精华
0
在线时间
95 小时
注册时间
2010-11-27
最后登录
2013-7-2

楼主
zhuguiyu0213 发表于 2011-11-25 11:42:40 |AI写论文
30论坛币
RATS DCC-MVGARCH怎样导出动态条件相关系数?

关键词:DCC-MVGARCH mvgarch VGARCH GARCH Rats 动态 皮尔逊相关系数 偏相关系数 pearson相关系数 相关系数检验 spearman相关系数 复相关系数 相关系数矩阵

沙发
zhuguiyu0213 发表于 2011-11-26 20:05:22
没人会?

藤椅
waveland 发表于 2013-5-1 14:29:17
我是复制粘贴

板凳
bianzhiyun1992 发表于 2015-5-30 07:19:01
waveland 发表于 2013-5-1 14:29
我是复制粘贴
您好 请问你用RATS 怎样做出来的动态相关系数?

我只得到了埃尔法和贝塔的值,不会做动态相关系数。

报纸
chuanhaizhang 发表于 2018-6-8 00:32:45
欢迎加群:595481607

地板
njulll 发表于 2019-4-10 07:38:39
bianzhiyun1992 发表于 2015-5-30 07:19
您好 请问你用RATS 怎样做出来的动态相关系数?

我只得到了埃尔法和贝塔的值,不会做动态相关系数。
我会,联系我

7
GaussAnalytica 在职认证  发表于 2019-4-25 09:47:51
dcc garch模型R语言版源代码-优化升级3.0版
https://bbs.pinggu.org/thread-7074276-1-1.html

##2.0版本做了以下优化:
1、全中文注释,逐行注释
2、考虑到部分同学对R语言不熟练,增加了包的安装代码
3、包括基础数据的获取,收益率的计算、数据的整理
4、结构更加清晰,易于学习理解模仿
5、购买本帖附件后,你唯一需要修改的地方就是你所研究资产的编码

##3.0版本做了以下优化:
1、分成了两个次级版本
  A:自有数据版,即数据已有,存储在自己电脑里,本资料包提供示例数据,便于学习模仿
  B:网络数据版,数据需要从网上下载,本代码中提供中外证券价格数据下载方法
2、增加了提取存储动态相关系数的代码

8
王雪212 发表于 2020-1-30 00:28:56

garch(model=var1,p=1,q=1,mv=dcc,variances=varma,method=bfgs,$
   iters=1000,pmethod=simplex,piters=100,noprint) 250 *
garch(model=var1,p=1,q=1,mv=dcc,variances=varma,method=bfgs,iters=1000,$
   initial=%beta,pmethod=simplex,piters=100,robusterrors,rvectors=rdcc,hmatrices=hdcc)
@regcrits
*
* Do the univariate diagnostics (serial correlation of standardized
* residuals and their squares) for each of the models.
*
procedure UniDiagnostics resids hmats
type series[vect] resids
type series[symm] hmats
*
option string title
option integer number 20
option vect[strings] labels
*
local integer i
*
disp
if %defined(title)
   disp "Univariate Diagnostics for" title
disp
do i=1,%nvar
   set stdu %regstart() %regend() = resids(t)(i)/sqrt(hmats(t)(i,i))
   set stdusq = stdu^2
   corr(number=number,noprint,qstats) stdu
   if %defined(labels)
      disp labels(i)
   disp "Q(20)r" %qstat %signif
   corr(number=number,noprint,qstats) stdusq
   disp "Q(20)r^2" %qstat %signif
end do i
end
@UniDiagnostics(labels=labels,title="BEKK") rbekk hbekk
@UniDiagnostics(labels=labels,title="Diag") rdiag hdiag
@UniDiagnostics(labels=labels,title="CCC")  rcc   hcc
@UniDiagnostics(labels=labels,title="DCC")  rdcc  hdcc
*
* Compute the correlations from the multivariate GARCH
*
set rho12 = hcc(t)(1,2)/sqrt(hcc(t)(1,1)*hcc(t)(2,2))
set rho13 = hcc(t)(1,3)/sqrt(hcc(t)(1,1)*hcc(t)(3,3))
set rho23 = hcc(t)(2,3)/sqrt(hcc(t)(2,2)*hcc(t)(3,3))
*
* Get the overall minimum of the three variables, so the graphs can be
* on a comparable scale. Use 0 as the minimum if they're all positive.
*
table(noprint) / rho12 rho13 rho23
compute graphmin=%min(%minimum,0.0)
*
spgraph(vfields=3,hfields=2,footer="Fig 3. Time-varying conditional correlations from CCC model")
graph(header="Correlation of ice with sh",min=graphmin)
# rho12
spgraph(done)
graph(header="Correlation of ice with copper",min=graphmin)
# rho13
spgraph(done)
graph(header="Correlation of sh with copper",min=graphmin)
# rho23
spgraph(done)


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

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2025-12-27 06:59