kcop: The Bivariate K-Copula

Description Usage Arguments Value Author(s) References Examples

Description

Density and distribution function of the bivariate K-copula by Wollschläger and Schäfer (2016).

Usage

1
2
3
pkcopula(u, v, c, N, output = "vector", method = "interpolate")

dkcopula(u, v, c, N, output = "vector")

Arguments

u, v

Numeric vectors with values in [0, 1].

c

Numeric; Pearson correlation coefficient in [-1, 1].

N

Numeric; inverse fluctuation strength of correlations around their average c, N>0. The larger N the smaller the fluctuations around c, and vice versa.

output

Character; output as "vector" (default) for single values of the K-copula, or "matrix" for the full K-copula.

method

Character; method to be used for pkcopula(..., output = "vector"). If method = "interpolate" (default), values are computed by interpolating the bivariate K-copula distribution function (computationally faster); returns NA, if u, v are out of range (here: outside of [.025, .975]). If method = "integrate", values are computed by integrating the bivariate K-copula density (computationally slower).

Value

dkcopula gives the density (PDF), pkcopula gives the distribution function (CDF) of the bivariate K-copula.

Author(s)

Marcel Kremer, marcel.kremer@uni-due.de

References

Wollschläger, M. and Schäfer, R. (2016). Impact of nonstationarity on estimating and modeling empirical copulas of daily stock returns. Journal of Risk, 19(1):1–23. https://doi.org/10.21314/JOR.2016.342. SSRN version: https://ssrn.com/abstract=3533903.

Chetalova, D., Wollschläger, M., and Schäfer, R. (2015). Dependence structure of market states. Journal of Statistical Mechanics: Theory and Experiment, 2015(8):P08012. https://doi.org/10.1088/1742-5468/2015/08/P08012. SSRN version: https://ssrn.com/abstract=3533951.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Parameters
u <- seq(.05, .95, .05)
v <- u
rho <- .2
N <- 4

## K-copula PDF
dkcopula(.5, .5, rho, N)


## Plot full K-copula PDF
kcopula_pdf <- dkcopula(u, v, rho, N, output = "matrix")
persp(u, v, kcopula_pdf)

## K-copula CDF
pkcopula(.5, .5, rho, N)

## Plot full K-copula CDF
kcopula_cdf <- pkcopula(u, v, rho, N, output = "matrix")
persp(u, v, kcopula_cdf)

mlkremer/kcopula documentation built on May 2, 2021, 12:04 a.m.