分类
外匯交易平臺

Copula-GARCH模型下的两资产期权定价

karjamatti/Copula-GARCH

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, Copula-GARCH模型下的两资产期权定价 download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

This app simulates daily returns of a portfolio that consists of 4 asset class indices. The simulation is based on the GARCH-Copula framework.

The App is currently written so that it runs on MacOS. If you wish to run it Copula-GARCH模型下的两资产期权定价 on other systems, please check that the path to the data file works.

A lot of the packages used in the script require compiling. This can get dicey, but some tips and tricks I can give are:

  • Install homebrew (availble from https://brew.sh/)
  • Install the required compilers (an easy way is to run the command: $ brew install gcc)
  • Check the "Makevars" -file in ~/.R/

The "Makevars" -file should be something along the lines of:

where the number 9 etc. corresponds Copula-GARCH模型下的两资产期权定价 to your gcc version. (run the command "$ which gcc" to find out.)

APP USER INSTRUCTIONS

An easy way to run the app, is to open the script in RStudio, and run all of the code. This should eventually open a pop up window with the user interface. Do not attempt to alter the code while the pop-up is open!

The script should automatically load, or install and load and load any required packages. however, do keep in mind that the packages might require compiling, which usually asks for a simple user-input (y/n). These inputs might mess up Copula-GARCH模型下的两资产期权定价 Copula-GARCH模型下的两资产期权定价 sourcing/running the code, so maybe try installing the required packages in the console first.

Typically, the user should only need to adjust or specify parameters that are accessible through the user interface of the app. However, if the application shows an error messages, this might be due to incorrectly specified parameters in the script. (e.g. number of index return vectors per asset class)

The parameters most likely needing adjustment Copula-GARCH模型下的两资产期权定价 are at the beginning of the script for convenience.

DEFAULT DATA SET

On Github, the original default dataset is not provided due to licensing reasons. However, a pseudo-dataset based on the original with randomization is provided.

To ensure the functionality of the app, Copula-GARCH模型下的两资产期权定价 the data should be called 'dailydata.csv', and contain trading dates in the first Copula-GARCH模型下的两资产期权定价 column (header 'Date'), and the returns of the following 7 indices/instruments:

PROVIDING CUSTOM INDEX RETURNS AND UPDATING THE DEFAULT DATA SET

In order to yield accurate condtional forecasts, the return data should be updated daily. (Ironically enough, this is not the case for me, since I do not have access to the original data source any longer. )

When/if updating data, please remember to keep in mind:

SPECIFYING PARAMETERS IN THE SCRIPT

The Copula-GARCH模型下的两资产期权定价 most likely cause for adjusting parameters in the script is in case the user wants to provide their own return data. In this case, the number of return Copula-GARCH模型下的两资产期权定价 indices in the adjusted data file should be specified, so that the user interface recognizes which asset classes the indices belong to.

Also, the number of simulated variates can be changed by adjusting the parameters at the beginning of the script. Keep in mind, that while this speeds up the simulations, it reduces the convergence of Copula-GARCH模型下的两资产期权定价 the model fitting, and might yield surprisingly inaccurate forecasts.

It is very well possible that some index returns do not fit the GARCH-specfications that well. It is also Copula-GARCH模型下的两资产期权定价 possible that the GARCH-fit might not be sufficient for parameter convergence! In case of Copula-GARCH模型下的两资产期权定价 no convergence, you can try to specify a tolerance parameter in the garch fit, for example:

on line 167 of the application script

The correctness of the script is Copula-GARCH模型下的两资产期权定价 also not guaranteed! If you see something weird and cath a bug, please shoot me an email at [email protected]!

The script is likely to contain errors, bad practices and other mishaps. If you have any questions, please contact the email address found in this document.

About

This is a portfolio risk visualization tool, based on a Copula-GARCH framework and a Shiny UI.

Copula-GARCH versus dynamic conditional correlation: an empirical study on Copula-GARCH模型下的两资产期权定价 VaR and ES forecasting accuracy

In this paper, we analyze the accuracy of the copula-GARCH and Dynamic Conditional Correlation (DCC) models for forecasting the value-at-risk (VaR) and expected shortfall (ES) of bivariate portfolios. We then try to answer two questions: First, does the correlation-based DCC model outperform the copula models? Second, how can the optimal model for forecasting portfolio risk be identified via in-sample analysis? We address these questions using an extensive empirical study of 1,500 bivariate portfolios containing data on stocks, commodities and foreign exchange futures. Furthermore, we propose to use linear discriminant analysis estimated from descriptive statistics on bivariate data samples as independent variables to identify a parametric model yielding optimal portfolio VaR and ES estimates. In particular, we try to answer the question Copula-GARCH模型下的两资产期权定价 whether the quality of a parametric model’s VaR and ES estimates is driven by Copula-GARCH模型下的两资产期权定价 common data characteristics. The results show that the proposed use of linear discriminant analysis is superior to both the Kullback-Leibler Information Criterion and several copula goodness-of-fit tests in Copula-GARCH模型下的两资产期权定价 Copula-GARCH模型下的两资产期权定价 terms of overall classification accuracy. Furthermore, the results show that the quality of the DCC model’s VaR and ES estimates is positively correlated with the portfolio marginals’ volatility, while the opposite is true for the elliptical copulas. For the Archimedean copulas in Copula-GARCH模型下的两资产期权定价 particular, the excess kurtosis of the marginals has a significant positive influence on quality of the VaR and ES estimates.

请问如何用Matlab对多元t-copula模型进行参数估计啊?

粗略地说,这些等级相关性衡量一个 rv 的大值或小值与另一个 rv 的大值或小值相关联的程度。然而,与线性相关系数不同,它们仅根据等级来衡量关联。因此,在任何单调变换下都保留了等级相关性。特别是,刚刚描述的变换方法保留了等级相关性。因此,知道双变量正态 Z 的秩相关准确地确定了最终变换后的 rv 的 X 的秩相关。 虽然仍然需要 rho 来参数化潜在的双变量正态,但 Kendall 的 tau 或 Spearman 的 rho 在描述 rv 之间的相关性时更有用,因为它们对于边缘分布的选择是不变的。

事实证明,对于二元正态分布,Kendall's tau 或 Spearman's rho 与线性相关系数 rho 之间存在简单的 1-1 映射:

因此,通过为 Z1 和 Z2 之间的线性相关选择正确的 rho 参数值,很容易在 X1 和 X2 之间创建所需的秩相关,而不管它们的边缘分布如何。

copula

上述构造的第一步定义了所谓的 copula,特别是高斯 copula。双变量 copula 只是两个随机变量的概率分布,每个变量的边缘分布都是均匀的。这两个变量可能是完全独立的、确定性相关的(例如,U2 = U1),或者介于两者之间。二元高斯 copulas 族由 Rho = [1 rho; rho 1],线性相关矩阵。当 rho 接近 +/- 1 时,U1 和 U2 接近线性相关,当 rho 接近零时接近完全独立。

不同水平 rho 的一些模拟随机值的散点图说明了高斯 copula 的不同可能性范围:

U1 和 U2 之间的相关性与 X1 = G(U1) 和 X2 = G(U2) 的边缘分布完全分开。X1 和 X2 可以被赋予 任何 边缘分布,并且仍然具有相同的秩相关。这是 copula 的主要吸引力之一——它们允许对依赖性和边缘分布进行这种单独的规范。

t Copulas

可以通过从二元 t 分布开始并使用相应的 t CDF 进行转换来构建不同的 copula 族。二元 t 分布使用 Rho(线性相关矩阵)和 nu(自由度)进行参数化。因此,例如,我们可以说 at(1) 或 at(5) copula,分别基于具有 1 个和 5 个自由度的多元变量 t。

不同水平 rho 的一些模拟随机值的散点图说明了 t(1) copulas 的不同可能性范围:

t copula 对 U1 和 U2 具有均匀的边缘分布,就像高斯 copula 一样。at copula 中成分之间的秩相关 tau 或 rho_s 也是与高斯函数相同的 rho 函数。然而,正如这些图所示,at(1) copula 与高斯 copula 有很大不同,即使它们的成分具有相同的等级相关性。不同之处在于它们的依赖结构。毫不奇怪,随着自由度参数 nu 变大,at(nu) copula 接近相应的高斯 copula。

与高斯 copula 一样,可以在 copula 上施加任何边缘分布。例如,使用具有 1 个自由度的 copula,我们可以再次从具有 Gam(Copula-GARCH模型下的两资产期权定价 2,1) 和 t(5) 边缘的二元分布生成随机向量:

与之前构建的基于高斯 copula 的双变量 Gamma/t 分布相比,这里基于 at(1) copula 构建的分布具有相同的边缘分布和相同的变量之间的秩相关,但依赖性却大不相同结构体。这说明了一个事实,即多元分布并不是由它们的边缘分布或它们的相关性唯一定义的。应用程序中特定 copula 的选择可能基于实际观察到的数据,或者可以使用不同的 copula 来确定模拟结果对输入分布的敏感性。

高维 Copulas

Gaussian 和 t copula 被称为椭圆 copula。很容易将椭圆 copula 推广到更多维度。例如,我们可以使用 Gaussian Copula-GARCH模型下的两资产期权定价 Copula-GARCH模型下的两资产期权定价 copula 模拟来自具有 Gamma(2,1)、Beta(2,2) 和 t(5) 边缘的三变量分布的数据,如下所示。

请注意,线性相关参数 rho 与例如 Kendall tau 之间的关系对于此处使用的相关矩阵 Rho 中的每个条目都成立。我们可以验证数据的样本秩相关近似等于理论值。

Copulas 和经验边缘分布

为了使用 copula 模拟相关的多元数据,我们已经看到我们需要指定

这些数据集的经验逆 CDF 只是一个阶梯函数,步长为 1/nobs、2/nobs、. 1。步长只是排序后的数据。

对于模拟,我们可能想要尝试不同的联结和相关性。在这里,我们将使用具有相当大的负相关参数的二元 t(5) copula。

模拟数据的边缘直方图与原始数据的边缘直方图非常匹配,并且随着我们模拟更多对值而变得相同。请注意,这些值是从原始数据中提取的,并且由于每个数据集中只有 100 个观测值,因此模拟数据有些“离散”。克服此问题的一种方法是向最终模拟值添加少量随机变化(可能为正态分布)。这等效于使用经验逆 CDF 的平滑版本。

Copula-GARCH模型下的两资产期权定价

Please note that Internet Explorer version 8.x is not supported as of January 1, 2016. Please refer to this support page for more information.

Borsa Istanbul Review

Add to Mendeley

Abstract

This Copula-GARCH模型下的两资产期权定价 paper minimizes the risk of Brent oil in a multivariate portfolio, with three risk-minimizing goals: variance, parametric value-at-risk (VaR), and semiparametric value-at-risk. Brent oil is combined with five Copula-GARCH模型下的两资产期权定价 emerging ASEAN (Association of Southeast Asian Nations) stock indexes and five more developed non-ASEAN Copula-GARCH模型下的两资产期权定价 indexes. The preliminary dynamic equiciorrelation estimates indicate that the ASEAN stock indexes are less integrated and thus potentially better for diversification purposes. The portfolio results show that the ASEAN indexes are better hedges for oil in terms of minimum variance and minimum VaR. However, although the ASEAN indexes have higher extreme risk, we find that a portfolio with these indexes has slightly lower modified VaR than a portfolio with the Copula-GARCH模型下的两资产期权定价 non-ASEAN indexes. The reason is probably the higher variance and higher equicorrelation of the non-ASEAN indexes, because these inputs affect the value of the modified downside risk of Copula-GARCH模型下的两资产期权定价 a portfolio. As a complementary analysis, we put a 50 percent constraint on Brent in the portfolios, and then the portfolios with the non-ASEAN indexes have better risk-minimizing results.