Option Pricing with Greek Calculation

advertisement
Option Pricing with Greek Calculation
Andreas Griewank
Institute for Applied Mathematics, Humboldt Universität zu Berlin, Germany
Matheon, DFG - Research Center, Berlin, Germany
griewank@math.hu-berlin.de
November 14, 2007
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
1 / 24
References
F.Y. Kuo and I. Sloan (2005):
Lifting the Curse of Dimensionality
M. Giles and P. Glassermann (2007):
Smoking Adjoints for Monte Carlo Greeks
A. Griewank and A. Walther (2000, 2008):
Evaluating Derivatives,
Principles and Techniques of Algorithmic Differentiation
A. Griewank (2008):( in preparation)
Evaluating and Bounding Cross-derivatives
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
2 / 24
Contents
Quadratures by Quasi-Monte Carlo (QMC)
Cross-Derivative Evaluation by AD
Cross-Derivative Bounding by AD
Application to Asia Options of 80 stocks
(Tentative) Conclusions
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
3 / 24
High Dimensional Quadrature by QCD
Z
I(f ) =
f (x)dx
with n ≥ 50
[0,1]n
≈
N
N
k ·z +∆
1 X
f (xk ) with xk =
QX (f ) ≡
N k=1
N
k=1
for some generating vector z ∈ Z.
Doable if f is in some sense largely separable, i.e., small cross terms
X
f (x) =
f J (xJ ) for xJ = (xj )j∈J .
J⊂{1,...,n}
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
4 / 24
High Dimensional Quadrature by QCD
This NOVA decomposition is unique if
Z1
f J (xJ )dxj = 0 for all j ∈ J.
0
We call f partially separable if equivalently
f {1,2,...,n} (x) = 0
⇐⇒
f{1,2,,...,n} (x) = 0,
where
fJ (x) ≡
∂ |J| f
(x) denotes cross − derivative
(∂xj )j∈J
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
5 / 24
High Dimensional Quadrature by QCD
Multiplicative bounds g = (γ1 , . . . , γn ) ∈ IR n s.t.
Y
|fj (x)| ≤
γj for x ∈ Ω
j∈J
yield unanchored Sobolev space F w.r.t
hf , hiF
≡
X
J⊂{1,...,n}
Andreas Griewank (HUB, Matheon)
1
Q
γj
j∈J
Z
fJ (x) · gJ (x) dx
[0,1]n
Option Pricing with Greek Calculation
November 14, 2007
6 / 24
Reproducing Kernel by Grace Waba
With
B2 (z) = x 2 − x +
1
2
the kernel
k(x, y ) =
n Y
1 + γj
j=1
1
1 1
B2 (|xj − yj |) + (xj − )(yj − )
2
2
2
yields
Z
hk(·, y ), f (·)i =
k(x, y )f (x)dx = f (y )
[0,1]n
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
7 / 24
High Dimensional Quadrature by QCD
Quadrature Error Bound for X = (xk )Nk=1...
eN (X ) ≡ max [QX (f ) − I(f )]2
f ∈F
=
N
N
1 XX
k(xk , x` )
N 2 k=1 `=1
Average error w.r.t. X ∈ [0, 1]d·N yields
ēN =
≤
Andreas Griewank (HUB, Matheon)
! 21
γk 1+
−1
6
k=1
!
N
X
1
1
√ exp
γk
N
12 k=1
√1
N
n Y
Option Pricing with Greek Calculation
November 14, 2007
8 / 24
(In)Tractability Results
γj = 1
=⇒
eN2 (X )
γ̄ ≡
1
≥
N
∞
X
for j = 1, . . . , N
1/p
γj
13
12
n
−1
<∞
for any X
with p ∈ {1, 2}
j=1
=⇒
(∗)
ēN ≤
Andreas Griewank (HUB, Matheon)


√1 exp(γ̄/12)
N
if p = 1

Cδ
N 1−δ
if p = 2
for any c > 0
Option Pricing with Greek Calculation
November 14, 2007
9 / 24
High Dimensional Quadrature by QCD
Suitable choice: Shifted Lattice Rule
n z
o
xk = k + ∆
with ∆ ∈ [0, 1]n
N
Averaging
w.r.t ∆ yields
ēN2 (z1 , . . . , zn )
n
n 1 XY
kzj
= −1 +
(1 + γj B2
N k=1 j=1
N
allows recursive = greedy construction from z1 = 1 for j = 2, . . . , n
zj = argmin ēN (z2 , . . . , zj−1 , z)
z
result achieves (∗).
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
10 / 24
Cross-Derivative Evaluation by AD
Number cross-derivatives versus all derivatives of order ≤ n
n
2 2n
n
≈
4n
p
πn/2
Cost of propagation through multiplication operation
n
3 Andreas Griewank (HUB, Matheon)
3n
n
≈
6.75n
p
4πn/3
Option Pricing with Greek Calculation
November 14, 2007
11 / 24
Workhorse: Incremental Convolution
for(int j=0;j< h;j++) v[j] = 0; // with h = pow(2,n)
void inconv(int h,double* u,double* w,double* v)
if(h==1)
v[0]+=u[0]*w[0]; // -= u[0]*w[0]; for deconv
else
h = h/2
inconv(h,u,w,v);
inconv(h,u+h,w,v+h);
inconv(h,u,w+h,v+h);
Significant speed up by unrolling lowest 3 levels of recursion!!
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
12 / 24
Recursive Multiplications
void mult(int h, double* u, double* w, double* v)
{
v[0]=u[0]*w[0];
for(int j=1;j<h;j++) v[j] = 0; //Initialize to zero
for(int i=1;i<h;i*=2) // perform two convolutions
{ inconv(i,u+i,w,v+i)
inconv(i,u,w+i,v+i) }
}
The validity of this form can be derived from the Leibniz formula
X
X
vi∪{k} (x) =
uj∪{k} (x) w{i−j} (x) +
uj (x) w{i∪{k}−j} (x)
j⊂i
Andreas Griewank (HUB, Matheon)
j⊂i
Option Pricing with Greek Calculation
November 14, 2007
13 / 24
Division
ui∪{k} (x)
=
X
vj∪{k} (x) w{i−j} (x) +
j⊂i
=
X
uj (x) w{i∪{k}−j} (x)
j⊂i
w∅ vi∪{k} (x) +
X
vj∪{k} (x) w{i−j} (x) +
i6=j⊂i
X
wj (x) w{i∪{k}
j⊂i
void divide(int h, double* u, double* w, double* v)
int i,j; double w0; w0=w[0]
for(j=0;j<h;j++) {v[j]=u[j]/=w0; w[j]/=w0 }
w[0]=0
for(i=1;i<h;i*=2) // perform two convolutions
deconv(i,w+i,v,v+i)
deconv(i,w,v+i,v+i)
w[0] = w0
for(j=1;j<h;j++) { u[j]*=w0; w[i]*=w0; }
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
14 / 24
Exponential
vi∪{k} =
X
v{i−j} (x) vj∪{k} (x)
j⊂i
void exponent(int h, double* u, double* v)
v[0]=exp(u[0])
for(int j=1;j<h;j++) v[j] = 0
for(int i=1;i<h;i*=2) // perform one convolution
conv(i,v,u+i,v+i)
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
15 / 24
Cross-Derivative Bounding by AD
Cheaper Propagation of Bounds
Task
for all v = vi = vi (x) find
g v ≡ (γ1v , . . . , γnv )
v
|vJ (x)| ≤ |J| δ|J|
and δ0v , δ1v , . . . , δnv s.t.
Y
γjv for x ∈ Ω.
j∈J
w.l.o.g δ1V = 1 =⇒ g v ≡ Lipschitz vector.
Initialization (v = xj )
δ0v ≡ max{|xj |},
x∈Ω
Andreas Griewank (HUB, Matheon)
δ1v = 1 = γjv
Option Pricing with Greek Calculation
November 14, 2007
16 / 24
Cross-Derivative Bounding by AD
Addition/Subtraction (v = u ± w )
δ0v = δ0u + δ0w ,
gv = gu + gw
1
1
1
|vJ (x)| ≤
|uJ (x)| +
|wJ (x)|
|J|
|J|
|J|
Y
Y
u
w
≤ δ|J|
γju + δ|J|
γjw
≤
j∈J
j∈J
w
u
{δ|J| + δ|J| } max{γjn , γjn }
|
Andreas Griewank (HUB, Matheon)
for J 6= ∅
{z
v
δ|J|
}
Option Pricing with Greek Calculation
November 14, 2007
17 / 24
Cross-Derivative Bounding by AD
Multiplication (v = u ∗ w )
δuv = δ0u · δ0w , g v = δ0w g u + δ0u g w
X
Y
v
|vJ | ≤
(Leibniz)
uJ 0 · vJ\J 0 ≤ δ|J|
γjv
J 0 ⊂J
where
δjv =
j∈J
1
w
(δ0u )j−k }
max {δku (δ0u )k · δj−k
(δ0u δ0w )j 1≤k≤j
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
18 / 24
Cross-Derivative Bounding by AD
Exponential
v = exp(u) =⇒ v{j} = v · u{j}
δ0v = exp(δ0u ), g v = δ0v · g u
j−1
X
u
v
S(j, k)
δkv δj−k
δj =
k=0
where S(j, k) is Stirling Number.
Total Complexity
OPS{δ0f , . . . , δnf , g f }
≤ c n2
OPS(f )
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
19 / 24
Reverse Mode Gradient Calculation
Complexity:
OPS(∇f (x))
≤ 0 30
OPS(f (x))
but
for any n
MEM(∇f (x))
≤ ` ' OPS(f (x))
MEM(f (x))
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
20 / 24
Asian Option Application
Parameters:
80
=
number of securities = stocks
r
=
0.05 interest rate
T
=
250 = 1/∆t = number of periods
K
=
100 strike price
Si
=
K for i ≤ 80 initial stock price
σ ∈
IR 80
= volatility vector
Σ
=
ΣT ∈ IR 80×80 = Correlation Matrix
Precalculation
AT A = diag (σ) Σ diag (σ), AT ≡ [a2 , . . . , a80 ]
Z
= [z1 , . . . , zT ] with zt ∈ Normal −1 (Rand[0, 1]) ∈ IR 80 )
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
21 / 24
Asian Option Application
Path Evaluation
R=0
for 1 = 1 . . . T
for i = 1 . . . 80
Si
= Si exp
h
√
√ i
r − σi2 /2 ∆t ai zt
R = R + Si
R = max{R/(T · 80) − K , 0}
Single Sample
f = R(K , r , S, σ, Σ, Z )
∇(K ,r ,S,σ,Σ) f ∈ IR 3402
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
22 / 24
Experimental Results
ADOL-C
Runtime (∇f )
'
Runtime (f )
TADBAD
(Giles)
Runtime (∇f )
' 15 for LIBOR option
Runtime (f )
val., hc-b,
0.55, 0.70,
Andreas Griewank (HUB, Matheon)
2.5
4
with − O0
with − O4
hc f, FADBA, AD
1.54, 37.15, 3.06
Option Pricing with Greek Calculation
November 14, 2007
23 / 24
Conclusions, tentative comme tojours
Lattice rules improvable using problem (class) specific bounds?
Cross-derivative propagation efficient, regular memory access!
Bound propagation very similar to univariate Taylor scheme!
Reverse mode differentiation of (Q)MC is cheap
and yields good results if pay-off is Lipschitz
For digital options some ’smoothing’ seems unavoidable’
Possibly mathematics of finance is the Killer Application?
Andreas Griewank (HUB, Matheon)
Option Pricing with Greek Calculation
November 14, 2007
24 / 24
Download