Professional Documents
Culture Documents
and the
Measurement of Model Risk
P. Hnaff
IAE Paris
Universit Paris 1 Panthon-Sorbonne
26 Nov 2012
IAE-Logo
Model Risk
Model Risk Defined
Model Risk
I
Model Risk
Model Risk Defined
Some References
Model Risk
Model Risk Defined
Some References
Model Risk
Model Risk Defined
Model Risk
Problem Statement
(1)
inf
j=1,...,n
E Qj [X ]
Risk measure :
IAE-Logo
Q = (X ) (X )
Model Risk
Problem Statement
Focus of talk
(2)
IAE-Logo
Model Risk
Problem Statement
Focus of talk
(3)
ci
n
if
0 L(Q|P) 1
Average log-likelihood :
L(Q|P)
= log L(Q|P)1/n
IAE-Logo
lim L(Q|P)
=
qi log
qi
pi
= DKL (Q|P)
eDKL (Q|P) : average likelihood of observing distribution Q when
P is the actual process.
IAE-Logo
0 2 4
X
0.8
0.4
Avg. Likelihood
0.0
0 8 43 8 2
0 2 4
X
0.8
0.4
0.0
=0
= 0.8
Avg. Likelihood
1.0
0.0
1.0
Model Features
Definition (Model Features)
The model features X are the set of observations on the risk
factors that are needed to determine the payoff of a financial
instrument.
Example :
I
IAE-Logo
= dWt
Var(ln(F (T , T ))) = 2 T
dF (t, T )
F (t, T )
= e(T t) dWt
Var(ln(F (T , T ))) =
2
1 e2T
2
(5)
(6)
(7)
(8)
IAE-Logo
0.10
0.05
0.00
Integrated variance
0.15
BS
Onefactor
0.0
0.5
1.0
1.5
2.0
Time
IAE-Logo
Calculation of KL-Divergence
Kullback-Leibler divergence between two equivalent probability
distributions, with observed features in R d .
I
Discrete density
D(Q, P) =
qi log
i
I
qi
pi
Continuous density
Z
D(Q|P) =
Rd
fQ (x) log
fQ (x)
fP (x)
dx
IAE-Logo
X
f (X ) = 1
KH (X Xi )
n
i=1
where :
X is a feature vector in R d
H is a symmetric, positive definite matrix of rank d
K is the kernel function : a symmetric multivariate
density :
1
KH (X ) = kHk 2 K (H 2 X )
IAE-Logo
Kernel function
Use a uniform density over a domain which is function of the
local density of sample points.
IAE-Logo
K (x) =
1kxxi kRx
Rxd cd
with :
Rx radius of uniform density
d dimension of features space
cd volume of unit sphere in R d
Define Rx as the distance to the k -th nearest neighbor of x.
IAE-Logo
KL Divergence
Using the expression for density in terms of k-nn statistics one
gets :
d X
k (U, X )
|U|
+
log
(9)
D(Q, P) = log
|V |
|V |
k (V , X )
X V
With :
d dimension of feature space
U, V sample sdrawn from Q and P
k (U, X ) distance to k -th nearest neighbor of X in sample
U.
See : Boltz, Debreuve and Barlaud. High-dimensional statistical
measure for region-of-interest tracking. IEEE Transactions on IAE-Logo
Image Processing (2009).
IAE-Logo
k 1
nV (k , x)
Proposition
(x)) =
VAR (p
(k 1)(n 1)
(x)2
1 p
(k 2)n)
IAE-Logo
Variance of D(Q, P)
D(Q, P) = C +
d X
[log (k (U, X )) log (k (V , X ))] (10)
|V |
X V
IAE-Logo
Variance of D(Q, P)
U (x) =
p
k 1
nk (U, x)cd
IAE-Logo
Variance of D(Q, P)
U (x) =
p
k 1
nk (U, x)cd
Use :
k (U, x) =
k 1
U (x)cd
np
and
Var (f (X )) f 0 (E(X ))2 Var(X )
IAE-Logo
Variance of D(Q, P)
U (x))
Use Luenbergers expression for Var(p
U (x) = 1/n)
The samples points are iid (p
V (x) = 1/n
Approximate also p
to get :
Var(k (U, x)) =
(k 1)(n 1)
1
(k 2)n
IAE-Logo
Variance of D(Q, P)
Finally :
Var(DL(Q, P)) =
2n
|U|
(k 1)(n 1)
1
(k 2)n
IAE-Logo
D(Q, P)i
D(Q,
P) =
N
i
Var D(Q,
P) =
1
N(k 2)
IAE-Logo
1
N(k 2)
such that :
Nn(1 + k ) = T
= n
k
which has the solution :
s
k =2+
4+
IAE-Logo
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
10
12
14
16
IAE-Logo
Empirical validation
0.017
0.016
0.015
0.014
0.013
0.012
0.011
0.010
0.0092
10
12
14
IAE-Logo
Summary : Construction of Q
1. Simulate a sample V of feature vectors X for reference
model P.
2. Define a list {Qj } of candidate models. This list may be
built by perturbation of the parameters of P, or by
postulating alternate stochastic processes. There are no
constraints on the method used.
3. Simulate samples Uj of feature vectors X for each model
Qj .
4. Retain models Qj such that :
E Qj (Hi ) C bidi , C aski
i I
IAE-Logo
IAE-Logo
IAE-Logo
Numerical Illustration
data
Illustration
I
I
IAE-Logo
Numerical Illustration
data
Data
IAE-Logo
Numerical Illustration
Model Universe
dSt
=
St
Nt
X
1 2
dt + Wt +
Yi
2
i=1
(11)
fY (y ) = p1 e1 y 1y 0 + (1 p)2 e2 y 1y <0
Nt is a Poisson process with rate .
1
16.15
2
1.85
.206
p
.225
.118
IAE-Logo
Numerical Illustration
Model Universe
IAE-Logo
Numerical Illustration
Model Universe
IAE-Logo
Numerical Illustration
Model Universe
IAE-Logo
Numerical Illustration
Model Universe
dSt
= dt + t dWts
St
dt = ( t )dt + t dWt
.1104
.5045
.3591
-.74
t
.0272
IAE-Logo
Numerical Illustration
Model Universe
IAE-Logo
Numerical Illustration
Model Universe
IAE-Logo
Numerical Illustration
Model Universe
IAE-Logo
Numerical Illustration
Model Universe
20
15
10
5
0
1.00
0.95 0.90 0.85 0.80 0.75 0.70 0.65 0.60 0.55
Average Likelyhood
IAE-Logo
Numerical Illustration
Model Universe
25
20
15
10
5
00.9
0.8
0.7
0.6
0.5
Average Likelyhood
0.4
0.3
0.2
IAE-Logo
Numerical Illustration
Model Universe
80
60
40
Model Risk
Asian
Lookback
Range
20
0.0
0.2
0.4
0.6
0.8
1.0
KL Divergence
IAE-Logo
Conclusion
Conclusion
I
IAE-Logo
Technical Details
Implementation details
I
I
QuantLib : www.quantlib.org
Python wrapper : pyql www.github.com
IAE-Logo