257x Filetype PDF File size 0.32 MB Source: rama.cont.perso.math.cnrs.fr
OPERATIONSRESEARCH informs
®
Vol. 58, No. 3, May–June 2010, pp. 549–563
issn0030-364Xeissn1526-54631058030549 doi10.1287/opre.1090.0780
©2010 INFORMS
AStochastic Model for Order Book Dynamics
RamaCont
Department of Industrial Engineering and Operations Research, Columbia University, New York, New York 10027,
rama.cont@columbia.edu
.org/. Sasha Stoikov
ms Cornell Financial Engineering Manhattan, New York, New York 10004,
author(s).or sashastoikov@gmail.com
the.inf Rishi Talreja
to nals Department of Industrial Engineering and Operations Research, Columbia University, New York, New York 10027,
rt2146@columbia.edu
tesy We propose a continuous-time stochastic model for the dynamics of a limit order book. The model strikes a balance
between three desirable features: it can be estimated easily from data, it captures key empirical properties of order book
courhttp://jour dynamics, and its analytical tractability allows for fast computation of various quantities of interest without resorting to
a at simulation. We describe a simple parameter estimation procedure based on high-frequency observations of the order book
as le and illustrate the results on data from the Tokyo Stock Exchange. Using simple matrix computations and Laplace transform
y methods, we are able to efciently compute probabilities of various events, conditional on the state of the order book: an
ailab increase in the midprice, execution of an order at the bid before the ask quote moves, and execution of both a buy and a
v sell order at the best quotes before the price moves. Using high-frequency data, we show that our model can effectively
copa
is capture the short-term dynamics of a limit order book. We also evaluate the performance of a simple trading strategy based
this, on our results.
Subject classications: limit order book; nancial engineering; Laplace transform inversion; queueing systems;
utedpolicies simulation.
ib Area of review: Financial Engineering.
distr History: Received September 2008; revision received March 2009; accepted August 2009. Published online in Articles in
Advance February 26, 2010.
andmission
per
ticle The evolution of prices in nancial markets results from some insight into the interplay between order ow, liquid-
ar and the interaction of buy and sell orders through a rather com- ity, and price dynamics (Bouchaud et al. 2002, Smith et al.
plex dynamic process. Studies of the mechanisms involved 2003, Farmer et al. 2004, Foucault et al. 2005). At the level
thisights in trading nancial assets have traditionally focused on of applications, such models provide a quantitative frame-
r
to quote-driven markets, where a market maker or dealer cen- work in which investors and trading desks can optimize
tralizes buy and sell orders and provides liquidity by set- trade execution strategies (Alfonsi et al. 2010, Obizhaeva
includingting bid and ask quotes. The NYSE specialist system is and Wang 2006). An important motivation for modelling
yright an example of this mechanism. In recent years, electronic high-frequency dynamics of order books, is to use the infor-
cop communications networks (ECNs) such as Archipelago, mation on the current state of the order book to predict
mation, Instinet, Brut, and Tradebook have captured a large share its short-term behavior. We focus, therefore, on conditional
or of the order ow by providing an alternative order-driven probabilities of events, given the state of the order book.
holdsinf trading system. These electronic platforms aggregate all The dynamics of a limit order book resembles in many
outstanding limit orders in a limit order book that is avail- aspects that of a queuing system. Limit orders wait in a
able to market participants and market orders are exe- queue to be executed against market orders (or canceled).
cuted against the best available prices. As a result of Drawing inspiration from this analogy, we model a limit
INFORMSAdditionalthe ECN’s popularity, established exchanges such as the order book as a continuous-time Markov process that tracks
NYSE, NASDAQ, the Tokyo Stock Exchange, and the the number of limit orders at each price level in the book.
London Stock Exchange have adopted electronic order- The model strikes a balance between three desirable fea-
driven platforms, either fully or partially through “hybrid” tures: it can be estimated easily using high-frequency data,
systems. it reproduces various empirical features of order books, and
The absence of a centralized market maker, the mechan- it is analytically tractable. In particular, we show that our
ical nature of execution of orders and, last but not least, model is simple enough to allow the use of Laplace trans-
the availability of data have made order-driven markets form techniques from the queuing literature to compute
interesting candidates for stochastic modelling. At a funda- various conditional probabilities. These include the prob-
mental level, models of order book dynamics may provide ability of the midprice increasing in the next move, the
549
Cont, Stoikov, and Talreja: A Stochastic Model for Order Book Dynamics
550 Operations Research 58(3), pp. 549–563, ©2010 INFORMS
probability of executing an order at the bid before the ask 1. A Continuous-Time Model for a
quote moves, and the probability of executing both a buy Stylized Limit Order Book
and a sell order at the best quotes before the price moves,
given the state of the order book. Although here we only 1.1. Limit Order Books
focus on these events, the methods we introduce allow one Consider a nancial asset traded in an order-driven market.
to compute conditional probabilities involving much more Market participants can post two types of buy/sell orders. A
general events such as those involving latency associated limit order is an order to trade a certain amount of a security
with order processing (see Remark 1). We illustrate our at a given price. Limit orders are posted to a electronic
techniques on a model estimated from order book data for trading system, and the state of outstanding limit orders can
.org/. a stock on the Tokyo Stock Exchange. be summarized by stating the quantities posted at each price
author(s).ms Related literature. Various recent studies have focused level: this is known as the limit order book. The lowest
or on limit order books. Given the complexity of the struc- price for which there is an outstanding limit sell order is
the.inf ture and dynamics of order books, it has been difcult called the ask price and the highest buy price is called the
to nals to construct models that are both statistically realistic and bid price.
amenable to rigorous quantitative analysis. Parlour (1998), Amarket order is an order to buy/sell a certain quantity
tesy Foucault et al. (2005), and Rosu (2009) propose equilib- of the asset at the best available price in the limit order
rium models of limit order books. These models provide book. When a market order arrives it is matched with the
courhttp://jourinteresting insights into the price formation process, but best available price in the limit order book, and a trade
a at contain unobservable parameters that govern agent prefer- occurs. The quantities available in the limit order book are
as le ences. Thus, they are difcult to estimate and use in appli- updated accordingly.
y cations. Some empirical studies on properties of limit order Alimit order sits in the order book until it is either exe-
ailab books are Bouchaud et al. (2002), Farmer et al. (2004),
v cuted against a market order or it is canceled. A limit order
copa and Hollield et al. (2004). These studies provide an exten-
is sive list of statistical features of order book dynamics that may be executed very quickly if it corresponds to a price
this, near the bid and the ask, but may take a long time if the
are challenging to incorporate in a single model. Bouchaud market price moves away from the requested price or if the
uted et al. (2008), Smith et al. (2003), Bovier et al. (2006), requested price is too far from the bid/ask. Alternatively, a
ib policiesLuckock (2003), and Maslov and Mills (2001) propose
stochastic models of order book dynamics in the spirit of limit order can be canceled at any time.
distr the one proposed here, but focus on unconditional/steady– We consider a market where limit orders can be placed
missionstate distributions of various quantities rather than the con- on a price grid 1nrepresenting multiples of a price
andper ditional quantities we focus on here. tick. The upper boundary n is chosen large enough so that
The model proposed here is admittedly simpler in struc- it is highly unlikely that orders for the stock in question are
ticleand ture than some others existing in the literature: It does not placed at prices higher than n within the time frame of our
ar incorporate strategic interaction of traders as in the game- analysis. Because the model is intended to be used on the
thisights theoretic approaches of Parlour (1998), Foucault et al. time scale of hours or days, this nite boundary assumption
r is reasonable. We track the state of the order book with
to (2005), and Rosu (2009), nor does it account for “long
a continuous-time process Xt ≡ X tX t ,
memory” features of the order ow as pointed out by 1 n t0
where X t is the number of outstanding limit orders at
Bouchaud et al. (2002, 2008). However, contrarily to these p
yrightincludingmodels, it leads to an analytically tractable framework price p,1pn.IfXpt<0, then there are Xpt bid
orders at price p;ifX t > 0, then there are X t ask
where parameters can be easily estimated from empirical p p
cop data and various quantities of interest may be computed orders at price p.
The ask price p t at time t is then dened by
mation,efciently. A
holdsor Outline. The paper is organized as follows. Section 1
inf p t=infp=1nX t>0∧n+1
describes a stylized model for the dynamics of a limit A p
order book, where the order ow is described by inde- Similarly, the bid price p t is dened by
pendent Poisson processes. Estimation of model param- B
eters from high-frequency order book time-series data is p t≡supp=1nX t<0∨0
INFORMSAdditionaldescribed in §2 and illustrated using data from the Tokyo B p
Stock Exchange. In §3 we show how this model can be Notice that when there are no ask orders in the book we
used to compute conditional probabilities of various types force an ask price of n + 1, and when there are no bid
of events relevant for trade execution using Laplace trans- orders in the book we force a bid price of 0. The midprice
form methods. Section 4 explores steady-state properties of p t and the bid-ask spread p t are dened by
M S
the model using Monte Carlo simulation, compares condi- p t+p t
tional probabilities computed by simulation to those com- p t≡ B A and p t≡p tp t
M 2 S A B
puted with the Laplace transform methods presented in §3,
and analyzes a high-frequency trading strategy based on Because most of the trading activity takes place in the
our results in §4.3. Section 5 concludes. vicinity of the bid and ask prices, it is useful to keep track
Cont, Stoikov, and Talreja: A Stochastic Model for Order Book Dynamics
Operations Research 58(3), pp. 549–563, ©2010 INFORMS 551
of the number of outstanding orders at a given distance • Limit buy (respectively sell) orders arrive at a dis-
from the bid/ask. To this end, we dene tance of i ticks from the opposite best quote at independent,
⎧ exponential times with rate i,
⎨X t 0p t
and A B B
per quantity at level p x →xp1 x→xpBt+1 with rate
• a limit sell order at price level p>p t increases the
ticleand B p t1
ar quantity at level p x →xp+1 x→xA with rate
ights • a market buy order decreases the quantity at the ask x→xp+1 with rate p tpx for pp t
B p B
p t+1
price: x →x B
yrightincluding• a cancellation of an oustanding limit buy order at price In practice, the ask price is always greater than the bid
level p
p t decreases the quantity at level p x→xp1
mation, B
or The evolution of the order book is thus driven by the ≡x∈n∃kl∈ s.t. 1klnx 0 for pl
holdsinf p
incoming ow of market orders, limit orders, and cancella- x =0 for kplx 0 for pk (3)
tions at each price level, each of which can be represented p p
as a counting process. It is empirically observed (Bouchaud If the initial state of the book is admissible, it remains
et al. 2002) that incoming orders arrive more frequently admissible with probability one:
INFORMSAdditionalin the vicinity of the current bid/ask price and the rate
of arrival of these orders depends on the distance to the Proposition 1. If X0 ∈ , then Xt ∈
bid/ask. ∀t 0=1.
To capture these empirical features in a model that is Proof. It is easily veried that is stable under each
analytically tractable and allows computation of quantities of the six transitions dened above, which leads to our
of interest in applications, most notably conditional prob- assertion.
abilities of various events, we propose a stochastic model
where the events outlined above are modelled using inde- Proposition 2. If ≡ min1ini > 0, then X is an
pendent Poisson processes. More precisely, we assume that, ergodic Markov process. In particular, X has a proper sta-
for i 1, tionary distribution.
Cont, Stoikov, and Talreja: A Stochastic Model for Order Book Dynamics
552 Operations Research 58(3), pp. 549–563, ©2010 INFORMS
Proof. Let N ≡Ntt0, where Nt≡ n X t, 2. Parameter Estimation
p=1 p
and let N be a birth-death process with birth rate given
by ≡2n p and death rate in state i,
i ≡2
+i. 2.1. Description of the Data Set
p=1
Notice that N increases by one at a rate bounded from Our data consist of time-stamped sequences of trades (mar-
above by and decreases by one at a rate bounded from ket orders) and quotes (prices and quantities of outstanding
below by
≡ 2
+ i when in state i. Thus, for all limit orders) for the ve best price levels on each side of the
i
k
t 0, N is stochastically bounded by N.Fork1, let T0 order book, for stocks traded on the Tokyo stock exchange
and Tk denote the duration of the kth visit to 0 and the over a period of 125 days (Aug.–Dec. 2006). This data set,
0
duration between the k 1th and kth visit to 0 of pro- referred to as Level II order book data, provides a more
.org/. k k
cess N, respectively. Dene random variables T and T , detailed view of price dynamics than the trade and quotes
ms 0 0
author(s).ork1,for process N similarly. Then the point process with (TAQ) data often used for high-frequency data analysis,
interarrival times T1 T1T2 T2and the point process which consist of prices and sizes of trades (market orders)
.inf 0 0 1 0 1 0 2 2
the with interarrival times T T T T are alternating and time-stamped updates in the price and size of the bid
0 0 0 0
to nals renewal processes. By Theorem VI.1.2 of Asmussen (2003) and ask quotes.
and the fact that N is stochastically dominated by N,we In Table 1, we display a sample of three consecutive
tesy then have for each k 1, trades for Sky Perfect Communications. Each row provides
k the time, size, and price of a market order. We also display
courhttp://jour ƐT
0 =limNt=0 a sample of Level II bid-side quotes. Each row displays the
a at ƐTk+ƐTk t→ ve bid prices (pb1, pb2, pb3, pb4, pb5), as well as the
le 0 0 quantity of shares bid at these respective prices (qb1, qb2,
as k
ƐT
0
y ailab limNt=0= k k (4) qb3, qb4, qb5).
t→
v ƐT +ƐT
copa 0 0
is 2.2. Estimation Procedure
this, Notice that in state 0 both N and N have birth rate . Thus,
Recall that in our stylized model we assume orders to be
k k 1 of “unit” size. In the data set, we rst compute the average
ƐT =ƐT = (5)
utedpolicies 0 0 sizes of market orders S , limit orders S , and canceled
ib m l
Combining (4) and (5) gives us orders Sc and choose the size unit to be the average size
distr of a limit order S . The limit order arrival rate function for
mission l
ƐTk k 1i5canbe estimated by
andper 0ƐT0 (6)
ˆ Nli
ticleand To show N is ergodic, notice the inequalities i=
T
ar i ∗
i
< 1 =e /1< (7) where N i is the total number of limit orders that arrived
thisights l
r
···
i!
i=1 1 i i=1 at a distance i from the opposite best quote, and T is
to the total trading time in the sample (in minutes). N ∗
and li is
obtained by enumerating the number of times that a quote
including M i increases in size at a distance of 1 i 5 ticks from the
yright
1···
i >
1···
i+ 2
+M = (8) opposite best quote. We then extrapolate by tting a power
i i
cop i=1 i=1 i=M+1 law function of the form
mation, for M>0chosenlargeenoughsothat2
+M> .There- k
or ˆ
holds i=
inf fore, by Corollary 2.5 of Asmussen (2003), N is ergodic i
k
so that ƐT <.Combining this with the bound (6) and
0 (suggested by Zovko and Farmer 2002 or Bouchaud et al.
the fact that for each t 0 Xt=00 if and only if 2002). The power law parameters k and
are obtained by
Nt=0 shows that X is positive recurrent. Because X is a least-squares t
INFORMSAdditionalclearly also irreducible, it follows that X is ergodic.
The ergodicity of X is a desirable feature of theoretical 5 2
min ˆ k
interest: it allows comparison of time averages of various k
i=1 i i
quantities in simulations (average shape of the order book,
average price impact, etc.) to unconditional expectations of Estimated arrival rates at distances 0 i 10 from the
these quantities computed in the model. The steady-state opposite best quote are displayed in Figure 1(a).
behavior of X will be further discussed in §4.1. We note, The arrival rate of market orders is then estimated by
however, that our results involving conditional probabilities
in §3 and applications discussed in §4.3 do not rely on this
ˆ = Nm Sm
ergodicity result. T S
∗ l
no reviews yet
Please Login to review.