工具箱Mathworks-Dynamic Copula Toolbox 3.0下载地址,界面如下:
在这里插入图片描述

1 概述

根据介绍,Dynamic copula工具箱支持以下一般类型的模型:

  • Copula-GRACH models
  • Copula Vines 即藤Copula

1.1 Copula-GRACH

根据【Dynamic Copula Toolbox.】一文中介绍:

Copula – GARCH models is the class of models where some of the parameters are potentially time varying, in an autoregressive manner, conditional on the set of past information.
The toolbox supports four time varyingcopulas, namely the Gaussian copula, t copula, Clayton copula and Symmetrized Joe- Clayton (SJC) copula. The latter two are supporter only when p = 2, while the first two have no dimensional constraint. The time varying parameter is the correlation among the risk factors for the first two, Kendall’ s tau for the third and upper andlower tail dependence for the last.
翻译:工具箱支持四个时变copula,即高斯copula、t copula、Clayton copula和对称化Joe- Clayton(SJC)copula。只有当p=2时,后两个才是支撑体,而前两个没有维度约束。时变参数是前两个的风险因素之间的相关性,第三个是Kendall的tau,最后一个是上下尾相关性。

1.2 Copula-Vines

根据【Dynamic Copula Toolbox.】一文中介绍:

Copula vines, known also as pair copula constructions are the class of models produced by the decomposition of a multivariate (p>2) copula to a cascade of bi-variate copulas.
The toolbox supports two copula vine decompositions, the canonical vine and the d - vine, assuming that each bivariate copula is a t copula or a Clayton copula or an SJC copula.
翻译:该工具箱支持两种copula-vine分解,即规范copula和d-vine,假设每个二元copula是t copula、Clayton copula或SJC copula。

2 工具箱各函数说明

2.1 modelspec

即模型设定(Model Specification)
调用命令:

spec = modelspec(data) 

函数modelspec创建一个名为spec的结构化数组,其中包含用户想要估计的模型的所有规格。
输入参数:

  • data为数据集。
    键入上述调用命令后,弹出以下窗口:
    在这里插入图片描述

选择一【GARCH model for each series】

选择:“每个系列的GARCH模型”应用于当用户希望采用两步程序来估计模型参数时,以及当数据集中的每个系列是异方差的,并且可能是自相关的,如金融数据时。
支持的单变量GARCH模型包括:

  • AR(q)-GRACH(1,1)
  • AR(q)-GJR(1,1)
input the lag - length of the AR terms in the mean equation and press enter:

键入【5】,回击【Enter】后,弹出窗口如下:
在这里插入图片描述

选择二【Copula】

选择三【Copula in one step】

选择四【Copula Vine】

选择五 【Copula Vine sequentially】

2.2 fitModel

即参数估计
调用命令:

[parameters, LogL, evalmodel, GradHess, varargout] = fitModel(spec, data, solver)

输入参数:

  • spec:Structure that contains model specifications, run modelspec.m, to create it
  • data:[T,n] matrix of appropriate data
  • solver:String with values fmincon or fminunc. Fmincon is the default however for standard errors better use fminunc。值为‘fmincon’或‘fminunc’的字符串。Fmincon是默认的,但是对于标准错误,最好使用fminunc

输出参数:

  • parameters:模型参数column vector of model parameters. In its full generality, the parameters of each margin are put consecutively and last are the copula parameters
  • LogL:最佳情况下的对数似然值 the log likelihood value at the optimum
  • evalmodel:结构化数组,包括优化过程的二次输出,如退出标志、迭代次数。Structure or cell that contains structures. It is the output argument produced by fminunc, with Akaike and BIC values for the corresponding model。包含结构的结构或细胞,它是fminunc产生的输出参数,带有对应模型的Akaike和BIC值
  • GradHess:Structure or cell that contaiins structures that contains the gradient and hessian at the optimum。结构或细胞,包含在最佳状态下含有梯度和的结构
  • varargout:When spec.purpose = ‘fitGARCH’ the standardized residuals from the GARCH models are transformed to uniform. These uniform variables are inputs to Copulas.当spec.purpose = 'fitGARCH’时,将GARCH模型的标准化残差转换为统一残差。这些统一变量是copula的输入。在其它情况下,均为空矩阵。

3 示例

3.1 One step models

调用过程:modelspec→fitModel

3.2 Two step models

调用过程:modelspec→fitModel(重复两次)
具体来说,定义边缘分布(modelspec)→估计参数(fitModel)→定义Copula模型(modelspec)→估计参数(fitModel)

4 帮助

键入下列命令,提供一些动态Copula工具箱函数的简短教程和分类说明。

CopulaToolboxTutorial

在这里插入图片描述
键入【Enter】后,弹出以下窗口:
在这里插入图片描述

参考

1.论文-J2006-The Copula-GARCH model of conditional dependencies An international stock market application
2.论文-J2009-Pair-copula constructions of multiple dependence下载地址
3.论文-J2018-Understanding Relationships Using Copulas

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐