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