Professional Documents
Culture Documents
Blockkurs
Statistical Analysis
of Financial Data
andreas.ruckstuhl@zhaw.ch
30. Januar 2017
• Lecture 5: Copulas
– Basic Theory
– Gaussian and t-Copulas
– Archimedean Copulas
– Rank Correlation
– Tail Dependence
– Calibrating Copulas (i.e., Estimating Copulas)
– *Vine Copula
A. Ruckstuhl -- WBL 2017, Lecture 5 of SAoFD -- Page 2
8.1 Introduction
• That is
Motivation:
→ “The Gauss-copula is the worst invention ever for credit risk management”.
(A risk Probabilist)
see also http://www.wired.com/techbiz/it/magazine/17-03/wp_quant?currentPage=all
t-copula
Inverse Generator:
• Clayton copula
Generator
→ Clayton copula
The Clayton copula for θ=0 is defined as the independence copula C0.
For -1 < θ < 0 the copula is not strict and there is no probability,
e.g. for d=2: if u1 and u2 are both small then occurs.
In theses cases, the Clayton copula is set equal to 0.
A. Ruckstuhl -- WBL 2017, Lecture 5 of SAoFD -- Page 14
• Gumbel copula
Generator:
Gumbel copula:
• Simulations
On the next slides, simulation of bivariate samples are shown using scatterplots
– All simulations are with a sample size of 200
– And with values of that give dependencies ranging from strongly negative (if
possible) to strongly positive
where Ft,ν+1 is the CDF of the t-distribution with (υ+1) degree of freedom.
• The fitting of the selected model is based on the log-likelihood of (cf. Slide 7)
[The divisor (n+1) ensures that the maximum value of is (n/(n+1) < 1]
• In a second step,
library(Ecdat)
data(CRSPday, package="Ecdat")
IBM <- as.numeric(CRSPday[,5])
CRSP <- as.numeric(CRSPday[,7])
> par(mfrow=c(2,3))
## display data
> plot(UD, main="Data")
## simulate from the fitted copulas
> set.seed(4711)
> htr <- rCopula(n, ht); hgr <- rCopula(n, hg)
> hfr <- rCopula(n, hf); hcr <- rCopula(n, hc)
## display simulated data
> h.pplot <- function(x, main=""){
plot(x, main=main, xlab=expression(u[1]),ylab=expression(u[2]),
col=rgb(0,0,1, alpha=0.2), pch=16) }
> h.pplot(htr, main="From t copula")
> h.pplot(hgr, main="From Gumbel copula")
> h.pplot(hfr, main="From Frank copula”)
> h.pplot(hcr, main="From Clayton copula")
A. Ruckstuhl -- WBL 2017, Lecture 5 of SAoFD -- Page 33
Which simulated copula is most similar to the data?
A. Ruckstuhl -- WBL 2017, Lecture 5 of SAoFD -- Page 34
u1 <- UD[,1]; u2 <- UD[,2]
Udex <- (1:n)/(n+1) ##
h.l <- c(0.02, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 0.9) ## contour levels
## The function 'C.n()' from package copula computes the empirical copula
Cn <- C.n(u=cbind(rep(Udex,n), rep(Udex,each=n)), U=UD, offset=0,method="C")
## prepare the contours of the empirical copula:
EmpCop <- expression(contour(Udex, Udex, matrix(Cn,n,n), col=2, add=T,
levels=h.l))
par(mfrow=c(2,3), las=1, mar=c(3.5,4,2,1), cex.lab=1.2, mgp=c(2.2,0.8,0))
## "raw" data
plot(u1, u2, main="Uniform...", xlab=expression(hat(U)[1]), ylab = expression(hat(U)[2]))
## t
contour(tCopula(param=UD.tc2@estimate[1], dim=2, df=round(UD.tc2@estimate[2])),
pCopula, main=expression(hat(C)[t]), levels=h.l, xlab=...)
eval(EmpCop)
## Frank
contour(frankCopula(param= UD.fc2@estimate[1], dim=2),
pCopula, main=expression(hat(C)[Fr]), levels=h.l, xlab=...)
eval(EmpCop)
## Clayton
contour(claytonCopula(param=UD.cc2@estimate[1], dim = 2),
pCopula, main=expression(hat(C)[Cl]), levels=h.l, xlab=...)
eval(EmpCop)
## Gumbel
contour(claytonCopula(param=UD.gc2@estimate[1], dim = 2),
pCopula, main = expression(hat(C)[Gu]), levels=h.l, xlab=...)
eval(EmpCop)
A. Ruckstuhl -- WBL 2017, Lecture 5 of SAoFD -- Page 35
A. Ruckstuhl -- WBL 2017, Lecture 5 of SAoFD -- Page 36
Assess the fit by AIC
Akaike’s information criterion AIC = -2log-likelihood + 2p
## with R
> h.AIC <- function(obj){
+ np <- length(obj@estimate)
+ h <- obj@loglik
+ c(loglik=h, AIC=-2*h+2*np)
}
> rbind(h.AIC(UD.tc2), h.AIC(UD.fc2), h.AIC(UD.gc2),
h.AIC(UD.cc2))
loglik AIC
[1,] 362.2008 -720.4016
[2,] 325.0530 -648.1059
[3,] 313.8293 -625.6587
[4,] 293.7249 -585.4498
## According to the AIC the t copula fits the data best
• There is a wide range of parametric copula families (Gauss, t, Frank, Clayton, ...)
• But: Standard multivariate copulas
– can become inflexible in high dimensions.
– do not allow for different dependency structures between pairs of variables.
• → Way out: E.g., Vine copulas for higher-dimensional data
• Vine Copulas:
Copulas
The dependency structure is determined by bivariate copulas and a nested
set of trees. Example in d=3 dimensions:
– One possible decomposition of f(x1,x2,x3) is:
– Since
– We obtain
• Practically,
– use the introduced copulas mainly to model 2 dimensional r.v.
– vine copulas enables a flexible modelling of the dependence structure for
portfolios of large dimensions
Chapter 8 Copulas