Optimal Order Placement Peter Bank joint work with Antje Fruth OMI Colloquium Oxford-Man-Institute, October 16, 2012
Optimal order execution Broker is asked to do a transaction of a significant fraction of the average daily trading volume over a certain period. Key challenge: Law requires optimal execution! How to guarantee this? Micro level: What order type (e.g., limit, market, cancellation... ) of what size to send to which kind of venue (lit, dark) where (New York, Chicago) and when? high-dimensional optimization problem which has to be solved fast (milliseconds) and frequently, taking into account market microstructure effects: not topic of this talk Macro level: How to optimally split a large transaction into smaller pieces to be sent to the micro trader for execution over the alotted trading period? dynamic optimal control problem to be discussed here
Market features to be addressed market depth: price reaction as a function of order size market resilience: permanent vs. temporary impact market tightness: spread market risk: fluctuations in portfolio value Very small selection of papers closest to this talk: Almgren & Chriss, Schied et al.,... : infinitely tight (no spread, unidirectional trades), finite depth ( quadratic costs of rates), infinitely resilient (local impact), mean-variance or utility Obizhaeva & Wang, Alfonsi et al., Predoiu et al.: finite depth determined by general, but constant shape of limit order book, finite resilience (half-life of market order impact, resilience function), market risk addressed at best partially
Our framework: deterministic case Obizhaeva & Wang s block shaped order book model with deterministic, but time-varying depth and resilience: Fruth, Schöneborn, Urusuov (2011), Alfonsi, Acevedo (2012) cumulative orders issued so far: X = (X t ) t 0 right-cont., increasing with X 0 0, X = x market impact of orders so far: η(x ) = (η t (X )) t 0 solution to dη t = dx t δ t r t η t dt market depth: δ = (δ t ) t 0 0 u.s.c., 0 < sup δ < resilience: r = (r t ) t 0 > 0 locally Lebesgue-integrable Optimization problem: Find an order schedule with minimal execution costs: ( C(X ) = η t (X ) + ) tx dx t min. 2δ t [0, )
Main result Theorem ( ) t Let ρ t exp 0 r s ds and λ t δ t /ρ t, and consider L λ u λ t t = inf, t 0. u>t sup v u λ v /ρ u sup v t λ v /ρ t Then the optimal schedule is to send orders while the resulting market impact η is no larger than yl /ρ, i.e., Xt δ s = d sup {(yl ρ u) η 0 }, t 0 s 0 u s [0,t] where y > 0 is chosen such that X = x, provided such a y can be found. Otherwise, inf X X C(X ) = 0, i.e., there is no solution.
Comments approach via dynamic programming possible, at least for differentiable data: HJB-equation variational characterization of optimality possible if data differentiable and good guess of general structure of optimal policy available; Euler-Lagrange equations; see thesis by Antje Fruth Pontryagin s maximum principle; FBDE our approach: convex optimization explicit result conveying trade-off between future and present market depth and resilience alternative description emerges in sketch of proof minimal assumptions illustrations later
Step 1: Change of control variable Proposition Y t η 0 + [0,t] dx s λ s and X t ( t where λ t δ t /ρ t, ρ t exp 0 r s ds [0,t] λ s dy s, t 0, ), defines mappings from X {X Dom(C) : X 0 = 0, X = x} into Y {Y Dom(K) : Y 0 = η 0, λ s dy s = x} [0, ) and vice versa such that for κ λ/ρ = δ/ρ 2 : C(X ) = K(Y ) 1 κ t d(yt 2 ). 2 [0, ) Hence: It suffices to minimize K(Y ) subject to Y Y.
Step 2: Convexification of the problem Proposition The functional K(Y ) 1 2 [0, ) κ t d(y 2 t ). is (strictly) convex in Y if and only if κ is (strictly) decreasing.
Step 2: Convexification of the problem Proposition The functional K(Y ) 1 2 [0, ) κ t d(y 2 t ). is (strictly) convex in Y if and only if κ is (strictly) decreasing. Lemma For any Y Y we can find a Ỹ Y such that Ỹ Y, {dỹ > 0} {d λ < 0}, K(Y ) K(Ỹ ) = K(Ỹ ) where K(Y ) 1 2 [0, ) κ t d(y 2 t ), λt sup λ u, κ t λ t /ρ t. u t
Step 2: Convexification of the problem (ctd.) Proposition The functional K(Y ) 1 2 [0, ) κ t d(y 2 t ) where κ t λ t /ρ t and λ t sup u t λ u is convex in Y and a minimizer Y in { } Ỹ Y Dom( K) : Y 0 = η 0, λ t dy t = x [0, ) is also a minimizer over the set Y, over which it minimizes the original functional K(Y ) as well provided {dy > 0} {λ = λ}. Hence: Need to solve first order conditions of a convex problem.
Step 3: First order conditions Proposition Y minimizes K over its class Ỹ where x λ [0, ) t dyt > 0 if and only if there is a constant y > 0 such that Yu d κ u y λ t for t 0 with = whenever dyt > 0. [t, )
is right-cont., incr., and satisfies the first-order conditions. Step 3: First order conditions Proposition Y minimizes K over its class Ỹ where x λ [0, ) t dyt > 0 if and only if there is a constant y > 0 such that Yu d κ u y λ t for t 0 with = whenever dyt > 0. [t, ) Time-change For 0 k κ 0 let τ k inf{t 0 : κ t k} Λk kρ τk with Λ 0 0 Then the concave envelope Λ of Λ over [0, κ 0 ] has a left-continuous decreasing density Λ and Y t (y Λ κt ) η 0, t 0,
Putting it all together... Theorem In case Λ L 2 ( κ 0 0 ( Λ k ) 2 dk) 1 2 < we can choose y > 0 uniquely such that } Xt λ 0 (y Λ κ0 η 0 ) + + λ s d {(y Λ κs ) η 0, t 0, (0,t] increases from X 0 0 to X = x; this X X is an optimal order schedule. In the special case where η 0 = 0, y = x/ Λ 2 L 2 and the minimal costs are given by C(X ) = x 2 /(2 Λ 2 L 2 ). If, by contrast, Λ L 2 = then inf X X C(X ) = 0 and there is no optimal order schedule. Remark: The quantity L t of our first theorem coincides, after a time-change, with the initial slope of the concave envelope for the restriction of Λ k = kρ k to the interval [0, κ t ], t 0.
Illustration I Obizhaeva & Wang model has finite horizon T > 0, constant depth δ and resilience r: λ t = λ t = δe rt 1 [0,T ] (t), κ t = κ t = δe 2rt 1 [0,T ] (t), Λ k = δk1 [δe 2rT,δ](k), Λk = δk (ke rt ), Λ k = 1 δ 2 k 1 (δe 2rT,δ](k) + e rt 1 [0,δe 2rT ](k) Λ κt = 1 2 ert = L t for t < T, Λ κt = e rt = L T Yt = η 0 for t < τ log + (2η 0 /y)/r, Yt = y 2 ert for τ t < T, YT = yert Xt = ( y 2 η 0) + δ + y 2 δ(t τ)+ for t < T, XT = y 2 δ(t τ + 1)
Illustration I An optimal order placement strategy in the Obizhaeva & Wang-setting: Κ Κ Λ Λ X 0 T Figure: Optimal order schedule X (black) for constant market depth δ (blue), its resilience adjustment λ = λ (red), κ = κ (green) over a finite horizon T.
Illustration II Fluctuating market depth, constant resilience: Λ t 0 Λ t 0 0 t 1 T Figure: The market depth δ (blue)
Illustration II Fluctuating market depth, constant resilience: Λ t 0 Λ t 0 Λ 0 t 1 T Figure: The market depth δ (blue), its resilience adjustment λ (purple)
Illustration II Fluctuating market depth, constant resilience: Λ Λ t 0 Λ t 0 Λ 0 t 1 T Figure: The market depth δ (blue), its resilience adjustment λ (purple), its decreasing envelope λ (red)
Illustration II Fluctuating market depth, constant resilience: Λ Λ t 0 Κ Λ t 0 Λ 0 t 1 T Figure: The market depth δ (blue), its resilience adjustment λ (purple), its decreasing envelope λ (red), κ (green)
Illustration II Fluctuating market depth, constant resilience: Λ Λ t 0 Κ Λ t 0 Λ X 0 t 1 T Figure: The market depth δ (blue), its resilience adjustment λ (purple), its decreasing envelope λ (red), κ (green), and the optimal schedule X (black)
Illustration II (ctd) Fluctuating market depth, constant resilience: Λ t 0 Λ t 0 0 Figure: The time-changed decreasing envelope of risk-adjusted market depth Λ (red)
Illustration II (ctd) Fluctuating market depth, constant resilience: Λ t 0 Λ t 0 0 Figure: The time-changed decreasing envelope of risk-adjusted market depth Λ (red) and the corresponding concave envelope Λ (orange)
Illustration II (ctd) Fluctuating market depth, constant resilience: Λ t 0 Λ t 0 0 Figure: The time-changed decreasing envelope of risk-adjusted market depth Λ (red) and the corresponding concave envelope Λ (orange) with its density Λ (black)
Illustration III Fluctuating market depth, very strong resilience: Λ t 0 Λ t 0 X 0 t 1 T Figure: The market depth (blue) and the optimal schedule (black) with strong resilience
Illustration III (ctd) Fluctuating market depth, with ever lower resilience: Λ t 0 Λ t 0 X 0 t 1 T Figure: The market depth (blue) and the optimal schedule (black) with ever lower resilience
Illustration III (ctd) Fluctuating market depth, with ever lower resilience: Λ t t 00 X 0 t 1 T Figure: The market depth (blue) and the optimal schedule (black) with ever lower resilience
Illustration III (ctd) Fluctuating market depth, with ever lower resilience: Λ t t 00 X 0 t 1 T Figure: The market depth (blue) and the optimal schedule (black) with ever lower resilience
Illustration III (ctd) Fluctuating market depth, with ever lower resilience: Λ t t 00 X 0 t 1 T Figure: The market depth (blue) and the optimal schedule (black) with ever lower resilience
Illustration III (ctd) Fluctuating market depth, with ever lower resilience: Λ t t 00 X 0 t 1 T Figure: The market depth (blue) and the optimal schedule (black) with ever lower resilience
Illustration IV Fluctuating market depth, no resilience: Λ X 0 t 0 t 1 T Figure: The market depth (blue) and the optimal schedule (black) Proposition If r 0 then any order schedule X X with {dx > 0} arg max δ is optimal.
Our framework: stochastic case Obizhaeva & Wang s block shaped order book model with stochastically varying depth and resilience: Fruth (2011) orders: X = (X t ) 0 t T X (x) right-cont, increasing, adapted with X 0 0, X T = x market impact: η(x ) = (η t (X )) 0 t T solution to dη t = dx t δ t r t η t dt market depth: δ = (δ t ) 0 t T cont., adapted, bounded, > 0 resilience: r = (r t ) 0 t T Lebesgue-integrable, adapted, > 0 Optimization problem: Find an order schedule with minimal expected execution costs: ( C(X ) = E η t (X ) + ) tx dx t min s.t. X X (x). 2δ t [0,T ]
Step 1: Change of control variable Proposition With λ δ/ρ, we get the one-to-one correspondence dx s Y t η 0 + and, resp., X t λ s dy s, 0 t T, λ s [0,t] [0,t] between X X and Y Y where { Y (Y t ) t [0,T ] η 0 : RC., incr., adapted such that for κ λ/ρ = δ/ρ 2 : C(X ) = K(Y ) 1 2 E [0,T ] [0,T ] κ t d(y 2 t ). λ t dy t = x } Hence: It suffices to minimize K(Y ) subject to Y Y (x).
Step 2: Convexification of the problem Proposition The functional K(Y ) 1 2 E [0,T ] κ t d(y 2 t ). is (strictly) convex in Y if and only if κ > 0 is a (strict) supermartingale.
Step 2: Convexification of the problem Proposition The functional K(Y ) 1 2 E [0,T ] κ t d(y 2 t ). is (strictly) convex in Y if and only if κ > 0 is a (strict) supermartingale. Unfortunately: We cannot assume this without loss of generality because of a puzzling counter-example; see Fruth (2011).
Step 2: Convexification of the problem Proposition The functional K(Y ) 1 2 E [0,T ] κ t d(y 2 t ). is (strictly) convex in Y if and only if κ > 0 is a (strict) supermartingale. Unfortunately: We cannot assume this without loss of generality because of a puzzling counter-example; see Fruth (2011). Hence: We assume that resilience is strong enough to ensure the supermartingale property of κ = δ/ρ 2 = δ/ exp ( 2. 0 r s ds ).
Step 3: First order conditions Proposition Y minimizes K over its class Y (x), x [0,T ] λ t dyt > 0, if and only if {dy > 0} { K(Y ) = λm(y )} where t K(Y ) E [ ] Yu dκ u F t [t,t ] (0 t T ) is the gradient of K at Y and where M(Y ) denotes the martingale part of the lower Snell-envelope S t (Y ) = M t (Y )+A t (Y ) ess inf S t E [ S K(Y )/λ S F t ] (0 t T ).
Step 3: First order conditions Proposition Y minimizes K over its class Y (x), x [0,T ] λ t dyt > 0, if and only if {dy > 0} { K(Y ) = λm(y )} where t K(Y ) E [ ] Yu dκ u F t [t,t ] (0 t T ) is the gradient of K at Y and where M(Y ) denotes the martingale part of the lower Snell-envelope S t (Y ) = M t (Y )+A t (Y ) ess inf S t E [ S K(Y )/λ S F t ] (0 t T ). Problem: How to construct such a Y?
Step 4: A family of representation problems Proposition Let M > 0 be a martingale and suppose L M is an optional process with u.r.c. paths satisfying [ ] E sup L M t d( κ u ) F S = λ S M S [S,T ] t [S,u] for any stopping time S T. Then any Y M of the form Yt M = η 0 sup s [0,t] L M s, t [0, T ], satisfies the first order condition {dy M > 0} { K(Y M ) = λm(y M )} and M conincides with the martingale part M(Y M ) of the Snell envelope associated with K(Y M )/λ.
Step 4: A family of representation problems Proposition Let M > 0 be a martingale and suppose L M is an optional process with u.r.c. paths satisfying [ ] E sup L M t d( κ u ) F S = λ S M S [S,T ] t [S,u] for any stopping time S T. Then any Y M of the form Yt M = η 0 sup s [0,t] L M s, t [0, T ], satisfies the first order condition {dy M > 0} { K(Y M ) = λm(y M )} and M conincides with the martingale part M(Y M ) of the Snell envelope associated with K(Y M )/λ. Current work: How to construct M such that [0,T ] λ dy M = x?
Conclusion optimal order schedule with time-varying depth and resilience execution costs not convex in general, but in the deterministic case we can find a convex majorant whose solutions minimize original costs in determinstic case first order conditions solved via time-change and concave envelopes explicit construction of solution for general specifications of depth and resilience unde minimal assumptions Obizhaeva & Wang s scheduling shape not generic stochastic case: convexity has to be assumed: example in Fruth (2011) with counterintuitive structure of optimal schedule granted convexity: first order conditions involving Snell envelope of cost gradient, solved by representation problem
Conclusion optimal order schedule with time-varying depth and resilience execution costs not convex in general, but in the deterministic case we can find a convex majorant whose solutions minimize original costs in determinstic case first order conditions solved via time-change and concave envelopes explicit construction of solution for general specifications of depth and resilience unde minimal assumptions Obizhaeva & Wang s scheduling shape not generic stochastic case: convexity has to be assumed: example in Fruth (2011) with counterintuitive structure of optimal schedule granted convexity: first order conditions involving Snell envelope of cost gradient, solved by representation problem Thank you very much!