Modélisation mathématique des carnets d`ordres
Transcription
Modélisation mathématique des carnets d`ordres
Modélisation mathématique des carnets d’ordres Frédéric Abergel Séminaire du laboratoire MICS 3 décembre 2015 Séminaire du laboratoire MICS Modélisation des carnets d’ordres 1/36 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 2/36 What is a limit order book ? The limit order book is the list, at a given time, of all buy and sell limit orders, with their corresponding prices and volumes The order book evolves over time according to the arrival of new orders 3 main types of orders: limit order: specify a price at which one is willing to buy (sell) a certain number of shares market order: immediately buy (sell) a certain number of shares at the best available opposite quote(s) cancellation order: cancel an existing limit order Price dynamics The price dynamics becomes a by-product of the order book dynamics Séminaire du laboratoire MICS Modélisation des carnets d’ordres 3/36 Plan 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 4/36 Mathematical modelling A set of reasonable assumptions: the limit order book is described as a point process; several types of events can happen; two events cannot occur simultaneously (simple point process). The main questions of interest are the stationarity and ergodicity of the order book; the dynamics of the induced price... ... particularly, its behaviour at larger time scales. ⇒ Linking microstructure modelling and continuous-time finance Séminaire du laboratoire MICS Modélisation des carnets d’ordres 5/36 Some notations The order book is represented by a finite-size vector of quantities X(t ) := (a(t ); b(t )) := (a1 (t ), . . . , aK (t ); b1 (t ), . . . , bK (t )); a(t ): ask side of the order book b(t ): bid side of the order book ∆P: tick size q: unit volume P= P A +P B : 2 mid-price A (p ), B (p ): cumulative number of sell (buy) orders up to price level p Séminaire du laboratoire MICS Modélisation des carnets d’ordres 6/36 Notations a7 PB PA S a a8 a6 a9 a5 a1 a2 a3 a4 b6 b4 b3 b2 b1 b5 b9 b7 b b8 Figure: Order book notations Séminaire du laboratoire MICS Modélisation des carnets d’ordres 7/36 Plan 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 8/36 Zero-intelligence model Inspired by Smith et al. (2003), Abergel and Jedidi (2013) analyzes an elementary LOB model where the events affecting the order book are described by independent Poisson processes: ± λM ; q ± λL ∆ P Li± : arrival of a limit order at level i, with intensity i ; q M ± : arrival of new market order, with intensity Ci± : cancellation of a limit order at level i, with intensity λC i + ai and q |bi | q ⇒ Cancellation rate is proportional to the outstanding quantity at each level. λCi − Under these assumptions, (X(t ))t ≥0 is a Markov process with state space S ⊂ Z2K . Séminaire du laboratoire MICS Modélisation des carnets d’ordres 9/36 Stability of the order book Stationary order book distribution ± } > 0, then Abergel and Jedidi (2013) If λC = min1≤i ≤N {λC i (X(t ))t ≥0 = (a(t ); b(t ))t ≥0 is an ergodic Markov process. In particular (X(t )) has a unique stationary distribution Π. Moreover, the rate of convergence of the order book to its stationary state is exponential. The proof relies on the use of a Lyapunov function V (a, b) = ai + |bi | The proportional cancellation rate helps a lot... and so do the boundary conditions! P Séminaire du laboratoire MICS Modélisation des carnets d’ordres P 10/36 Stability of the order book Stationary order book distribution ± } > 0, then Abergel and Jedidi (2013) If λC = min1≤i ≤N {λC i (X(t ))t ≥0 = (a(t ); b(t ))t ≥0 is an ergodic Markov process. In particular (X(t )) has a unique stationary distribution Π. Moreover, the rate of convergence of the order book to its stationary state is exponential. The proof relies on the use of a Lyapunov function V (a, b) = ai + |bi | The proportional cancellation rate helps a lot... and so do the boundary conditions! An extension of this result holds for general cancellation rates tending to infinity up to a change of Lyapunov function, see Abergel et al. (2015) P Séminaire du laboratoire MICS Modélisation des carnets d’ordres P 10/36 A general approach to study price asymptotics Combining ergodic theory and martingale convergence The ergodicity of the order book allows for a direct study of the asymptotic behaviour of the price, based on Foster-Lyapunov-type criteria Meyn and Tweedie (1993)Glynn and Meyn (1996) and the convergence of martingales Ethier and Kurtz (2005): the evolution of the price is dPt = PK 0 i =1 the rescaled, centered price is P̃tn ≡ Fi (Xt )dNti ; R nt PK 0 i =1 Fi (Xs )λi ds 0 √ Pnt − n its predictable quadratic variation is < P̃ n , P̃ n >t = R nt PK 0 0 2 i =1 (Fi (Xs )) λi ds n R nt PK 0 ergodicity ensures the convergence of Séminaire du laboratoire MICS 0 2 i =1 (Fi (Xs )) λi ds nt Modélisation des carnets d’ordres as n → ∞ 11/36 A general approach to study price asymptotics Combining ergodic theory and martingale convergence The ergodicity of the order book allows for a direct study of the asymptotic behaviour of the price, based on Foster-Lyapunov-type criteria Meyn and Tweedie (1993)Glynn and Meyn (1996) and the convergence of martingales Ethier and Kurtz (2005): the evolution of the price is dPt = PK 0 i =1 the rescaled, centered price is P̃tn ≡ Fi (Xt )dNti ; R nt PK 0 i =1 Fi (Xs )λi ds 0 √ Pnt − n its predictable quadratic variation is < P̃ n , P̃ n >t = R nt PK 0 0 2 i =1 (Fi (Xs )) λi ds n R nt PK 0 ergodicity ensures the convergence of 0 2 i =1 (Fi (Xs )) λi ds nt as n → ∞ This approach is easily extended to state-dependent intensities A similar approach - in a somewhat different modelling context - is used in recent papers by Horst and co-authors Horst and Paulsen (2015). Séminaire du laboratoire MICS Modélisation des carnets d’ordres 11/36 A general approach made precise I Write as above Pt = P0 + t XZ Fi (Xs )dNsi 0 i and its compensator Qt = XZ h= λi Fi (Xs )ds . 0 i Define t X λi Fi (X ) i and let a .s . α = lim t →+∞ Z Z 1X t i λ (Fi (Xs ))ds = h (X )Π(dX ). t i 0 Finally, introduce the solution g to the Poisson equation Lg = h − α Séminaire du laboratoire MICS Modélisation des carnets d’ordres 12/36 A general approach made precise II and the associated martingale t Z Zt = g (Xt ) − g (X0 ) − Lg (Xs )ds ≡ g (Xt ) − g (X0 ) − Qt + αt . 0 Then, the deterministically centered, rescaled price P̄tn ≡ Pnt − αnt √ n converges in distribution to a Wiener process σ̄W . The asymptotic volatility σ̄ satisfies the identity σ̄2 = lim t →+∞ Z XZ 1X t i λ ((Fi −∆i (g ))(Xs ))2 ds ≡ λi ((Fi −∆i (g ))(X ))2 Π(dx ). t i 0 i where ∆i (g )(X ) denotes the jump of the process g (X ) when the process N i jumps and the limit order book is in the state X . Séminaire du laboratoire MICS Modélisation des carnets d’ordres 13/36 Plan 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 14/36 Shape of the order book Figure 2 represents the average shape of the order book. The agreement between the simulated shape and the empirical one is fairly good. 2000 Model Data 1500 Quantity (shares) 1000 500 0 −500 −1000 −1500 −2000 Séminaire du laboratoire MICS Modélisation des carnets d’ordres 15/36 Some quantities of interest (a) FTE LVMH SCHN AXAF CAGR UNBP Log hAi (5) (data) 4 PRTP VIV ISPA GSZ BNPP SASY TOTF ALUA SEVI EDF VIE DANO CARR EAD ESSI PERP AIRP OREP BOUY SGEF SGOB MICP TECF VLLP SOGN ALSO PUBP ACCP SAF RENA PEUP CAPP LAFP 3 2 1 STM 0.5 1 1.5 2 2.5 3 Log hAi (5) (model) 3.5 4 4.5 (b) Log hSi (data) 2 STM RENA LAFP CAPP PEUP SOGN ACCP PUBP ALSO SAF TECF VLLP MICP ESSI SGOB OREP AIRP BOUY PERP EAD SGEF CARR DANO SEVI PRTP EDFALUA VIE BNPP SASY TOTF ISPA GSZ VIV UNBP AXAF CAGR SCHN LVMH FTE 1.5 1 0.5 0.2 0.4 0.6 0.8 1 1.2 1.4 Log hSi (model) 1.6 1.8 2 (c) SOGN σ∞ (data) 1.2 RENA STM 1 LAFP PEUPSGOB ALSO CAPP SGEF MICP VLLPAIRP ACCP ALUA CARR OREP PUBP TECF BNPP DANO SASY TOTF BOUY ESSI SAF EDF ISPA GSZ PERP PRTP EAD VIE AXAF CAGR VIV SEVI UNBP LVMH SCHN FTE 0.8 0.6 0.4 0.2 0.2 0.4 0.6 Séminaire du laboratoire MICS 0.8 σ∞ (model) 1 1.2 Modélisation des carnets d’ordres 16/36 Signature plot Figure 4 shows the signature plots computed on our simulations compared to the empirical ones. Signature plots are computed for both the trade prices and the mid-prices, and in both event and calendar time. Trades (Sim.) Mid−price (Sim.) Trades (Data) Mid−price (Data) 1.2 1 0.25 0.8 σh2 0.2 0.15 0.6 0.1 0.05 0.4 0 20 40 60 120 140 160 80 100 0.2 0 20 40 60 80 100 time) des carnets d’ordres Séminaire du laboratoireTime MICS lag h (trade Modélisation 180 200 17/36 Summarizing the zero intelligence models Easy to model Nice mathematical properties Easy to calibrate and simulate A good descriptor of the shape of the book and the retun distibution Fails to reproduce the very high frequency structure of volatility Fails to reproduce the low frequency volatility Séminaire du laboratoire MICS Modélisation des carnets d’ordres 18/36 Plan 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 19/36 Plan 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 20/36 A finer description of the order flow Notation M, L , C, O Definition market order, limit order, cancellation, any order. Mbuy , Msell buy/sell market order. 0 0 , Msell Mbuy buy/sell market order that does not change the mid price: i. e. order quantity < best ask/bid available quantity. 1 1 Mbuy , Msell buy/sell market order that changes the mid price: i. e. order quantity ≥ best ask/bid available quantity. Lbuy , Lsell buy/sell limit order. 0 0 Lbuy , Lsell buy/sell limit order that does not change the mid price: i. e. order price ≤ / ≥ best bid/ask price. 1 1 Lbuy , Lsell buy/sell limit order that changes the mid price: i. e. order price > / < best bid/ask price. Séminaire du laboratoire MICS Modélisation des carnets d’ordres 21/36 Measuring dependencies in the order flow: passive orders 0 |Lbuy 0 |Lsell 0 |Cbuy 0 |Csell 0 |Mbuy 0 |Msell 1 |Lbuy 1 |Lsell 1 |Cbuy 1 |Csell 1 |Mbuy 1 |Msell 0 Lbuy 41.37 9.61 17.91 25.18 22.17 5.60 32.39 7.65 25.02 21.48 28.27 11.83 0 Lsell 9.64 41.79 25.88 17.98 5.33 21.14 8.06 29.94 19.09 23.28 9.60 23.05 0 Cbuy 16.00 21.95 40.67 6.04 4.75 10.61 0.21 26.04 35.70 5.42 7.38 33.36 0 Csell 22.40 16.12 5.98 41.30 9.94 5.01 25.27 0.22 4.96 34.70 28.12 7.24 0 Mbuy 2.90 1.61 1.39 1.79 34.64 0.72 4.84 5.63 0.96 0.76 3.11 1.04 0 Msell 1.58 2.96 1.74 1.42 0.70 34.32 5.58 5.62 0.67 1.16 1.02 3.13 |O 22.82 22.93 19.80 20.03 2.99 3.00 Table: Conditional probabilities (in %) of occurrences per event type Séminaire du laboratoire MICS Modélisation des carnets d’ordres 22/36 Measuring dependencies in the order flow: aggressive orders 0 |Lbuy 0 |Lsell 0 |Cbuy 0 |Csell 0 |Mbuy 0 |Msell 1 |Lbuy 1 |Lsell 1 |Cbuy 1 |Csell 1 |Mbuy 1 |Msell |O 1 Lbuy 2.35 1.02 1.20 2.08 7.68 0.53 1.42 1.39 8.34 3.20 11.52 6.79 1 Lsell 1.12 2.29 2.34 1.27 0.65 7.19 1.57 1.36 3.59 7.88 7.98 9.34 1 Cbuy 0.02 1.05 1.49 0.37 0.55 1.48 5.80 1.42 0.72 0.63 0.90 1.05 1 Csell 1.08 0.02 0.37 1.49 1.31 1.10 1.77 5.39 0.35 0.75 0.87 1.81 1 Mbuy 1.39 0.15 0.56 0.51 11.86 0.42 2.44 12.37 0.48 0.18 0.67 0.66 1 Msell 0.16 1.44 0.47 0.60 0.42 11.88 10.65 2.96 0.12 0.57 0.55 0.70 2.07 2.12 0.85 0.88 1.27 1.26 Table: Conditional probabilities (in %) of occurrences per event type Séminaire du laboratoire MICS Modélisation des carnets d’ordres 23/36 Interpreting the results 0 : reinforces the consensus that the stock is not moving down. This Lbuy 0 . increases the probability of Lbuy 0 : decreases the available liquidity on the buy side. Other participants Cbuy 0 may feel less comfortable posting buy orders, and the probability of Cbuy 1 and Cbuy increases. 0 0 Mbuy : increases the probability of Mbuy . This can be explained by order splitting - large orders are split into smaller pieces that are more easily executed - and the momentum effect - other participants following the 1 1 move. The increase of the probability of Mbuy and Lbuy is also explained by the momentum effect. 1 Lbuy : improves the offered price to buy the stock. The first major effect 1 observed is a big increase in the probability of Msell - this is the market taking effect. The second effect is a large increase in the probability of 1 Cbuy - the new liquidity is rapidly cancelled. This might reflect a market manipulation, where agents are posting fake orders. Séminaire du laboratoire MICS Modélisation des carnets d’ordres 24/36 Interpreting the results 1 Cbuy : a total cancellation of the best buy limit increases the probability of 1 Lbuy ; other participants re-offer the liquidity at the previous best buy price. 1 It also increases the probability of Lsell , when a new consensus is concluded by the market participants at a lower price. 1 Mbuy : consumes all the offered liquidity at the best ask. This increases 1 the probability of Lsell when some participants re-offer the liquidity at the 1 same previous best ask price. It also increases the probability of Lbuy , when a new consensus is concluded by the market participants at a higher price. This is the market making effect. Séminaire du laboratoire MICS Modélisation des carnets d’ordres 25/36 Plan 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 26/36 The failures of zero-intelligence models Zero-intelligence models fail to capture the dependencies between various types of orders: clustering of market orders; interplay between liquidity taking and providing; leverage effect, as has been previously shown. Séminaire du laboratoire MICS Modélisation des carnets d’ordres 27/36 Hawkes processes Hawkes processes provide an ad hoc tool to describe the mutual excitations of the arrivals of different types of orders. j j In D dimensions, the process Ns has a stochastic intensity λt such that λjt = λj0 + D Z X p =1 t φjp (t − s )dNsp . (2.1) 0 A simplifying choice is the exponential kernel φjp (s ) = αjp exp(−βjp s ) (2.2) leading to markovian processes. A classical result states that the process is stationary iff the spectral radius of the matrix [ αjp ] βjp (2.3) is < 1, see Massoulié (1998). Séminaire du laboratoire MICS Modélisation des carnets d’ordres 28/36 Large-time behaviour Results similar to those obtained in the zero-intelligence case hold Abergel and Jedidi (2015) Large-time behaviour for Hawkes-process driven LOB Under the usual stationarity conditions for the intensities, there P P P exists a Lyapunov function V = |ai | + |bi | + Uk λk and the LOB converges exponentially to its stationary distribution Π The rescaled, (deterministically) centered price converges to a Wiener process The proofs rely on the same decomposition as in the Poisson arrival case, thanks to the fact that the proportional cancellation rate remains bounded away from zero Some extra care is required to prove that the solution to the Poisson equation is in L2 (Π(dx )) Séminaire du laboratoire MICS Modélisation des carnets d’ordres 29/36 Plan 1 Elementary modelling of limit order books Zero-intelligence models Stability and long-time dynamics Large-scale limit of the price process Simulation with zero-intelligence models 2 Better order book modelling Empirical evidence of the order flow dependency structure Modelling with Hawkes processes Simulation with Hawkes processes Séminaire du laboratoire MICS Modélisation des carnets d’ordres 30/36 Introducing dependencies in the order flow As an example, Muni Toke (2011) study variations of the model below A better order book model λM (t ) λL (t ) = λM 0 + Z t αMM e −βMM (t −s ) dN M (s ), 0 Z t = λL0 + αLL e −βLL (t −s ) dN L (s ) 0 Z t + αML e −βML (t −s ) dN M (s ). 0 MM and LL effect for clustering of orders ML effect as observed on data No global LM effect observed on data Séminaire du laboratoire MICS Modélisation des carnets d’ordres 31/36 Numerical results on the order book: fitting Fitting and simulation Model µ0 αMM βMM HP 0.22 LM 0.22 MM 0.09 1.7 6.0 MM LL 0.09 1.7 6.0 MM LM 0.12 1.7 6.0 MM LL LM 0.12 1.7 5.8 Common parameters: m1P λ0 αLM βLM αLL 1.69 0.79 5.8 1.8 1.69 0.60 1.7 0.82 5.8 1.8 0.02 5.8 1.8 1.7 = 2.7, ν1P = 2.0, s1P = 0.9 V = 275, m2V = 380 1 C λ = 1.35, δ = 0.015 βLL 6.0 6.0 Table: Estimated values of parameters used for simulations. Séminaire du laboratoire MICS Modélisation des carnets d’ordres 32/36 Impact on arrival times Figure: Empirical density function of the distribution of the interval times between a market order and the following limit order for three simulations, namely HP, MM+LL, MM+LL+LM, compared to empirical measures. In inset, same data using a semi-log scale Séminaire du laboratoire MICS Modélisation des carnets d’ordres 33/36 Impact on the bid-ask spread 0.3 Empirical BNPP.PA Homogeneous Poisson Hawkes MM Hawkes MM+LM 0.25 100 -1 10 0.2 10-2 10-3 0.15 -4 10 10-5 0.1 10-6 0 0.05 0.1 0.15 0.2 0.05 0 0 0.05 0.1 0.15 0.2 0.25 0.3 Figure: Empirical density function of the distribution of the bid-ask spread for three simulations, namely HP, MM, MM+LM, compared to empirical measures. In inset, same data using a semi-log scale. X-axis is scaled in euro (1 tick is 0.01 euro). Séminaire du laboratoire MICS Modélisation des carnets d’ordres 34/36 References I Abergel, F., Anane, M., Chakraborti, A., Jedidi, A., and Muni Toke, I. (2015). Limit order books. Cambridge University Press. to appear. Abergel, F. and Jedidi, A. (2013). A mathematical approach to order book modelling. International Journal of Theoretical and Applied Finance, 16:1350025. Abergel, F. and Jedidi, A. (2015). Long-time behavior of a Hawkes process-based limit order book. SIAM Journal on Financial Mathematics, 6:1026–1043. Ethier, S. N. and Kurtz, T. G. (2005). Markov Processes: Characterization and Convergence. Wiley, Hoboken. Glynn, P. W. and Meyn, S. P. (1996). A Liapounov bound for solutions of the Poisson equation. Annals of Probability, 24:916–931. Horst, U. and Paulsen, M. (2015). A law of large numbers for limit order books. arXiv:1501.00843. Massoulié, L. (1998). Stability results for a general class of interacting point processes dynamics, and applications. Stochastic Processes and their Applications, 75:1–30. Séminaire du laboratoire MICS Modélisation des carnets d’ordres 35/36 References II Meyn, S. and Tweedie, R. (1993). Stability of Markovian processes III: Foster-Lyapunov criteria for continuous-time processes. Advances in Applied Probability, 25:518–548. Muni Toke, I. (2011). Market making in an order book model and its impact on the spread. In Abergel, F., Chakrabarti, B. K., Chakraborti, A., and Mitra, M., editors, Econophysics of Order-driven Markets, pages 49–64. Springer, Milan. Smith, E., Farmer, J. D., Gillemot, L., and Krishnamurthy, S. (2003). Statistical theory of the continuous double auction. Quantitative Finance, 3:481–514. Séminaire du laboratoire MICS Modélisation des carnets d’ordres 36/36