Order book resilience, price manipulations, and the positive portfolio problem Alexander Schied Mannheim University PRisMa Workshop Vienna, September 28, 2009 Joint work with Aurélien Alfonsi and Alla Slynko 1
Large trades can significantly impact prices intraday stock price time t
Spreading the order can reduce the overall price impact intraday stock price time t
How to execute a single trade of selling X 0 shares? Interesting because: Liquidity/market impact risk in its purest form development of realistic market impact models checking viability of these models building block for more complex problems Relevant in applications real-world tests of new models Interesting mathematics 2
Limit order book before market order buyers bid offers sellers ask offers bid-ask spread best bid price best ask price prices
Limit order book before market order volume of sell market order buyers bid offers sellers ask offers bid-ask spread best bid price best ask price
Limit order book after market order volume of sell market order buyers bid offers sellers ask offers new bid-ask spread new best bid price best ask price
Resilience of the limit order book after market order buyers bid offers sellers ask offers new best bid price new best ask price
Overview 1. Linear impact, general resilience 2. Nonlinear impact, exponential resilience 3. Relations with Gatheral s model 3
References A. Alfonsi, A. Fruth, and A.S.: Optimal execution strategies in limit order books with general shape functions. To appear in Quantitative Finance A. Alfonsi, A. Fruth, and A.S.: Constrained portfolio liquidation in a limit order book model. Banach Center Publ. 83, 9-25 (2008). A. Alfonsi and A.S.: Optimal execution and absence of price manipulations in limit order book models. Preprint 2009. A. Alfonsi, A.S., and A. Slynko: Order book resilience, price manipulations, and the positive portfolio problem. Preprint 2009. J. Gatheral: No-Dynamic-Arbitrage and Market Impact. Preprint (2008). A. Obizhaeva and J. Wang: Optimal Trading Strategy and Supply/Demand Dynamics. Preprint (2005) 4
Limit order book model without large trader buyers bid offers sellers ask offers unaffected best bid price, is martingale unaffected best ask price
Limit order book model after large trades actual best bid price actual best ask price
Limit order book model at large trade ξ t = q(b t+ B t ) q(
Limit order book model at large trade ξ t = q(b t+ B t ) sell order executed at average price similarly for buy orders Bt B t+ xq dx q(
Limit order book model immediately after large trade
Resilience of the limit order book ψ : [0, [ [0, 1], ψ(0) = 1, decreasing ξ t q ψ( t) + decay of previous trades B t+ t
1. Linear impact, general resilience Strategy: N + 1 market orders: ξ n shares placed at time t n s.th. a) 0 = t 0 t 1 t N = T (can also be stopping times) b) ξ n is F tn -measurable and bounded from below, c) we have N ξ n = X 0 n=0 Sell order: ξ n < 0 Buy order: ξ n > 0 5
Actual best bid and ask prices B t = B 0 t + 1 q A t = A 0 t + 1 q tn<t ξ n <0 tn<t ξ n >0 ψ(t t n )ξ n ψ(t t n )ξ n 6
Cost per trade c n (ξ) = At n+ A t n Bt n+ B t n yq dy = q 2 (A2 t n + A 2 t n ) for buy order ξ n > 0 yq dy = q 2 (B2 t n + B 2 t n ) for sell order ξ n < 0 (positive for buy orders, negative for sell orders) Expected execution costs [ N C(ξ) = E n=0 ] c n (ξ) 7
A simplified model No bid-ask spread St 0 = unaffected price, is (continuous) martingale. S t = S 0 t + 1 q ξ n ψ(t t n ). t n <t Trade ξ n moves price from S tn to S tn + = S tn + 1 q ξ n. Resulting cost: c n (ξ) := St n+ S t n yq dy = q 2 [ S 2 tn + S 2 t n ] = 1 2q ξ2 n + ξ n S tn (typically positive for buy orders, negative for sell orders) 8
Lemma 1. Suppose that S 0 = A 0. Then, for any strategy ξ, c n (ξ) c n (ξ) with equality if ξ k 0 for all k. Thus: Enough to study the simplified model (as long as all trades ξ n are positive) 9
Lemma 1. Suppose that S 0 = A 0. Then, for any strategy ξ, c n (ξ) c n (ξ) with equality if ξ k 0 for all k. Thus: Enough to study the simplified model (as long as all trades ξ n are positive) 9
Lemma 2. In the simplified model, the expected execution costs of a strategy ξ are [ N C(ξ) = E n=0 ] c n (ξ) = 1 2q E[ C ψ t (ξ) ] + X 0S 0 0, where C ψ t is the quadratic form C ψ t (x) = N m,n=0 x n x m ψ( t n t m ), x R N+1, t = (t 0,..., t N ). 10
First Question: What are the conditions on ψ under which the (simplified) model is viable? Requiring the absence of arbitrage opportunities in the usual sense is not strong enough, as examples will show. Second Question: Which strategies minimize the expected cost for given X 0? This is the optimal execution problem. It is very closely related to the question of model viability. 12
The usual concept of viability from Hubermann & Stanzl (2004): Definition A round trip is a strategy ξ with N ξ n = X 0 = 0. n=0 A market impact model admits price manipulation strategies if there is a round trip with negative expected execution costs. 13
In the simplified model, the expected costs of a strategy ξ are C(ξ) = 1 2q E[ C ψ t (ξ) ] + X 0S 0 0, where C ψ t (x) = N m,n=0 x n x m ψ( t n t m ), x R N+1, t = (t 0,..., t N ). There are no price manipulation strategies when C ψ t definite for all t = (t 0,..., t N ); is nonnegative when the minimizer x of C ψ t (x) with i x i = X 0 exists, it yields the optimal strategy in the simplified model; in particular, the optimal strategy is then deterministic; when the minimizer x has only nonnegative components, it yields the optimal strategy in the order book model. 14
Bochner s theorem (1932): C ψ t is always nonnegative definite (ψ is positive definite ) if and only if ψ( ) is the Fourier transform of a positive Borel measure µ on R. C ψ t is even strictly positive definite (ψ is strictly positive definite ) when the support of µ is not discrete. 15
Bochner s theorem (1932): C ψ t is always nonnegative definite (ψ is positive definite ) if and only if ψ( ) is the Fourier transform of a positive Borel measure µ on R. C ψ t is even strictly positive definite (ψ is strictly positive definite ) when the support of µ is not discrete. Seems to completely settle the question of model viability; for strictly positive definite ψ, the optimal strategy is ξ = x = X 0 1 M 1 1 M 1 1 for M ij = ψ( t i t j ). 15
Examples Example 1: Exponential resilience [Obizhaeva & Wang (2005), Alfonsi, Fruth, S. (2008)] For the exponential resilience function ψ(t) = e ρt, ψ( ) is the Fourier transform of the positive measure µ(dt) = 1 π Hence, ψ is strictly positive definite. ρ ρ 2 + t 2 dt 16
Optimal strategies for exponential resilience ψ(t) = e ρt $%# $%# $ $ "%# "%# "!! " # $! &'($" $%# "!! " # $! &'($# $%# $ $ "%# "%# "!! " # $! &'(!" "!! " # $! &'(!# 17
The optimal strategy can in fact be computed explicitly for any time grid [Alfonsi, Fruth, A.S. (2008)]: Letting X 0 λ 0 = 1 M 1 1 = X 0 2 1+a 1 + N n=2 the initial market order of the optimal strategy is x 0 = λ 0 1 + a 1,, 1 a n 1+a n the intermediate market orders are given by ( x 1 n = λ 0 a ) n+1, n = 1,..., N 1, 1 + a n 1 + a n+1 and the final market order is x N = λ 0 1 + a N. all components of x are strictly positive 18
For the equidistant time grid t n = nt/n the solution simplifies: x 0 = x N = X 0 (N 1)(1 a) + 2 and x 1 = = x N 1 = ξ 0(1 a). #$! #$! # # "$! "$! "!! "! #" #! %&'#" #$! "!! "! #" #! %&'#! #$! # # "$! "$! "!! "! #" #! %&'(" "!! "! #" #! %&'(! 18
The symmetry of the optimal strategy is a general fact: Proposition 3. Suppose that ψ is strictly positive definite and that the time grid is symmetric, i.e., t i = t N t N i for all i, then the optimal strategy is reversible, i.e., x t i = x t N i for all i. 19
Example 2: Linear resilience ψ(t) = 1 ρt for some ρ 1/T The optimal strategy is always of this form: & ()*+,-./1()*(0.3 % $ ()*+,-./1,201 #! "!!!! "! # $ % & ' ()*+,-./+*(01 It is independent of the underlying time grid and consists of two symmetric trades of size X 0 /2 at t = 0 and t = T, all other trades are zero. 20
More generally: Convex resilience Theorem 4. [Carathéodory (1907), Toeplitz (1911), Young (1912)] ψ is convex, decreasing, nonnegative, and nonconstant = ψ( ) is strictly positive definite. 21
Example 3: Power law resilience ψ(t) = (1 + βt) α % #$! # "$! "!! "! #" #! &'(#" % #$! # "$! "!! "! #" #! &'(%" % #$! # "$! "!! "! #" #! &'(#! % #$! # "$! "!! "(!( #" #! &'(%! 25
Example 4: Trigonometric resilience The function cos ρx is the Fourier transform of the positive finite measure µ = 1 2 (δ ρ + δ ρ ) Since it is not strictly positive definite, we take ψ(t) = (1 ε) cos ρt + εe t for some ρ π 2T. 26
Trigonometric resilience ψ(t) = 0.999 cos(tπ/2t ) + 0.001e t $! (! #" $" $! #! #" " #! "!!!"!"! " #! %&'$!!#!! " #! %&'$! 27
Example 5: Gaussian resilience The Gaussian resilience function ψ(t) = e t2 is its own Fourier transform (modulo constants). The corresponding quadratic form is hence positive definite. Nevertheless... 28
Gaussian resilience ψ(t) = e t2, N = 10 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 1 2 3 4 5 6 7 8 9 10 N= 10 29
Gaussian resilience ψ(t) = e t2, N = 15 &'$ &'# &'! & "'% "'$ "'# "'! "!"'!!! "! # $ % &" &! ()*&+ 30
Gaussian resilience ψ(t) = e t2, N = 20 # '! & "!&!!!'!! "! # $ % &" &! ()*!" 31
Gaussian resilience ψ(t) = e t2, N = 25!" &' &" ' "!'!&"!&'!!"!! "! # $ % &" &! ()*!' 32
Gaussian resilience ψ(t) = e t2, N = 25!" &' &" ' "!'!&"!&'!!"!! "! # $ % &" &! ()*!' absence of price manipulation strategies is not enough 33
Definition [Hubermann & Stanzl (2004)] A market impact model admits price manipulation strategies in the strong sense if there is a round trip with negative expected liquidation costs. Definition: A market impact model admits price manipulation strategies in the weak sense if the expected liquidation costs of a sell (buy) program can be decreased by intermediate buy (sell) trades. 34
Question: When does the minimizer x of x i x j ψ( t i t j ) with x i = X 0 i,j i have only nonnegative components? Related to the positive portfolio problem in finance: When are there no short sales in a Markowitz portfolio? I.e. when is the solution of the following problem nonnegative x Mx m x min for x 1 = X 0, where M is a covariance matrix of assets and m is the vector of returns? Partial results, e.g., by Gale (1960), Green (1986), Nielsen (1987) 35
Proposition 5. [Alfonsi, A.S., Slynko (2009)] When ψ is strictly positive definite and trading times are equidistant, then x 0 > 0 and x N > 0. Proof relies on Trench algorithm for inverting the Toeplitz matrix M ij = ψ( i j /N), i, j = 0,..., N 36
Theorem 6. [Alfonsi, A.S., Slynko (2009)] If ψ is convex then all components of x are nonnegative. If ψ is strictly convex, then all components are strictly positive. Conversely, x has negative components as soon as, e.g., ψ is strictly concave in a neighborhood of 0. 37
Qualitative properties of optimal strategies? 41
Qualitative properties of optimal strategies? Proposition 8. [Alfonsi, A.S., Slynko (2009)] When ψ is convex and nonconstant, the optimal x satisfies x 0 x 1 and x N 1 x N 41
Proof: Equating the first and second equations in Mx = λ 0 1 gives N x j ψ(t j ) = j=0 N x j ψ( t j t 1 ). j=0 Thus, x 0 x 1 = N N x j ψ( t j t 1 ) x j ψ(t j ) j=0, j 1 N = x 0ψ(t 1 ) x 1ψ(t 1 ) + j=2 j=1 (x 0 x 1)ψ(t 1 ), by convexity of ψ. Therefore (x 0 x 1 )(1 ψ(t 1 )) 0 x j [ ψ(tj t 1 ) ψ(t j ) ] 42
Proposition 8. [Alfonsi, A.S., Slynko (2009)] When ψ is convex and nonconstant, the optimal x satisfies x 0 x 1 and x N 1 x N What about other trades? General pattern? * +,-./0124+,-+316 % ) $ +,-./0124/534 ( # '! & "!!" "!" #" $" %" &"" &!" +,-./012.-+34 43
No! Capped linear resilience ψ(t) = (1 ρt) +, ρ = 2/T )( 1/5672+1891*+,-./01-,*231:;'!!<1*.621=8+.48/1>;'<13*8?@1*8175A1B!;'!! )! #( *+,-./013.423 #! '( '! (!!(!!"#!!"#!"$!"%!"& ' '"# *+,-./01-,*23 44
Proposition 9. [Alfonsi, A.S., Slynko (2009)] Suppose that ψ(t) = (1 kt/t ) + and that k divides N. Then the optimal strategy consists of k + 1 equal equidistant trades. &" * % ) $ ( # '! & "!! "! # $ % &" &! +,-&"".-/,&" Proof relies on Trench algorithm 45
When k does not divide N, the situation becomes more complicated: &! &" % $ #! "!! "! # $ % &" &! '()&""*)+($ &! &" % $ #! "!! "! # $ % &" &! '()&""*)+(&, &! &" % $ #! "!! "! # $ % &" &! '()#,*)+($ &! &" % $ #! "!! "! # $ % &" &! '()#,*)+(&" 46
1. Linear impact, general resilience 2. Nonlinear impact, exponential resilience 47
Limit order book model without large trader buyers bid offers sellers ask offers unaffected best bid price, is martingale unaffected best ask price
Limit order book model after large trades
Limit order book model at large trade
Limit order book model immediately after large trade
Limit order book model with resilience
f(x) = shape function = densities of bids for x < 0, asks for x > 0 B 0 t = unaffected bid price at time t, is martingale B t = bid price after market orders before time t D B t = B t B 0 t If sell order of ξ t 0 shares is placed at time t: D B t changes to D B t+, where D B t+ f(x)dx = ξ t and D B t B t+ := B t + D B t+ D B t = B 0 t + D B t+, = nonlinear price impact 48
A 0 t = unaffected ask price at time t, satisfies Bt 0 A 0 t A t = bid price after market orders before time t D A t = A t A 0 t If buy order of ξ t 0 shares is placed at time t: D A t changes to D A t+, where D A t+ f(x)dx = ξ t and D A t A t+ := A t + D A t+ D A t = A 0 t + D A t+, For simplicity, we assume that the LOB has infinite depth, i.e., F (x) as x, where F (x) := x 0 f(y) dy. 49
If the large investor is inactive during the time interval [t, t + s[, there are two possibilities: Exponential recovery of the extra spread D B t = e t s ρ r dr D B s for s < t. Exponential recovery of the order book volume E B t = e t s ρ r dr E B s for s < t, where E B t = 0 f(x) dx =: F (D B t ). D B t In both cases: analogous dynamics for D A or E A 50
Strategy: N + 1 market orders: ξ n shares placed at time τ n s.th. a) the (τ n ) are stopping times s.th. 0 = τ 0 τ 1 τ N = T b) ξ n is F τn -measurable and bounded from below, c) we have Will write N ξ n = X 0 n=0 (τ, ξ) and optimize jointly over τ and ξ. 51
When selling ξ n < 0 shares, we sell f(x) dx shares at price Bτ 0 n + x with x ranging from Dτ B n to Dτ B n + < Dτ B n, i.e., the costs are negative: c n (τ, ξ) := D B τ n+ (B 0 τ n + x)f(x) dx = ξ n B 0 τ n + D B τ n+ xf(x) dx D B τn D B τn When buying shares (ξ n > 0), the costs are positive: c n (τ, ξ) := ξ n A 0 τ n + D A τ n+ D A τn xf(x) dx The expected costs for the strategy (τ, ξ) are [ N C(τ, ξ) = E n=0 ] c n (τ, ξ) 52
Instead of the τ k, we will use (1) α k := τk τ k 1 ρ s ds, k = 1,..., N. The condition 0 = τ 0 τ 1 τ N = T is equivalent to α := (α 1,..., α N ) belonging to A := { α := (α 1,..., α N ) R N + N α k = k=1 T 0 } ρ s ds. 53
A simplified model without bid-ask spread S 0 t = unaffected price, is (continuous) martingale. S tn = S 0 t n + D n where D and E are defined as follows: E 0 = D 0 = 0, E n = F (D n ) and D n = F 1 (E n ). For n = 0,..., N, regardless of the sign of ξ n, E n+ = E n ξ n and D n+ = F 1 (E n+ ) = F 1 (F (D n ) ξ n ). For k = 0,..., N 1, The costs are E k+1 = e α k+1 E k+ = e α k+1 (E k ξ k ) c n (τ, ξ) = ξ n S 0 τ n + Dτ n+ D τ n xf(x) dx 54
Lemma 10. Suppose that S 0 = B 0. Then, for any strategy ξ, Moreover, where c n (ξ) c n (ξ) with equality if ξ k 0 for all k. [ N C(τ, ξ) := E n=0 C(α, ξ) := ] c n (τ, ξ) N n=0 [ ] = E C(α, ξ) Dn+ D n xf(x) dx is a deterministic function of α A and ξ R N+1. X 0 S 0 0 Implies that is is enough to minimize C(α, ξ) over α A and ξ { x = (x 0,..., x N ) R N+1 N x n = X 0 }. n=0 55
Theorem 11. Suppose f is increasing on R and decreasing on R +. Then there is a unique optimal strategy (ξ, τ ) consisting of homogeneously spaced trading times, τ i+1 τ i ρ r dr = 1 N T 0 ρ r dr =: log a, and trades defined via and as well as Moreover, ξ i F 1 (X 0 Nξ0 (1 a)) = F 1 (ξ0) af 1 (aξ0), 1 a ξ 1 = = ξ N 1 = ξ 0 (1 a), ξ N = X 0 ξ 0 (N 1)ξ 0 (1 a). > 0 for all i. 56
Taking X 0 0 yields: Corollary 12. Both the original and simplified models admit neither strong nor weak price manipulation strategies. 57
Robustness of the optimal strategy [Plots by C. Lorenz (2009)] First figure: 1 f(x) = 1 + x Figure 1: f, F, F 1, G and optimal strategy 58
Figure 2: f(x) = x 59
Figure 3: f(x) = 1 8 x2 60
Figure 4: f(x) = exp( ( x 1) 2 ) + 0.1 61
Figure 5: f(x) = 1 2 sin(π x ) + 1 62
Figure 6: f(x) = 1 2 cos(π x + 1 2 ) 63
Figure 7: f random 64
Figure 8: f random 65
Figure 9: f random 66
Figure 10: f piecewise constant 67
Figure 11: f piecewise constant 68
Figure 12: f piecewise constant 69
Figure 13: f piecewise constant 70
Continuous-time limit of the optimal strategy Initial block trade of size ξ 0, where F 1( X 0 ξ 0 T 0 ) ρ s ds = F 1 (ξ 0) + ξ 0 f(f 1 (ξ 0 )) Continuous trading in ]0, T [ at rate ξ t = ρ t ξ 0 Terminal block trade of size ξ T = X 0 ξ 0 ξ 0 T 0 ρ t dt 71
Conclusion Market impact should decay as a convex function of time Exponential or power law resilience leads to bathtub solutions +,-./0124+,-+316 * % ) $ +,-./0124/534 ( # '! & "!!" "!" #" $" %" &"" &!" +,-./012.-+34 which are extremely robust Many open problems 78