Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Copulas (1)
András Bárdossy
IWS
Universität Stuttgart
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Motivation
• Data collection• Data analysis
– What do data tell us ?– Are the data related to each other ?– Can these relations be
• Verified ?• Quantified ?
– Can the results be applied ?• Future • Partly unobserved cases
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Dependence
1. Pair wise description • Linear dependence • Monotonic dependence• Tail dependence (extremes)
2. Measures of dependence
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Correlation and Covariance
• Measure of linear dependence
][][
,,
][][,
YDXD
YXCovYXCor
YEYXEXEYXCov
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
-4 -2 0 2 4
0
4
8
12
16
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
0 0.2 0.4 0.6 0.8 1
0
4
8
12
16
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
0 4 8 12 16
0
4
8
12
16
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
0 0.2 0.4 0.6 0.8 1
0
4
8
12
16
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
-4 -2 0 2 4
-4
-2
0
2
4
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Dependence – marginal distributions
• Dependence is a bivariate relationship• For the previous example for any two indices k,l there is
a pair of continuous monotonic functions f,g such that:
• Problem: changing the marginals the dependence seems to change
)()(
)()(
)()( ,...,1,,...,1 ,
likl
ki
likl
ki
mi
mi
ygy
xfx
niMmyx
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Copula
• Multivariate distribution with univariate margins being U(0,1)
1,0 2 10
0),...,()1(
0 ),...,( if 0)(
)1,...,,...,1( )(
]1,0[]1,0[:
1
0
12
0111
1
)()(
1
ii
n
iikkkk
nnnj
j
in
ii
ii
n
jjjjuu
jujuC
uuuC
uuC
C
nn
ii
uu
uu
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
• Copula density
n
nn
n uu
uuCuuc
...
),...,(),...,(
1
11
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Bi-variate Copula
• Bi variate distribution with univariate margins being U(0,1)
10
0),(),(),(),(
0),0( 0)0,(
),1( )1,(
]1,0[]1,0[:
212112212211
21
2211
2
kkk uu
uuCuuCuuCuuC
uCuC
uuCuuC
C
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Copula corresponding to a multivariate distribution
• Sklar (1959) F can be represented with a copula• If marginals are continuous then C is unique
• C – pure expression of dependence
)(),...,()(
)(),...,()(1
11
1
11
nn
nn
uFuFFC
xFxFCF
u
x
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Transformation to uniform marginals
,...,set in the ofrank the)(
,...,1 21
)(,2
1)(
,...,1 ),(
1 nii
ii
ii
xxxxR
nin
yRn
n
xRn
niyx
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
0 0.2 0.4 0.6 0.8 1
Variable A
0
0.2
0.4
0.6
0.8
1
Va
riabl
e B
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Why copulas ?
• Interest in financial mathematics because of modelling the dependence structure
• International regulations require banks to provide estimates of their “Value at Risk” or VaR
• The standard method – estimating the correlation matrix between for the portfolio – Calculation of the 95% and 99% confidence intervals for
possible losses based on an assumption of multivariate normality
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
• In practice the tails of the distributions are – heavier than the normal
– correlation structure tends to be different in the tails.
• The correlation between variables seems to increase in the upper and/or lower tails. “When things go wrong, they go very wrong”.
• marginal distributions with heavier tails• alternative ways of modelling the dependence between variables• Copulas are particularly useful for this because they dissociate the
correlation structure between variables from their marginal distributions.
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Copula: Rain – Moisture flux
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
0.001
0.002
0.003
0.004
0.005
0.006
0.007
0.008
0.009
0.01
0.011
0.012
0.013
0.014
0.015
0.016
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Weak dependence
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
M oisture flux
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Pre
cip
itatio
n a
mo
un
t
00.10.20.30.40.50.60.70.80.911.11.21.31.41.51.61.71.81.922.12.22.32.42.5
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Bounds of a Copula
• Fréchet bounds:
Lemma: Let Ai be events such that P(Ai)=ai i=1,…,m
Proof: Right side trivial because of inclusion
Left side
)(min)()1(...,0max 1 ii
m uCmuu u
)(min)...())1(...,0max( 11 ii
mm aAAPmaa
m
ii
m
ii
m
i
ci
cm
cm
maa
APAAPAAP
11
111
)1()1(1
)(1)...(1)...(
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Fréchet bounds
dependence Full
copula a is )(min)(
1UU
uC
k
ii
U
u
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Frechet upper bound
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
00.040.080.120.160.20.240.280.320.360.40.440.480.520.560.60.640.680.720.760.80.840.880.920.961
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Frechet lower bound
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
00.040.080.120.160.20.240.280.320.360.40.440.480.520.560.60.640.680.720.760.80.840.880.920.961
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Fréchet bounds
• For m>2 further conditions are required
dependence negative Full
1
copula a is )1,0(max)(
12
21
UU
uuCi
L
u
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
• Independence copula:
1),(
),(
)()()()(
),(),(
21
2121
22112211
221121
uuc
uuuuC
xFxFxXPxXP
xXxXPxxF
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Copulas and monotonic transformations
• Monotonic transformations of the marginals do not influence the copula
• Frequent modelling – transform the marginal until linear relationship can be used use of the normal copula
)(),...,()(),...,()(
)(1
111
11
11 mYYYmXXX
iii
uFuFFuFuFFC
XhY
mm
u
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
How to make theoretical copulas
m
iii
iuuC
CCC
1
21
)1()(min)(
:Example
10 )()1()()(
u
uuu
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
• Properties (continuous case)
1
0
1
0
1),(
1),(
0),(
dvvuc
duvuc
vuc
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Creating copulas from multivariate distributions
• Take the copula of a known distribution:
• Example – strong upper dependence
))(),...,(()( 11
11 mm uFuFFC u
else 3
25.0),min( if 2
),(
10
21
21
xxxxF
xi
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
• Creating a copula using its density – Rüschendorf
1),(),(
0),(),(),(
),(),(),(),(),(
0),(
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
vuLfvuc
dvvuLfduvuLfdudvvuLf
dudvvufdvvufduvufvufvuLf
vuf
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Measures of dependence
• Correlation – Copula = Rank correlation Spearman
function Survival
),(1),(
3),(123),(12
vuCvuvuC
dudvvuCvuuvdCS
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
R=0.88
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
R=0.88
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
R=0.88
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Tail dependence
• Upper tail dependence:
• Lower tail dependence
0)1(
),(lim
1
Uu u
uuC
0),(
lim0
Lu u
uuC
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Types of dependence (1)
• Positive quadrant dependence:
• Negative quadrant dependence:
21221121
2122112211
2121
, )()(),(
: toequivalent
, )()(),(
),( ),(
aaaFaFaaF
aaaXPaXPaXaXP
xxFXX
X
21221121 , )()(),( aaaFaFaaF
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Types of dependence (2)
• X2 stochastically increasing in X1 if :
• X2 stochastically decreasing in X1
211122
2121
)|(
),( ),(
aaaXaXP
xxFXX
X
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Symmetry of the dependence
• Main axis
• Minor axis
),(),( vucvuc
)1,1(),( uvcvuc
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Normal copula
• Correlation = 0.85
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Frank Copula
)exp(1
))exp(1))(exp(1()exp(1ln
1),,(
d
dvdud
ddvuC
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Frank Copula (d=3)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
00.61.21.82.433.64.24.85.466.67.27.88.499.610.210.811.41212.613.213.814.415
Universität Stuttgart Institut für Wasserbau, Lehrstuhl für Hydrologie und Geohydrologie
Copulas
ddd vuvuC
vuvuC/1
/1
)ln()ln(exp),(
)1(),(