Professional Documents
Culture Documents
Slides 2 Execution
Slides 2 Execution
Trading
University of Oxford
Álvaro Cartea
alvaro.cartea@maths.ox.ac.uk
http://www.cartea.net
1 / 21
Optimal Execution
2 / 21
Model Setup
I ν = (νt ){0≤t≤T } is the trading rate, the speed at which the agent is
liquidating or acquiring shares. It is also the variable the agent
controls in the optimisation problem,
I Q ν = (Qtν ){0≤t≤T } is the agent’s inventory, which is clearly affected
by how fast she trades,
I S ν = (Stν ){0≤t≤T } is the midprice process, and is also affected in
principle by the speed of her trading,
I Ŝ ν = (Ŝtν ){0≤t≤T } corresponds to the price process at which the
agent can sell or purchase the asset, i.e. the execution price, by
walking the LOB , and
I X ν = (Xtν ){0≤t≤T } is the agent’s cash process resulting from the
agent’s execution strategy.
3 / 21
Model Setup
where
I W = (Wt ){0≤t≤T } is a standard Brownian motion,
where
I f : R+ → R+ denotes the temporary impact that the agent’s trading
action has on the price they can execute the trade at.
I ∆ ≥ 0 is the bid-ask spread, assumed here to be a constant.
4 / 21
SMH on Oct 1, 2013
SMH on Oct 1, 2013 0.04
at 10:59:59.960
40.45
Price Impact
0.03
40.4
40.35
Price
0.02
40.3
40.25 0.01
40.2
0
0 0.5 1 1.5 2 0 0.5 1 1.5 2
Volume x 10
4 Volume 4
x 10
-4
0.04 10
Mean Impact
Linear Regression
Price Impact
Price Impact
0.03 -5
10
0.02
-6
10
0.01
-7
0 10
0 0.5 1 1.5 2 10 12 14 16
Volume 4
x 10 Time
5 / 21
Optimal Liquidation with Temporary Impact
6 / 21
Liquidation
hR i
T
H(t, S, q) = sup Et,S,q t
(Su − k νu ) νu du ,
ν∈A
The agent must liquidate all the inventory by time T , hence impose
t→T t→T
H(T , S, q) −−−→ −∞, for q > 0, and H(T , S, 0) −−−→ 0 .
7 / 21
Liquidation
The FOC applied to DPE (12):
ν∗ = 1
2k (S − ∂q H) , (3)
The optimal strategy must ensure that the terminal inventory is zero and
this is equivalent to requiring h2 (T ) → −∞ as t → T . In this way the
value function heavily penalises non-zero final inventory. An alternative
way to obtain this condition is to calculate the inventory path along the
optimal strategy and impose that the terminal inventory be zero. To see
this, use the ansatz (5) to reduce (3) to
∗
νt∗ = − k1 h2 (t) Qtν , (7)
9 / 21
∗
then integrate dQtν = −νt∗ dt over [0, t] to obtain the inventory profile
along the optimal strategy:
t ∗ t
dQtν (T − t) − k/h2 (T )
Z Z
h2 (s) ∗
∗ = ds ⇒ Qtν = N.
0 Qtν 0 k T − k/h2 (T )
∗
To satisfy the terminal inventory condition QTν = 0, and also ensure that
the correction h(t, q) is negative, we must have
h2 (t) → −∞ as t → T . (8)
Hence
h2 (t) = −k (T − t)−1 ,
so that
∗
t
Qtν = 1 − N, (9)
T
and
N
νt∗ = . (10)
T
The result is TWAP.
10 / 21
Optimal Acquisition with Temporary Impact
11 / 21
Acquisition
12 / 21
Applying the DPP, H satisfies the DPE
ν∗ = 1
2k (∂y H − S) , (13)
Make ansatz
h2 (T ) = α and h1 (T ) = h0 (T ) = 0 .
13 / 21
Moreover, upon substituting the ansatz into the above non-linear PDE
we find that
0 = ∂t h2 − k1 h22 y 2 + ∂t h1 − 2k
1 1 2
h2 h1 y + ∂t h0 − 4k h1 .
1 1 −1
h2 (t) = k (T − t) + α .
14 / 21
Inventory path
We obtain the optimal inventory path by solving
∗
k −1 ∗
dYtν = − (T − t) + Ytν dt
α
∗
for Ytν . Recall that Ytν = N − Qtν , so
∗ t
Qtν = k
N. (16)
T+ α
N
νt∗ = k
. (17)
T+ α
15 / 21
Optimal Liquidation with Temporary and
Permanent Price Impact
16 / 21
Liquidation with Permanent Price Impact
The DPP implies that the value function should satisfy the HJB equation
0 = ∂t + 21 σ 2 ∂SS H − φ q 2
17 / 21
Assume that f (ν) = k ν and g (ν) = b ν for constants k ≥ 0 and b ≥ 0
and obtain
(S ∂x − b ∂S − ∂q )H
ν ∗ = 21k . (20)
∂x H
Hence
2
[(S ∂x − b ∂S − ∂q )H]
0 = ∂t + 21 σ 2 ∂SS H − φ q 2 + 1
4k .
∂x H
Make ansatz H(t, x, S, q) = x + S q + h(t, S, q) with terminal condition
h(T , S, q) = −α q 2 . Hence
2
0 = ∂t + 21 σ 2 ∂SS h − φ q 2 + 1
4k [b (q + ∂S h) + ∂q h] .
18 / 21
Since the above PDE contains no explicit dependence on S and the
terminal condition is independent of S, then ∂S h(t, S, q) = 0 and
2
0 = ∂t h(t, q) − φ q 2 + 1
4k [b q + ∂q h(t, q)] .
Use separation of variables h(t, q) = h2 (t) q 2 where h2 (t) to write
2
0 = ∂t h2 − φ + k1 h2 + 12 b ,
(21)
subject to h2 (T ) = −α. This ODE is of Riccati type and can be
integrated exactly. Let h2 (t) = − 21 b + χ(t), then
∂t χ 1
2
= ,
kφ − χ k
s.t. χ(T ) = 12 b − α. Next, integrating over [t, T ]
√ √
k φ + χ(T ) k φ + χ(t)
log √ − log √ = 2γ (T − t) ,
k φ − χ(T ) k φ − χ(t)
so that
p 1 + ζ e 2γ (T −t)
χ(t) = kφ ,
1 − ζ e 2γ(T −t)
where r √
φ α − 12 b + k φ
γ= and ζ = √ . (22)
k α − 12 b − k φ
19 / 21
From (20), the optimal speed to trade at is
r
∗ φ 1 + ζ e 2γ (T −t) ν ∗
νt = − Q . (23)
k 1 − ζ e 2γ(T −t) t
In addition
Z t
∗ χ(t) ν ∗ ∗ χ(s)
dQtν = Qt dt , so that Qtν = N exp ds .
k 0 k
To obtain the inventory process
Z t
1 t p 1 + ζe 2γ(T −s)
Z
χ(s)
ds = kφ ds
0 k k 0 1 − ζe 2γ(T −s)
ζ e γ(T −t) − e −γ(T −t)
= log ,
ζ e γT − e −γT
hence
∗ ζ e γ(T −t) − e −γ(T −t)
Qtν = N. (24)
ζ e γT − e −γT
In the limit α → +∞
∗ sinh (γ(T − t))
Qtν −−−−−→ N,
α→+∞ sinh (γT )
which is independent of b.
20 / 21
1 10
φ=0 φ=0
φ = 0.001 φ = 0.001
0.8 φ = 0.01 8 φ = 0.01
Trading Speed
φ = 0.1 φ = 0.1
Inventory
0.6 6
0.4 4
0.2 2
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
Time Time
(a) α = 0.01
1 12
φ=0 φ=0
φ = 0.001 φ = 0.001
0.8 φ = 0.01 10 φ = 0.01
Trading Speed
φ = 0.1 φ = 0.1
Inventory
8
0.6
6
0.4
4
0.2 2
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
Time Time
(b) α = +∞
Figure : Other model parameters are k = 10−3 , b = 10−3 .
21 / 21