Quantitative Finance
Quantitative Finance
Quantitative Finance
Quantitative Finance
Publication details, including instructions for authors and subscription information:
http://www.tandfonline.com/loi/rquf20
To cite this article: Marco Avellaneda & Sasha Stoikov (2008) High-frequency trading in a limit order book, Quantitative
Finance, 8:3, 217-224, DOI: 10.1080/14697680701381228
Taylor & Francis makes every effort to ensure the accuracy of all the information (the “Content”) contained
in the publications on our platform. However, Taylor & Francis, our agents, and our licensors make no
representations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of
the Content. Any opinions and views expressed in this publication are the opinions and views of the authors,
and are not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied
upon and should be independently verified with primary sources of information. Taylor and Francis shall
not be liable for any losses, actions, claims, proceedings, demands, costs, expenses, damages, and other
liabilities whatsoever or howsoever caused arising directly or indirectly in connection with, in relation to or
arising out of the use of the Content.
This article may be used for research, teaching, and private study purposes. Any substantial or systematic
reproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in any
form to anyone is expressly forbidden. Terms & Conditions of access and use can be found at http://
www.tandfonline.com/page/terms-and-conditions
Quantitative Finance, Vol. 8, No. 3, April 2008, 217–224
Downloaded by [New York University] at 16:47 21 June 2015
to model these arrival rates, we will draw on recent results stock evolves according to
in econophysics. One of the important achievements of
dSu ¼ dWu ð1Þ
this literature has been to explain the statistical properties
of the limit order book (see Bouchaud et al. 2002, with initial value St ¼ s. Here Wt is a standard one-
Luckock 2003, Potters and Bouchaud 2003, Smith et al. dimensional Brownian motion and is constant.y
2003). The focus of these studies has been to reproduce Underlying this continuous-time model is the implicit
the observed patterns in the markets by introducing ‘zero assumption that our agent has no opinion on the drift or
intelligence’ agents, rather than modelling optimal stra- any autocorrelation structure for the stock.
tegies of rational agents. One possible exception is the This mid-price will be used solely to value the agent’s
work of Luckock (2003), who defines a notion of optimal assets at the end of the investment period. He may not
strategies, without resorting to utility functions. Though trade costlessly at this price, but this source of random-
our objective is different to that of the econophysics ness will allow us to measure the risk of his inventory in
literature, we will draw on their results to infer reasonable stock. In section 2.4 we will introduce the possibility to
arrival rates of buy and sell orders. In particular, trade through limit orders.
the results that will be most useful to us are the size
distribution of market orders (Maslow and Mills 2001,
Weber and Rosenow 2005, Gabaix et al. 2006) and the
2.2. The optimizing agent with finite horizon
temporary price impact of market orders (Bouchaud et al.
2002, Weber and Rosenow 2005). The agent’s objective is to maximize the expected
Our approach, therefore, is to combine the utility
Downloaded by [New York University] at 16:47 21 June 2015
yWe choose this model over the standard geometric Brownian motion to ensure that the utility functionals introduced in the sequel
remain bounded. In practical applications, we could also use a dimensionless model such as
dSu
¼ dWu ð2Þ
Su
with initial value St ¼ s. To avoid mathematical infinities, exponential utility functions could be modified to a standard mean/
variance objective with the same Taylor-series expansion. The essence of the results would remain. More details regarding the model
(2) with mean/variance utility are given in the appendix.
Feature 219
ð8Þ
market impact, since transactions occur at a price that is
given that the agent is holding q stocks. This price is an higher than the mid-price. If pQ is the price of the highest
adjustment to the mid-price, which accounts for the limit order executed in this trade, we define
inventory held by the agent. If the agent is long stock
(q40), the reservation price is below the mid-price, p ¼ pQ s
indicating a desire to liquidate the inventory by selling
to be the temporary market impact of the trade of size Q.
stock. On the other hand, if the agent is short stock
If our agent’s limit order is within the range of this market
(q50), the reservation price is above the mid-price, since
order, i.e. if a5p, his limit order will be executed.
the agent is willing to buy stock at a higher price.
We assume that market buy orders will ‘lift’ our agent’s
sell limit orders at Poisson rate a(a ), a decreasing
function of a. Likewise, orders to sell stock will ‘hit’ the
2.3. The optimizing agent with infinite horizon agent’s buy limit order at Poisson rate b(b ), a decreasing
function of b. Intuitively, the further away from the mid-
Because of our choice of a terminal time T at which we
price the agent positions his quotes, the less often he will
measure the performance of our agent, the reservation
receive buy and sell orders.
price (8) depends on the time interval (T t). Intuitively,
The wealth and inventory are now stochastic and
the closer our agent is to time T, the less risky his
depend on the arrival of market sell and buy orders.
inventory in stock is, since it can be liquidated at the mid-
Indeed, the wealth in cash jumps every time there is a buy
price ST. In order to obtain a stationary version of the
or sell order
reservation price, we may consider an infinite horizon
objective of the form dXt ¼ p a dNta pb dNtb
Z 1
s, qÞ ¼ E
vðx, expð!tÞ expððx þ qSt ÞÞdt : where Ntb is the amount of stocks bought by the agent and
0 Nta is the amount of stocks sold. Ntb and Nta are Poisson
The stationary reservation prices (defined in the same way processes with intensities b and a. The number of stocks
as in Definition 1) are given by held at time t is
qt ¼ Ntb Nta :
1 ð1 2qÞ 2 2
r a ðs, qÞ ¼ s þ ln 1 þ
2! 2 q 2 2 The objective of the agent who can set limit orders is
and uðs, x, q, tÞ ¼ max Et ½expððXT þ qT ST ÞÞ:
a , b
1 ð1 2qÞ 2 2
r b ðs, qÞ ¼ s þ ln 1 þ , Notice that, unlike the setting described in the previous
2! 2 q 2 2
subsection, the agent controls the bid and ask prices and
where !4ð1=2Þ 2 2 q 2 . therefore indirectly influences the flow of orders he
The parameter ! may therefore be interpreted as an receives.
upper bound on the inventory position our agent is Before turning to the solution of this problem, we
allowed to take. The natural choice of consider some realistic functional forms for the intensities
! ¼ ð1=2Þ 2 2 ðqmax þ 1Þ2 would ensure that the prices a(a ) and b(b ) inspired by recent results in the
defined above are bounded. econophysics literature.
220 Feature
2.5. The trading intensity Alternatively, since we are interested in short term
liquidity, the market impact function could be derived
One of the main objectives of the econophysics commu-
directly by integrating the density of the limit order book.
nity has been to describe the laws governing the
This procedure is described in Smith et al. (2003) and
microstructure of financial markets. Here, we will be
Weber and Rosenow (2005) and yields what is sometimes
focusing on the results which address the Poisson
called the ‘virtual’ price impact.
intensity with which a limit order will be executed as
a function of its distance to the mid-price. In order to
quantify this, we need to know statistics on (i) the overall 3. The solution
frequency of market orders, (ii) the distribution of their
size and (iii) the temporary impact of a large market 3.1. Optimal bid and ask quotes
order. Aggregating these results suggests that should
decay as an exponential or a power law function. Recall that our agent’s objective is given by the value
For simplicity, we assume a constant frequency of function
market buy or sell orders. This could be estimated by uðs, x, q, tÞ ¼ max Et ½expððXT þ qT ST ÞÞ ð13Þ
dividing the total volume traded over a day by the average a , b
size of market orders on that day. where the optimal feedback controls a and b will turn
The distribution of the size of market orders has been out to be time and state dependent. This type of optimal
found by several studies to obey a power law. In other dealer problem was first studied by Ho and Stoll (1981).
words, the density of market order size is One of the key steps in their analysis is to use the dynamic
Downloaded by [New York University] at 16:47 21 June 2015
¼ A expðkÞ ð12Þ is the reservation bid price of the stock, when the
inventory is q and
where A ¼ / and k ¼ K. In the case of a power price
r a ðs, q, tÞ ¼ ðs, q, tÞ ðs, q 1, tÞ ð17Þ
impact (10), we obtain an intensity of the form
is the reservation ask price, when the inventory is q.
ðÞ ¼ B= : From the first-order optimality condition in (15),
Feature 221
we obtain the optimal distances b and a. They are given Using equations (24) and (23), along with the optimality
by the implicit relations conditions (18) and (19), we find that the optimal pricing
strategy amounts to quoting a spread of
b b 1 b ðb Þ
s r ðs; q; tÞ ¼ ln 1
ð@b =@Þðb Þ
ð18Þ 2
a þ b ¼ 22 ðs; tÞ þ ln 1 þ ð25Þ
k
and
around the reservation price given by
a 1
a a ða Þ
r ðs, q, tÞ s ¼ ln 1 : ð19Þ ra þ rb
ð@a =@Þða Þ rðs, q, tÞ ¼ ¼ 1 ðs, tÞ þ 2q2 ðs, tÞ:
2
In summary, the optimal bid and ask quotes are
The term 1 can be interpreted as the reservation price,
obtained through an intuitive, two-step procedure.
when the inventory is zero. The term 2 may be interpreted
First, we solve the PDE (15) in order to obtain the
as the sensitivity of the market maker’s quotes to changes
reservation bid and ask prices rb(s, q, t) and ra(s, q, t).
in inventory. For instance, since 2 will turn out to be
Second, we solve the implicit equations (18) and (19) and
negative, accumulating a long position q40 will result in
obtain the optimal distances b(s, q, t) and a(s, q, t)
aggressively low quotes.
between the mid-price and optimal bid and ask quotes.
The bid–ask spread in (25) is independent of the
This second step can be interpreted as a calibration of our
inventory. This follows from our assumption of exponen-
indifference prices to the current market supply b and
tial arrival rates. The spread consists of two components,
demand a.
Downloaded by [New York University] at 16:47 21 June 2015
to be maximized in the expression) are highly nonlinear ðek þ ek Þ ¼ 2 kða þ b Þ þ , ð26Þ
kþ kþ
and may depend on the inventory. We therefore
suggest an asymptotic expansion of in the inventory we notice that the linear term does not depend on the
variable q, and a linear approximation of the order inventory q. Therefore, if we substitute (22) and (26) into
arrival terms. In the case of symmetric, exponential (21) and group terms of order q, we obtain
arrival rates 8
< 1 þ 1 2 1 ¼ 0,
t ss
a ðÞ ¼ b ðÞ ¼ Aek ; ð20Þ 2 ð27Þ
: 1
ðs, T Þ ¼ s;
the indifference prices ra(s, q, t) and rb(s, q, t) coincide
with their ‘frozen inventory’ values, as described in whose solution is 1(s, t) ¼ s. Grouping terms of order q2
section 2.2. yields
Substituting the optimal values given by equations (18) 8
and (19) into (15) and using the exponential arrival rates, < 2 þ 1 2 2 1 2 ð1 Þ2 ¼ 0
t ss s
we obtain 2 2 ð28Þ
: 2
ðs, T Þ ¼ 0:
8
> 1 1 A a b
< t þ 2 ss 2 s2 þ ðek þ ek Þ ¼ 0, whose solution is 2 ¼ ð1=2Þ 2 ðT tÞ. Thus, for this
2 2 kþ
> linear approximation of the order arrival term, we obtain
:
ðs, q, T Þ ¼ qs: the same indifference price
ð21Þ rðs; tÞ ¼ s q 2 ðT tÞ ð29Þ
Consider an asymptotic expansion in the inventory
as for the ‘frozen inventory’ problem from section 2.2.
variable
We then set a bid/ask spread given by
1
ðq, s, tÞ ¼ 0 ðs, tÞ þ q1 ðs, tÞ þ q2 2 ðs, tÞ þ : ð22Þ 2
2 a þ b ¼ 2 ðT tÞ þ ln 1 þ ð30Þ
k
The exact relations for the indifference bid and ask prices,
around this indifference or reservation price. Note that
(16) and (17), yield
if we had taken a quadratic approximation of the order
r b ðs, q, tÞ ¼ 1 ðs, tÞ þ ð1 þ 2qÞ2 ðs, tÞ þ ð23Þ arrival term, we would still obtain 1 ¼ s, but the
sensitivity term 2(s, t) would solve a nonlinear PDE.
and Equations (29) and (30) thus provide us with simple
expressions for the bid and ask prices in terms
r a ðs, q, tÞ ¼ 1 ðs, tÞ þ ð1 þ 2qÞ2 ðs, tÞ þ : ð24Þ of our model parameters. This approximate solution
222 Feature
his quotes are outside the market bid/ask spread). Average Std Std
As far as our simulation is concerned, we chose the Strategy spread Profit (Profit) Final q (Final q)
following parameters: s ¼ 100, T ¼ 1, ¼ 2, dt ¼ 0.005,
Inventory 1.49 65.0 6.6 0.08 2.9
q ¼ 0, ¼ 0.1, k ¼ 1.5 and A ¼ 140. The simulation is Symmetric 1.49 68.4 12.7 0.26 8.4
obtained through the following procedure: at time T,
the agent’s quotes a and b are computed, given the state
variables. At time t þ dt, the state variables are updated.
With probability a(a)dt, the inventory variable 180 Inventory strategy
decreases by one and the wealth increases by s þ a. Symmetric strategy
160
With probability b(b)dt, the inventory increases by one
and the wealth decreases by s – b. The pffiffiffiffimid-price
ffi is 140
updated by a random increment dt. Figure 1 120
illustrates the bid and ask quotes for one simulation of
a stock path. 100
Notice that, at time t ¼ 0.15, the bid and ask quotes are 80
relatively high, indicating that the inventory position
60
must be negative (or short stock). Since the bid price is
aggressively placed near the mid-price, our agent is more 40
likely to buy stock and the inventory quickly returns to
20
zero by time t ¼ 0.2. As we approach the terminal time,
our agent’s bid/ask quotes look more like a strategy that 0
−50 0 50 100 150
is symmetric around the mid-price. Indeed, when we are
close to the terminal time, our inventory position is Figure 2. ¼ 0.1.
considered less risky, since the mid-price is less likely to
move drastically.
Table 2. 1000 simulations with ¼ 0.01.
We then run 1000 simulations to compare our
‘inventory’ strategy to the ‘symmetric’ strategy. This Average Std Std
strategy uses the average bid/ask spread of the inventory Strategy Spread Profit (Profit) Final q (Final q)
strategy over the time period, but centres it around
Inventory 1.35 68.6 8.7 0.12 5.1
the mid-price. For example, the performance of the Symmetric 1.35 68.8 12.8 0.09 8.7
symmetric strategy that quotes a bid/ask spread of $1.49
(corresponding to the average spread of the optimal agent
with ¼ 0.1) is displayed in table 1. This symmetric
strategy has a higher return and higher standard volume of orders than the inventory strategy. However,
deviation than the inventory strategy. The symmetric the inventory strategy obtains a P&L profile with a
strategy obtains a slightly higher return since it is centred much smaller variance, as illustrated in the histogram
around the mid-price, and therefore receives a higher in figure 2.
Feature 223
100
References
80
Biais, B., Glosten, L. and Spatt, C., Market microstructure: a
60
server of microfoundations, empirical results and policy
40 implications. J. Financ. Markets, 2005, 8, 217–264.
Bouchaud, J.-P., Mezard, M. and Potters, M., Statistical
20 properties of stock order books: empirical results and
0 models. Quant. Finance, 2002, 2, 251–256.
50 0 50 100 150 Gabaix, X., Gopikrishnan, P., Plerou, V. and Stanley, H.E.,
Institutional investors and stock market volatility. Quart.
Figure 3. ¼ 0.01. J. Econ., 2006, 121, 461–504.
Gopikrishnan, P., Plerou, V., Gabaix, X. and Stanley, H.,
Statistical properties of share volume traded in financial
markets. Phys. Rev. E, 2000, 62, R4493–R4496.
Table 3. 1000 simulations with ¼ 1. Ho, T. and Macris, R., Dealer bid–ask quotes and transaction
Average Std Std prices: an empirical study of some AMEX options. J. Finance,
Downloaded by [New York University] at 16:47 21 June 2015
0
50 0 50 100 150
Appendix
Figure 4. ¼ 1.
Herein, we consider the geometric Brownian motion
dSu
The results of the simulations comparing the ¼ dWu
‘inventory’ strategy for ¼ 0.01 with the corresponding Su
‘symmetric’ strategy are displayed in table 2. This small with initial value St ¼ s, and the mean/variance objective
value for represents an investor who is close to risk
h i
neutral. The inventory effect is therefore much smaller Vðx; s; q; tÞ ¼ Et ðx þ qST Þ ðqST qsÞ2 ;
and the P&L profiles of the two strategies are very similar, 2
as illustrated in figure 3. In fact, in the limit as ! 0 the
where x is the initial wealth in dollars. This value function
two strategies are identical.
can be written as
Finally, we display the performance of the two
strategies for ¼ 1 in table 3. This choice corresponds q2 s2 2 ðTtÞ
to a very risk averse investor, who will go to great lengths Vðx; s; q; tÞ ¼ x þ qs e 1 :
2
224 Feature