Numerical methods for an optimal order execution
Transcript of Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Numerical methods for an optimal order execution
Fabien Guilbaud
EXQIM, and LPMA, University Paris 7, [email protected]
June 18, 2010
Joint work with H.Pham1 and M.Mnif2
1LPMA, University Paris 7, CREST-ENSAE, and Institut Universitaire deFrance, [email protected]
2ENIT, Tunis, [email protected] Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Contents
1 Introduction
2 Model
3 Discretization
4 Algorithm
5 Numerical results
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
ProblemBibliographical review
Market impact and liquidation costs
Implementation shortfall: difference between a theoreticaltrading strategy and its implementation=⇒ Need of low-touch execution strategy
Market impact is key factor when executing large orders
One famous worst case example: Kerviel’s portfolio liquidation
Basic observation: market impact is reduced when theliquidation operation is extended in time
Idea is to split a big order into several small orders=⇒ trade-off between rapid execution (big impact but reducedrisk) and gradual trading (reduced impact but more risk)
=⇒ Our goal is to find optimal trading schedule and associatedquantities
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
ProblemBibliographical review
Bibliographical review
Almgren and Chriss (2001) [1] first provided a framework tomanage market impact: mean-variance criterion, staticstrategy
Several authors propose price impact models based on stylizeddynamics of order book: Schied et al. (2009)[10], Gatheral etal. (2010)[3] and Obizhaeva and Wang (2005) [6].
Some approaches using optimal control: Rogers and Singh(2008) [9], Forsyth (2009)[2], Ly Vath, Mnif and Pham(2007)[5], Predoiu, Shaikhet and Shreve (2010) [8], Kharroubiand Pham (2009)[4]
=⇒ In this talk we use the model investigated in this last paper:impulse control formulation.
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
The model of portfolio liquidationPDE characterization
The model
We consider a financial market where an investor has to liquidatean initial position of y > 0 shares of risky asset by time T .
We set a probability space (Ω,F ,P) equipped with a filtrationF = (Ft)0≤t≤T supporting a one-dimensional Brownianmotion W on a finite horizon [0,T ], T < ∞.
(Pt)t∈[0,T ] the market price of the risky asset
(Xt)t∈[0,T ] the cash holdings
(Yt)t∈[0,T ] the number of stock shares held by the investor
(Θt)t∈[0,T ] the time interval between t and the last tradebefore t
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
The model of portfolio liquidationPDE characterization
The model: trading strategies
We represent a trading strategy by:
α = (τn, ξn)n∈N
where (τn) are F-stopping times and (ξn) are Fτn -measurableR-valued variables.
Dynamics for the shares and lag processes are under α:
Θt = t − τn, τn ≤ t < τn+1
Θτn+1 = 0, n ≥ 0.
Ys = Yτn , τn ≤ s < τn+1
Yτn+1 = Yτn + ξn+1, n ≥ 0.
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
The model of portfolio liquidationPDE characterization
The model: price impact
Market price of risky asset process follows a geometric Brownian motion:
dPt = Pt(bdt + σdWt)
Suppose now that the investor decides to trade the quantity e. If thecurrent market price is p, and the time lag from the last order is θ, thenthe price he actually get for the order e is:
Q(e, p, θ) = pf (e, θ)
with
f (e, θ) = exp(λ|eθ|βsgn(e)
).(κa1e>0 + 1e=0 + κb1e<0
), (1)
Therefore cash holdings have the following dynamics
Xt = Xτn , τn ≤ t < τn+1, n ≥ 0.
Xτn+1 = Xτ−n+1− ξn+1Pτn+1 f (ξn+1,Θτ−n+1
)− ε, n ≥ 0.
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
The model of portfolio liquidationPDE characterization
Liquidation value and solvency constraints
Let us define the admissibility constraints on a trading strategy. We first definethe liquidative value of the position (x , y , p, θ) by:
L(x , y , p, θ) = max(x , x + ypf (−y , θ)− ε)
where ε > 0 is some fixed transaction fee. Constraints are:
No short sale constraint:
Yt ≥ 0 , ∀t ∈ [0,T ]
Solvency constraint:
L(Xt ,Yt ,Pt ,Θt) ≥ 0 , ∀t ∈ [0,T ]
We define the admissibility region:
S = (z , θ) = (x , y , p, θ) ∈ R× R+ × (0,∞)× [0,T ] : L(z , θ) ≥ 0 and y ≥ 0
Finally, we will call admissible the strategies α in the following set:
A = α = (τn, ξn)n : ∀t ∈ [0,T ] (Xαt ,Y
αt ,P
αt ,Θ
αt ) ∈ S
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
The model of portfolio liquidationPDE characterization
Optimal execution criterion
We choose a CRRA utility function U(x) = xγ with γ ∈ (0, 1)and denote UL(.) = U(L(.))
The value function is defined by (we denoted z = (x , y , p)):
v(t, z , θ) = supα∈A(t,z,θ)
E[UL(ZT )
], (t, z , θ) ∈ [0,T ]× S
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
The model of portfolio liquidationPDE characterization
From [4] v is a unique viscosity solution to a quasi-variational inequality(QVI) written as:
min
[− ∂
∂tv − Lv , v −Hv
]= 0, on [0,T )× S,
min [v − UL, v −Hv ] = 0, on T × S.
L is the infinitesimal generator associated to the process (X ,Y ,P,Θ) ina no trading period:
Lϕ =∂
∂θϕ+ bp
∂
∂pϕ+
1
2σ2p2 ∂
2
∂p2ϕ
H is the impulse operator:
Hϕ(t, z , θ) = supe∈C(t,z,θ)
ϕ(t, Γ(z , θ, e), 0)
with Γ(z , θ, e) = (x − epf (e, θ)− ε, y + e, p), z = (x , y , p) ∈ S, e ∈ R
From now, our goal is to solve numerically this HJBQVI.
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Discrete schemeExplicit backward schemeConvergence analysis
Discrete scheme
We propose the following discretization scheme:
Sh(t, z , θ, vh(t, z , θ), vh) = 0, (t, z , θ) ∈ [0,T ]× S,
with
Sh(t, z , θ, r , ϕ)
:=
min
[r − E
[ϕ(t + h,Z 0,t,z
t+h ,Θ0,t,θt+h )
], r −Hϕ(t, z , θ)
]if t ∈ [0,T − h]
min[r − E
[ϕ(T ,Z 0,t,z
T ,Θ0,t,θT )
], r −Hϕ(t, z , θ)
]if t ∈ (T − h,T )
min[r − UL(z , θ) , r −Hϕ(t, z , θ)
]if t = T .
which can be formulated equivalently as an implicit backward scheme:
vh(T , z , θ) = max[UL(z , θ) , Hvh(T , z , θ)
],
vh(t, z , θ) = max[E[vh(t + h,Z 0,t,z
t+h , θ + h)],Hvh(t, z , θ)
], 0 ≤ t ≤ T − h,
and vh(t, z , θ) = vh(T − h, z , θ) for T − h < t < T .
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Discrete schemeExplicit backward schemeConvergence analysis
Explicit backward scheme
The usual way to treat implicit backward scheme is to solve by iterations asequence of optimal stopping problems:
vh,n+1(T , z , θ) = max[UL(z , θ) , Hvh,n(T , z , θ)
],
vh,n+1(t, z , θ) = max[E[vh,n+1(t + h,Z 0,t,z
t+h , θ + h)],Hvh,n(t, z , θ)
],
starting from vh,0 = E[UL(Z 0,t,zT ,Θ0,t,θ
T )]. Due to the effect of the lag variableΘt in the market impact function, it is not optimal to trade immediately after atrade. Therefore we are able to write equivalently this scheme as an explicitbackward scheme:
vh(T , z , θ) = max[UL(z , θ) , HUL(z , θ)
],
vh(t, z , θ) = max[E[vh(t + h,Z 0,t,z
t+h , θ + h)], sup
e∈Cε(z,θ)
E[vh(t + h,Z
0,t,zeθ
t+h , h)]],
where zeθ = Γ(z , θ, e)
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Discrete schemeExplicit backward schemeConvergence analysis
Convergence analysis
Monotonicity
The numerical scheme Sh is monotone.
Stability
The numerical scheme Sh is stable.
Consistency
The numerical scheme Sh is consistent.
Theorem: convergence
The solution vh of the numerical scheme Sh converges locallyuniformly to v on [0,T )× S.
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
ImplementationAlgorithm
Implementation
We compute the conditional expectation arising in the numerical scheme Sh
using an optimal quantization method:
Eh(ti , z , θj) := E[vh(ti + h,Z 0,ti ,z
ti +h , θj + h)]
= E[vh(ti + h, x , y , p exp
((b − σ2
2)h + σ
√hU), θj + h)
],
that we approximate by
Eh(ti , z , θj) ' 1
N
N∑k=1
πk vh(ti + h, x , y , p exp((b − σ2
2)h + σ
√huk
), θj + h).
And we use weights (πk) and values (uk) from the optimal quantization of the
normal law. From a computational point of view, this is reduced to a inner
product computation, which is quite fast.
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
ImplementationAlgorithm
Algorithm
vh(t, z , θ) = max[E[vh(t + h,Z 0,t,z
t+h , θ + h)],Hvh(t, z , θ)
]
t : TIME
Θ: LAG
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
ImplementationAlgorithm
Policy shape in plane (Price × Shares)
2500
2750
3000
3250
3500
3750
4000
4250
4500
4750
SH
AR
ES
Policy sliced in the (price,shares) plane
SELL
0
250
500
750
1000
1250
1500
1750
2000
2250
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
SH
AR
ES
PRICE
NT
BUY
Figure: Shape of policyFabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Performance analysisBehavior on historical dataBibliography
Performance analysis
We provide some numerical results that we obtain from our implementation.We tested the optimal strategy against a benchmark of two other strategies.
Strategy Utility V Mean L Standard Dev. σ
Naive 0.99993 0.99986 0.00429
Uniform 0.99994 0.99988 0.00240
Optimal 1.00116 1.00233 0.00436
Quantity Formula Value
Winning percentage1
Q
Q∑i=1
1L(i)opt>max(L
(i)naive ,L
(i)uniform
) 58.8%
Utility Sharpe RatioVopt −max(Vnaive , Vuniform)
σopt0.28017
Performance Sharpe RatioLopt −max(Lnaive , Luniform)
σopt0.56140
Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Performance analysisBehavior on historical dataBibliography
Performance analysis
80
100
120
140
160
180
De
nsi
ty
Empirical distribution of performance
Naive
0
20
40
60
80
De
nsi
ty
Performance
Naive
Uniform
Optimal
Figure: Optimal strategy empirical distributionFabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Performance analysisBehavior on historical dataBibliography
Number of trades in one day liquidation
0.15
0.2
0.25
De
nsi
ty
Empirical distribution of number of trades
0
0.05
0.1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
De
nsi
ty
Number of trades
Figure: Number of trades empirical distributionFabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Performance analysisBehavior on historical dataBibliography
Behavior on historical data: price dependency
-268
802
230
-316
-433
-306
-600
-400
-200
0
200
400
600
800
1000
53.6
53.8
54
54.2
54.4
54.6
54.8
55
55.2
55.4
55.6
55.8
BNP.PA 19/04/2010
9H30 16H30 13H00
Figure: Strategy realization on the BNP.PA stock the 04/19/2010.Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Performance analysisBehavior on historical dataBibliography
Behavior on historical data: price dependency
-1262
-298
-192
-1400
-1200
-1000
-800
-600
-400
-200
0
50.5
51
51.5
52
52.5
53
53.5
54
54.5
BNP.PA 22/04/2010
9H30 16H30 13H00
Figure: Strategy realization on the BNP.PA stock the 04/22/2010.Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Performance analysisBehavior on historical dataBibliography
Bibliography
Almgren R. and N. Chriss (2001): “Optimal execution of portfolio transactions”, Journal of Risk, 3, 5-39.
Forsyth P. (2009): “A Hamilton-Jacobi-Bellman approach to trade execution”, preprint, University of
Waterloo.
Gatheral J., Schied A. and A. Slynko (2010): “Transient linear price impact and Fredholm integral
equations”, Preprint
Kharroubi I. and H. Pham (2009): “Optimal portfolio liquidation with execution cost and risk”, Preprint,
University Paris 7, LPMA.
Ly Vath V., Mnif M. and H. Pham (2007): “A model of optimal portfolio selection under liquidity risk and
price impact”, Finance and Stochastics, 11, 51-90.
Obizhaeva A. and J. Wang (2005): “Optimal trading strategy and supply/demand dynamics”, to appear in
Journal of Financial Markets.
Potters M. and J.P. Bouchaud (2003): “More statistical properties of order books and price impact”,
Physica A, 324, 133-140.
Predoiu S., Shaikhet G. and S.Shreve (2010): “Optimal Execution in a General One-Sided Limit-Order
Book”, Preprint.
Rogers L.C.G. and S. Singh (2008): “The cost of illiquidity and its effects on hedging”, to appear in
Mathematical Finance.
Schied A. and T. Schoneborn (2009): “Risk aversion and the dynamics of optimal liquidation strategies in
illiquid markets”, Finance and Stochastics, 13, 181-204.Fabien Guilbaud Numerical methods for an optimal order execution
IntroductionModel
DiscretizationAlgorithm
Numerical results
Performance analysisBehavior on historical dataBibliography
Thank you for your attention
Any questions?
Fabien Guilbaud Numerical methods for an optimal order execution