ArticlePDF Available

Abstract and Figures

[image omitted]
Content may be subject to copyright.
High-frequency trading in a limit order book
Marco Avellaneda & Sasha Stoikov
April 24, 2006
Abstract
We study a stock dealer’s strategy for submitting bid and ask quotes in a
limit order book. The agent faces an inventory risk due to the diffusive nature of
the stock’s mid-price and a transactions risk due to a Poisson arrival of market
buy and sell orders. After setting up the agent’s problem in a maximal expected
utility framework, we derive the solution in a two step procedure. First, the
dealer computes a personal indifference valuation for the stock, given his current
inventory. Second, he calibrates his bid and ask quotes to the market’s limit
order book. We compare this ”inventory-based” strategy to a ”naive” best
bid/best ask strategy by simulating stock price paths and displaying the P&L
profiles of both strategies. We find that our strategy has a P&L profile that
has both a higher return and lower variance than the benchmark strategy.
1 Introduction
The role of a dealer in securities markets is to provide liquidity on the exchange by
quoting bid and ask prices at which he is willing to buy and sell a specific quan-
tity of assets. Traditionally, this role has been filled by market-maker or specialist
firms. In recent years, with the growth of electronic exchanges such as Nasdaq’s Inet,
anyone willing to submit limit orders in the system can effectively play the role of a
dealer. Indeed, the availability of high frequency data on the limit order book (see
www.inetats.com) ensures a fair playing field where various agents can post limit
orders at the prices they choose. In this paper, we study the optimal submission
strategies of bid and ask orders in such a limit order book.
The pricing strategies of dealers have been studied extensively in the microstruc-
ture literature. The two most often addressed sources of risk facing the dealer are
(i) the inventory risk arising from uncertainty in the asset’s value and (ii) the asym-
metric information risk arising from informed traders. Useful surveys of their results
can be found in Biais et al. [1], Stoll [13] and a book by O’Hara [10]. In this paper,
we will focus on the inventory effect. In fact, our model is closely related to a paper
by Ho and Stoll [6], which analyses the optimal prices for a monopolistic dealer in
1
a single stock. In their model, the authors specify a ’true’ price for the asset, and
derive optimal bid and ask quotes around this price, to account for the effect of the
inventory. This inventory effect was found to be significant in an empirical study of
AMEX Options by Ho and Macris [5]. In another paper by Ho and Stoll [7], the prob-
lem of dealers under competition is analyzed and the bid and ask prices are shown to
be related to the reservation (or indifference) prices of the agents. In our framework,
we will assume that our agent is but one player in the market and the ’true’ price is
given by the market mid-price.
Of crucial importance to us will be the arrival rate of buy and sell orders that
will reach our agent. In order to model these arrival rates, we will draw on recent
results in econophysics. One of the important achievements of this literature has
been to explain the statistical properties of the limit order book (see Bouchaud et al.
[2], Potters and Bouchaud [11], Smith et al. [12], Luckock [8]). The focus of these
studies has been to reproduce the observed patterns in the markets by introducing
’zero intelligence’ agents, rather than modeling optimal strategies of rational agents.
One possible exception is the work of Luckock [8], who defines a notion of optimal
strategies, without resorting to utility functions. Though our objective is different to
that of the econophysics literature, we will draw on their results to infer reasonable
arrival rates of buy and sell orders. In particular, the results that will be most useful
to us are the size distribution of market orders (Gabaix et al. [3], Maslow and Mills
[9]) and the temporary price impact of market orders (Weber and Rosenow [14],
Bouchaud et al. [2]).
Our approach, therefore, is to combine the utility framework of the Ho and Stoll
approach with the microstructure of actual limit order books as described in the
econophysics literature. The main result is that the optimal bid and ask quotes are
derived in an intuitive two-step procedure. First, the dealer computes a personal
indifference valuation for the stock, given his current inventory. Second, he calibrates
his bid and ask quotes to the limit order book, by considering the probability with
which his quotes will be executed as a function of their distance from the mid-price.
In the balancing act between the dealer’s personal risk considerations and the market
environment lies the essence of our solution.
The paper is organized as follows. In section 2, we describe the main building
blocks for the model: the dynamics of the mid-market price, the agent’s utility ob-
jective and the arrival rate of orders as a function of the distance to the mid-price. In
section 3, we solve for the optimal bid and ask quotes, and relate them to the reserva-
tion price of the agent, given his current inventory. We then present an approximate
solution, numerically simulate the performance of our agent’s strategy and compare
its Profit and Loss (P&L) profile to that of some benchmark strategies.
2
2 The model
2.1 The mid-price of the stock
For simplicity, we assume that money market pays no interest. The mid-market price,
or mid-price, of the stock is modeled as a Brownian motion
St=s+σWt.(2.1)
We choose this model over the standard geometric Brownian motion because it yields
simpler solutions and ensures that the utility functionals introduced in the sequel
remain bounded.
This mid-price will be used solely to value the agent’s assets at the end of the
investment period. He may not trade costlessly at this price, but this source of
randomness will allow us to measure the risk of his inventory in stock. In section 2.4
we will introduce the possibility to trade through limit orders.
2.2 The optimizing agent with finite horizon
The agent’s objective is to maximize the expected exponential utility of his P&L
profile at a terminal time T. This choice of convex risk measure is particularly
convenient, since it will allow us to define reservation (or indifference) prices which
are independent of the agent’s wealth.
We first model an inactive trader who does not have any limit orders in the market
and simply holds an inventory of qstocks until the terminal time T. This passive
strategy will later prove to be useful in the case when limit orders are allowed. The
agent’s value function is
v(x, s, q, t) = Et[exp(γ(x+qST)]
where xis the initial wealth in dollars. This value function can be written as
v(x, s, q, t) = exp(γx) exp(γqs) exp γ2q2σ2(Tt)
2(2.2)
which shows us directly its dependence on the market parameters.
We may now define the reservation bid and ask prices for the agent. The reserva-
tion bid price is the price that would make the agent indifferent between his current
portfolio and his current portfolio plus one stock. The reservation ask price is defined
similarly below. We stress that this is a subjective valuation from the point of view
of the agent and does not reflect a price at which trading should occur.
Definition 1.Let vbe the value function of the agent. His reservation bid price rbis
given implicitly by the relation
v(xrb(s, q, t), s, q + 1, t) = v(x, s, q, t).(2.3)
3
The reservation ask price rasolves
v(x+ra(s, q, t), s, q 1, t) = v(x, s, q, t).(2.4)
A simple computation involving equations (2.2), (2.3) and (2.4) yields a closed-
form expression for the two prices
ra(s, q, t) = s+ (1 2q)γσ2(Tt)
2
and
rb(s, q, t) = s+ (12q)γσ2(Tt)
2
in the setting where no trading is allowed. We will refer to the average of these two
prices as the reservation or indifference price
r(s, q, t) = sqγσ2(Tt),
given that the agent is holding qstocks. This price is an adjustment to the mid-
price, which accounts for the inventory held by the agent. If the agent is long stock
(q > 0), the reservation price is below the mid-price, indicating a desire to liquidate
the inventory by selling stock. On the other hand, if the agent is short stock (q < 0),
the reservation price is above the mid-price, since the agent is willing to buy stock at
a higher price.
2.3 The optimizing agent with infinite horizon
Because of our choice of a terminal time Tat which we measure the performance of
our agent, the reservation price (2.2) depends on the time interval (Tt). Intuitively,
the closer our agent is to time T, the less risky his inventory in stock is, since it can
be liquidated at the mid-price ST. In order to obtain a stationary version of the
reservation price, we may consider an infinite horizon objective of the form
¯v(x, s, q) = EZ
0
exp(ωt) exp(γ(x+qSt))dt.
The stationary reservation prices (defined in the same way as in Definition 1) are
given by
¯ra(s, q) = s+1
γln 1
(2q+ 1)γ2σ2
2ωγ2q2σ2
and
¯rb(s, q) = s+1
γln 1(2q1)γ2σ2
2ωγ2q2σ2,
where ω > 1
2γ2σ2q2.
The parameter ωmay therefore be interpreted as an upper bound on the inventory
position our agent is allowed to take. The natural choice of ω=1
2γ2σ2(qmax + 1)2
would ensure that the prices defined above are bounded.
4
2.4 Limit orders
We now turn to an agent who can trade in the stock through limit orders that he sets
around the mid-price given by (2.1). The agent quotes the bid price pband the ask
price pa, and is committed to respectively buy and sell one share of stock at these
prices, should he be ”hit” or ”lifted” by a market order. These limit orders pband pa
can be continuously updated at no cost. The distances
δb=spb
and
δa=pas
and the current shape of the limit order book determine the priority of execution
when large market orders get executed.
For example, when a large market order to buy Qstocks arrives, the Qlimit
orders with the lowest ask prices will automatically execute. This causes a temporary
market impact, since transactions occur at a price that is higher than the mid-price.
If pQis the price of the highest limit order executed in this trade, we define
p=pQs
to be the temporary market impact of the trade of size Q. If our agent’s limit order
is within range of this market order, i.e. if δa<p, his limit order will be executed.
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 agent’s buy limit order at Poisson rate λb(δb), a decreasing function of δb.
Intuitively, the further away from the mid-price the agent positions his quotes, the
less often he will receive buy and sell orders.
The wealth and inventory are now stochastic and depend on the arrival of market
sell and buy orders. Indeed, the wealth in cash jumps every time there is a buy or
sell order
dXt=padNa
tpbdNb
t
where Nb
tis the amount of stocks bought by the agent and Na
tis the amount of stocks
sold. Nb
tand Na
tare Poisson processes with intensities λband λa. The number of
stocks held at time tis
qt=Nb
tNa
t.
The objective of the agent who can set limit orders is
u(s, x, q, t) = max
δabEt[exp(γ(XT+qTST)))].
Notice that, unlike the setting described in the previous subsection, the agent controls
the bid and ask prices and therefore indirectly influences the flow of orders he receives.
Before turning to the solution of this problem, we consider some realistic functional
forms for the intensities λa(δa) and λb(δb) inspired by recent results in the econophysics
literature.
5
2.5 The trading intensity
One of the main focuses of the econophysics community has been to describe the laws
governing the microstructure of financial markets. Here, we will be focussing on the
results which address the Poisson 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 frequency of market orders (ii) the distribution of
their size and (iii) the temporary impact of a large market order. Aggregating these
results suggests that λshould decay as an exponential or a power law function.
For simplicity, we assume a constant frequency Λ of market buy or sell orders.
This could be estimated by dividing the total volume traded over a day by the average
size of market orders on that day.
The distribution of the size of market orders has been found by several studies to
obey a power law. In other word, the density of market order size is
fQ(x)x1α(2.5)
with α= 1.53 in Gopikrishnan et al. [4] for U.S. stocks, α= 1.4 in Maslow and Mills
[9] for shares on the NASDAQ and α= 1.5 in Gabaix et al. [3] for the Paris Bourse.
There is less consensus on the statistics of the market impact in the econophysics
literature. This is due to a general disagreement over how to define it and how to
measure it. Some authors find that the change in price ∆pfollowing a market order
of size Qis given by
pQβ(2.6)
where β= 0.5 in Gabaix et al. [3] and β= 0.76 in Weber and Rosenow [14]. Potters
and Bouchaud [11] find a better fit to the function
pln(Q).(2.7)
Aggregating this information, we may derive the Poisson intensity at which our
agent’s orders are executed. This intensity will depend only on the distance of his
quotes to the mid-price, i.e. λb(δb) for the arrival of sell orders and λa(δa) for the
arrival of buy orders. For instance, using (2.5) and (2.7), we derive
λ(δ) = ΛP(∆p > δ)
= ΛP(ln(Q)> Kδ)
= ΛP(Q > exp(Kδ))
= Λ R
exp()x1αdx
=Aexp()
(2.8)
where A= Λand k=αK. In the case of a power price impact (2.6), we obtain
an intensity of the form
λ(δ) = B(δ)α
β.
6
Alternatively, since we are interested in short term liquidity, the market impact
function could be derived directly by integrating the density of the limit order book.
This procedure is described in Smith et al. [12] and Weber and Rosenow [14] and
yields what is sometimes called the ”virtual” price impact.
3 The solution
3.1 Optimal bid and ask quotes
Recall that our agent’s objective is given by the value function
u(s, x, q, t) = max
δabEt[exp(γ(XT+qTST)))].(3.1)
This type of optimal dealer problem was first studied by Ho and Stoll [6]. One of the
key steps in their analysis is to use the dynamic programming principle to show that
the function usolves the following Hamilton-Jacobi-Bellman equation
ut+1
2σ2uss + maxδbλb(δb)u(s, x s+δb, q + 1, t)u(s, x, q, t)
+ maxδaλa(δa) [u(s, x +s+δa, q 1, t)u(s, x, q, t)] = 0
u(S, x, q, t) = exp(γ(x+qS)).
The solution to this nonlinear PDE is continuous in the variables s,xand tand
depends on the discrete values of the inventory q. Due to our choice of exponential
utility, we are able to simplify the problem with the ansatz
u(s, x, q, T ) = exp(γx) exp(γθ(s, q, t)).(3.2)
Direct substitution yields the following equation for θ
θt+1
2σ2θSS 1
2σ2γθ2
S
+ maxδbhλb(δb)
γ[1 eγ(sδbrb)]i+ maxδahλa(δa)
γ[1 eγ(s+δara)]i= 0
θ(s, q, T ) = qs.
(3.3)
Applying the definition of reservation bid and ask prices (given in Section 2.2) to the
ansatz (3.2), we find that rband radepend directly on this function θ. Indeed,
rb(s, q, t) = θ(s, q + 1, t)θ(s, q, t) (3.4)
is the reservation bid price of the stock, when the inventory is qand
ra(s, q, t) = θ(s, q, t)θ(s, q 1, t) (3.5)
7
is the reservation ask price,when the inventory is q. From the first order optimality
condition in (3.3), we obtain the optimal distances δband δa. They are given by the
implicit relations
srb(s, q, t) = δb
1
γln 1γλb(δb)
∂λb
∂δ (δb)!(3.6)
and
ra(s, q, t)s=δa1
γln 1γλa(δa)
∂λa
∂δ (δa)!.(3.7)
In summary, the optimal bid and ask quotes are obtained through an intuitive,
two step procedure. First, we solve the PDE (3.3) in order to obtain the reservation
bid and ask prices rb(s, q, t) and ra(s, q, t). Second, we solve the implicit equations
(3.6) and (3.7) and obtain the optimal distances δb(s, q, t) and δa(s, q, t) between the
mid-price and optimal bid and ask quotes. This second step can be interpreted as a
calibration of our indifference prices to the current market supply λband demand λa.
3.2 Approximations and numerical simulations
We now test the effectiveness of our strategy by running simulations focussing pri-
marily on the shape of the P&L profile and the final inventory qT. We will refer to
our strategy as the ”inventory” strategy, and compare it to some benchmark strate-
gies that are symmetric around the mid-price, regardless of the inventory. One such
strategy, the ”best bid/best ask” strategy, consists in quoting bid and ask prices equal
to sM
2and s+M
2respectively, where Mis the market spread (i.e. the difference
between the best bid and best ask prices in the limit order book). Another such
strategy, which we refer to as the ”symmetric” strategy, uses the same spread as the
inventory strategy, but centers it around the mid-price, rather than the reservation
price.
In order to simplify computations, we assume exponential arrival rates
λ(δ) = Ae(3.8)
which are consistent with the results of Potters and Bouchaud [11], as described in
Section 2.5. Once we have chosen our time step dt, we we obtain the value for A
through the relation
λ
M
2dt =AekM
2dt = 1.(3.9)
Equation (3.9) says that if we post a limit order at a distance δ=M
2from the
mid-price, this limit order is essentially a market order that will get executed with
probability one in a dt time interval.
In the first step of our algorithm, rather than solving (3.3) numerically to obtain
the indifference bid and ask prices given by (3.4) and (3.5), we use the average of
8
the suboptimal bid and ask prices derived in section 2.2 for the static version of the
problem. In other words we will be using the proxy
r(s, q, t) = sqγσ2(Tt) (3.10)
for both rband ra. For the second step of our algorithm, we substitute the exponential
order arrival function (3.8) into (3.6) and (3.7) and use the reservation price in (3.10)
to obtain
δb=γqσ2(Tt) + 1
γln(1 + γ
k) (3.11)
and
δa=γqσ2(Tt) + 1
γln(1 + γ
k).(3.12)
Our inventory strategy therefore quotes a fixed spread of
δa+δb=2
γln(1 + γ
k)
centered around the reservation price (3.10).
To illustrate the behavior of the inventory strategy over time, we simulate one mid-
price path, and calculate our agent’s indifference (reservation) price and the optimal
bid and ask quotes. The paths in figure 1 were simulated with the parameters s= 100,
T= 1, σ= 2, dt = 0.005, q= 0, γ= 0.1, k= 1.5 and M= 0.5. For this choice of
parameters, the optimal spread is δa+δb= 1.29.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
98.5
99
99.5
100
100.5
101
101.5
102
102.5
103
Time
Stock
Price
Mid−market price
Price asked
Price bid
Indifference Price
Figure 1. The mid-price, indifference price and the optimal bid and ask quotes
9
Note that when the indifference price is lower than the mid-price, the relation
(3.10) indicates that the inventory position qtmust be positive. This can be observed
at time t= 0.5 for example. Since our agent is anxious to sell due to a positive
inventory, the bid and ask quotes are low relative to the mid-price. This, in turn,
encourages a higher intensity of market buy orders, until time t= 0.55, where the
inventory is back to zero and the mid-price and indifference prices overlap.
On the other hand, at time t= 0.25, the indifference price is higher than the
mid-price, indicating that the inventory position must be negative (or short stock).
Since the bid price is aggressively placed near the mid-price, the inventory quickly
returns to zero at time t= 0.3. Notice that as we approach the terminal time, the
indifference price gets closer to the mid-price, and our agent’s bid/ask quotes look
more like a symmetric strategy. Indeed, when we are close to the terminal time, our
inventory position is considered less risky, since the mid-price is less likely to move
drastically.
We then run 1000 simulations to compare our ”inventory” strategy to the ”best
bid/best ask” strategy. The average and standard deviations of the profit and final
inventory are indicated in Table 1. The standard deviation of qTfor our inventory
Strategy Spread Profit std(Profit) Final q std(Final q)
Inventory 1.29 62.94 5.89 0.10 2.80
Best bid/best ask 0.5 48.43 14.57 0.72 9.56
Symmetric 1.29 67.21 13.43 -0.018 8.66
Table 1: 1000 simulations with γ= 0.1
strategy is 2.80 and the standard deviation of the best bid/best ask strategy is 9.56.
This was to be expected, since our strategy has a tendency to sell when the inventory
is positive and buy when the inventory is negative. What is surprising, is that our
inventory strategy has a P&L profile that has both a higher return and lower standard
deviation than the best bid/best ask strategy. This is illustrated in figure 2, which
displays the histogram of the two P&L profiles. The reason why the best bid/best ask
strategy performs so poorly is that its bid/ask spread of $0.50 is significantly lower
than the optimal of $1.29. Intuitively, the best bid/best ask strategy receives more
orders than the inventory strategy, but the inventory strategy makes significantly
more profit each time it receives an order.
We then compare our ”inventory” strategy to a more sophisticated strategy, which
we call the ”symmetric” strategy. This strategy uses the bid/ask spread of the in-
ventory strategy, i.e. δa+δb=2
γln(1 + γ
k), but centers it around the mid-price. For
example, the performance of the symmetric strategy that quotes a bid/ask spread of
$1.29 (corresponding to the optimal agent with γ= 0.1) is displayed in Table 1. This
symmetric strategy has a higher return (of $67.21 versus $62.94) and higher standard
deviation ($13.43 versus $5.89) than the inventory strategy. The symmetric strategy
10
obtains a slightly higher return since it is centered around the mid-price, and there-
fore receives a higher volume of orders than the inventory strategy. However, the
inventory strategy obtains a P&L profile with a much smaller variance, as illustrated
in the histogram in Figure 3.
Figure 2. γ= 0.1 Figure 3. γ= 0.1
The results of the simulations comparing the ”inventory” strategy for γ= 0.01
with the corresponding ”symmetric” strategy are displayed in Table 2. This small
value for γrepresents an investor who is close to risk neutral. The inventory effect is
therefore much smaller and the P&L profiles of the two strategies are very similar, as
illustrated in Figure 4. In fact, in the limit as γ0 the two strategies are identical.
Strategy Spread Profit std(Profit) Final q std(Final q)
Inventory 1.33 66.78 8.76 -0.02 4.70
Symmetric 1.33 67.36 13.40 -0.31 8.65
Table 2: 1000 simulations with γ= 0.01
Finally, we display the performance of the two strategies for γ= 0.5 in Table 3.
This choice corresponds to a very risk averse investor, who will go to great lengths to
avoid accumulating an inventory. This strategy produces low standard deviations of
profits and final inventory, but generates more modest profits than the corresponding
symmetric strategy (see Figure 5).
Strategy Spread Profit std(Profit) Final q std(Final q)
Inventory 1.15 33.92 4.72 -0.02 1.88
Symmetric 1.15 66.20 14.53 0.25 9.06
Table 3: 1000 simulations with γ= 0.5
11
Figure 4. γ= 0.01 Figure 5. γ= 0.5
References
[1] B. Biais, L. Glosten and C. Spatt, The Microstructure of Stock Markets, Working
paper (2004).
[2] J.-P. Bouchaud, M. Mezard and M. Potters, Statistical Properties of Stock Order
Books: Empirical Results and Models, Quantitative Finance,2(2002) 251-256.
[3] X. Gabaix, P. Gopikrishnan, V. Plerou, H.E. Stanley, A Theory of Large Fluctu-
ations in Stock Market Activity, MIT Department of Economics Working Paper
No. 03-30.
[4] P. Gopikrishnan, V. Plerou, X. Gabaix and H.E. Stanley, Statistical Properties
of Share Volume Traded in Financial Markets, Physical Review E,62 (2000)
R4493-R4496.
[5] T. Ho and R. Macris, Dealer Bid-Ask Quotes and Transaction Prices: An Em-
pirical Study of Some AMEX Options, Journal of Finance,39, (1984) 23-45.
[6] T. Ho and H. Stoll, Optimal Dealer Pricing under Transactions and Return
Uncertainty, Journal of Financial Economics,9(1981) 47-73.
[7] T. Ho and H. Stoll, On Dealer Markets under Competition, Journal of Finance,
35 (1980) 259-267.
[8] H. Luckock, A Steady-State Model of the Continuous Double Auction, Quanti-
tative Finance,3(2003) 385-404.
[9] S. Maslow and M. Mills, Price Fluctuations from the Order Book Perspective:
Empirical Facts and a Simple Model, Physica A,299 (2001) 234-246.
12
[10] M. O’Hara, Market Microstructure Theory, Blackwell, Cambridge, Mas-
sachusetts (1997).
[11] M. Potters and J.-P. Bouchaud, More Statistical Properties of Order Books and
Price Impact, Physica A: Statistical Mechanics and its Applications, 324 (2003)
133-140.
[12] E. Smith, J.D. Farmer, L. Gillemot and S. Krishnamurthy, Statistical Theory of
the Continuous Double Auction, Quantitative Finance,3(2003) 481-514.
[13] H.R. Stoll, Market Microstructure, Handbook of the Economics of Finance,
Edited by G.M. Constantinides et al. North Holland (2003).
[14] P. Weber and B. Rosenow, Order Book Approach to Price Impact, Quantitative
Finance,5(2005) 357 - 364.
13
... The management of inventory risk in financial markets has been a topic of recent interest in the academic field of quantitative finance, starting with the seminal paper [1] by Avellaneda 1 and Stoikov who revived an old economic literature on the topic that dated back to the 1980s (see, for instance, Ho and Stoll [11]). Avellaneda and Stoikov paved the way to a long list of contributions. ...
... Avellaneda and Stoikov paved the way to a long list of contributions. In a nutshell, 2 Guéant et al. provided in [10] a detailed analysis of the stochastic optimal control problem introduced in [1] and proposed closedform approximations of the optimal quotes. New features were then progressively added to get closer and closer to reality: several trade sizes, client tiering, risk externalization through hedging, etc. Cartea and Jaimungal, along with various coauthors, replaced in [7] the original expected utility framework of [1] by a more intuitive one closer to mean-variance optimization and added new features while studying the impact of parameters ambiguity in a series of papers. ...
... In a nutshell, 2 Guéant et al. provided in [10] a detailed analysis of the stochastic optimal control problem introduced in [1] and proposed closedform approximations of the optimal quotes. New features were then progressively added to get closer and closer to reality: several trade sizes, client tiering, risk externalization through hedging, etc. Cartea and Jaimungal, along with various coauthors, replaced in [7] the original expected utility framework of [1] by a more intuitive one closer to mean-variance optimization and added new features while studying the impact of parameters ambiguity in a series of papers. ...
Preprint
Full-text available
In FX cash markets, market makers provide liquidity to clients for a wide variety of currency pairs. Because of flow uncertainty and market volatility, they face inventory risk. To mitigate this risk, they typically skew their prices to attract or divert the flow and trade with their peers on the dealer-to-dealer segment of the market for hedging purposes. This paper offers a mathematical framework to FX dealers willing to maximize their expected profit while controlling their inventory risk. Approximation techniques are proposed which make the framework scalable to any number of currency pairs.
... Market making has been investigated within the economics, finance, and artificial intelligence (AI) literatures. The classic approach taken in the mathematical finance literature has been to treat market making as a problem of stochastic optimal control, where models for order arrivals and executions are developed and then control problems are designed and solved for them [1,3,8,10,[16][17][18]21]. Because of the emphasis on analytically proving results about optimal or approximately optimal control policies, the action space of the market maker is typically quite restrictive. ...
... 2 The agent then adapts these half-spreads at each time step according to the state of the market and the agent's inventory. This approach of choosing half spreads is the main one taken in the financial stochastic control literature on market making (for example, see Avellaneda and Stoikov [3], Gueant et al. [17] or Cartea, Jaimungal and coauthors [6,9,10]). ...
... Spooner and Savani [33] considered a robust version of the Avellaneda and Stoikov model [3] in which an adversarial "market" agent controls the drift of the financial market. This problem ends up being equivalent to the problem considered by Nyström et al. [26]. ...
Preprint
This paper introduces a new representation for the actions of a market maker in an order-driven market. This representation uses scaled beta distributions, and generalises three approaches taken in the artificial intelligence for market making literature: single price-level selection, ladder strategies and "market making at the touch". Ladder strategies place uniform volume across an interval of contiguous prices. Scaled beta distribution based policies generalise these, allowing volume to be skewed across the price interval. We demonstrate that this flexibility is useful for inventory management, one of the key challenges faced by a market maker. In this paper, we conduct three main experiments: first, we compare our more flexible beta-based actions with the special case of ladder strategies; then, we investigate the performance of simple fixed distributions; and finally, we devise and evaluate a simple and intuitive dynamic control policy that adjusts actions in a continuous manner depending on the signed inventory that the market maker has acquired. All empirical evaluations use a high-fidelity limit order book simulator based on historical data with 50 levels on each side.
... There are mainly a plenty number of articles on the HFT strategies in a LOB starting with the early study of Ho and Stoll [35]. By the inspiration of this work, many extensions on this topic have been conducted, see, for example, Avellaneda and Stoikov [3], Guilbaud and Pham [32], Guéant, Lehalle and Fernandez-Tapia [31], Cartea and Jaimungal [12] and Ching et al. [15]. Avellaneda and Stoikov [3] develops optimal prices for a single stock around the market price considering the inventory impact. ...
... By the inspiration of this work, many extensions on this topic have been conducted, see, for example, Avellaneda and Stoikov [3], Guilbaud and Pham [32], Guéant, Lehalle and Fernandez-Tapia [31], Cartea and Jaimungal [12] and Ching et al. [15]. Avellaneda and Stoikov [3] develops optimal prices for a single stock around the market price considering the inventory impact. ...
... Miller [29]. Avellaneda and Stoikov [3] revise the study of Ho and Stoll [35] building a practical model that considers a single dealer trading a single stock facing with a stochastic demand modeled by a continuous time Poisson process. The literature on the optimal market making problem has been burgeoning since 2008 with the work of Avellaneda and Stoikov [3], inspiring Guilbaud and Pham [32] to derive a model involving limit and market orders with optimal stochastic spreads. ...
Thesis
Full-text available
In this thesis, we aim to develop optimal trading strategies in a limit order book for high-frequency trading by stochastic control theory. First, we address for evolving optimal prices where the underlying asset follows the Heston stochastic volatility model including jump components to explore the effect of the arrival of the orders. The goal of the market maker is to maximize her expected return while controlling the inventories where the remaining is charged with a liquidation cost. Two types of utility functions are considered: quadratic and exponential with a risk averse degree. Then, we study on a model considering an underlying asset with jumps in stochastic volatility. We derive the optimal quotes for both models under the assumptions. For numerical simulations, we apply finite differences and linear interpolation as well as extrapolation methods to obtain a solution of the related Hamilton-Jacobi-Bellman (HJB) equation. We demonstrate the risk metrics of the models including profit and loss distribution (PnL), standard deviation of PnL and Sharpe ratio which play important roles for the trader to make decisions on the strategies in high-frequency trading. Moreover, we provide the comparisons of the strategies with the existing ones. As a real data application, we conduct our simulations for the developed strategies in this thesis on a high-frequency data of Borsa Istanbul (BIST). For this purpose, we first estimate the parameters of each model and then perform the numerical experiments on the optimal quotes. Furthermore, we provide the applications on global stocks in order to see that the models are applicable, reasonable, and profitable also for the developed markets. Lastly, we take into account of the optimal market making models with stochastic latency impact. We contribute to this study by providing the numerical experiments with an artificial data. Finally, the thesis ends up with a conclusion and future research directions.
... In the whole trading session, agent are trying to maximize his expected utility function by strategically pose the limit order. Avellaneda [2] modifies the model based on Ho's work and make it adapt to order-driven market. He assumes the mid-price instead the indifference price subject to the diffusion process and solves the HJB with analytical methods. ...
... The market making can be divided into stochastic control based [2,50,35,6,29,26] and reinforcement learning based [48,49,60,22]. The general framework is elaborated in section 3.1.2. ...
... Now we discuss stochastic control against the specific background of market making. We use the method introduced in [2] as the backbone to model the market making and derive HJB equations. In the order-driven market, the agent thrives to maximize its wealth by quote limit with P a t and P b t at both sides. ...
Preprint
Full-text available
Market maker is an important role in financial market. A successful market maker should control inventory risk, adverse selection risk, and provides liquidity to the market. Reinforcement Learning, as an important methodology in control problems, enjoys the advantage of data-driven and less rigid assumption, receive great attentions in market making field since 2018. However, although China Commodity market, which has biggest trading volume on agricultural products, nonferrous metals and some other sectors, the study of applies RL on Market Making in China market is still rare. In this thesis, we try to fill the gap. We develop the Automatic Trading System and verify the feasibility of applying Reinforcement Learning in China Commodity market. Also, we probe the agent behavior by analyzing how it reacts to different environment conditions.
... We assume market makers always use limit orders and investors use market orders. There exist numerous models for market order arrival intensities such as Avellaneda and Stoikov (2008); Baldacci et al. (2021). The arrival probabilities of market orders depend on the market liquidity provided by market makers. ...
... Motivated by Avellaneda and Stoikov (2008); Baldacci et al. (2021), consider the market order arrival probability P(A) as a decreasing function of the ratio between the spread and the volatility. A specification of the arrival probability is ...
Preprint
With the digitalization of the financial market, dealers are increasingly handling market-making activities by algorithms. Recent antitrust literature raises concerns on collusion caused by artificial intelligence. This paper studies the possibility of cooperation between market makers via independent Q-learning. Market making with inventory risk is formulated as a repeated general-sum game. Under a stag-hunt type payoff, we find that market makers can learn cooperative strategies without communication. In general, high spreads can have the largest probability even when the lowest spread is the unique Nash equilibrium. Moreover, introducing more agents into the game does not necessarily eliminate the presence of supra-competitive spreads.
... Related literature Our modelling framework builds on the recent literature on continuous-time models for optimal market making in dealer markets: following pioneering work of Ho and Stoll [29,30] and Avellaneda and Stoikov [4], the probem of optimal market making has been formulated as a stochastic control problem where market makers quote ask/bid prices dynamically to maximize their expected profit adjusted for inventory risk over a finite or infinite time horizon [4,6,7,15,21,22]. In contrast to the earlier literature in which market makers are assumed to know the market dynamics, the recent literature has explored the more realistic case where market makers learn through trial and error, using reinforcement learning (Guéant and Manziuk [22,23], Bergault and Guéant [7], Barzykin et al. [6]. ...
... Related literature Our modelling framework builds on the recent literature on continuous-time models for optimal market making in dealer markets: following pioneering work of Ho and Stoll [29,30] and Avellaneda and Stoikov [4], the probem of optimal market making has been formulated as a stochastic control problem where market makers quote ask/bid prices dynamically to maximize their expected profit adjusted for inventory risk over a finite or infinite time horizon [4,6,7,15,21,22]. In contrast to the earlier literature in which market makers are assumed to know the market dynamics, the recent literature has explored the more realistic case where market makers learn through trial and error, using reinforcement learning (Guéant and Manziuk [22,23], Bergault and Guéant [7], Barzykin et al. [6]. ...
Preprint
Full-text available
The widespread use of market-making algorithms in electronic over-the-counter markets may give rise to unexpected effects resulting from the autonomous learning dynamics of these algorithms. In particular the possibility of 'tacit collusion' among market makers has increasingly received regulatory scrutiny. We model the interaction of market makers in a dealer market as a stochastic differential game of intensity control with partial information and study the resulting dynamics of bid-ask spreads. Competition among dealers is modeled as a Nash equilibrium, while collusion is described in terms of Pareto optima. Using a decentralized multi-agent deep reinforcement learning algorithm to model how competing market makers learn to adjust their quotes, we show that the interaction of market making algorithms via market prices, without any sharing of information, may give rise to tacit collusion, with spread levels strictly above the competitive equilibrium level.
... Trade models without data were also prepared for two purposes. First was the traditional HFT-MM trader model based on [1], employed for referencing our ML HFT-MM traders. The other model was the stylized trader model based on [7], which simulates traders other than HFT-MM. ...
... For the HFT-MM model, we made some types of agents. One is the traditional HFT-MM trader model based on [1]. The others are ML models based on STBM [5], whose base architecture is shown in Figure 2. ...
Conference Paper
This study proposes a new scheme for implementing actual data into artificial market simulations at the level of trader agents. Because humans can introduce bias or overlook the important features of actual traders, we implemented the actual data and automated the strategy learning (imitating) of agents using machine learning (ML). We then ran artificial market simulations in the treader model, which imitates the actual trading behaviors in an ML architecture. Through this study, we demonstrate the potentials and limitations of the proposed scheme.
Conference Paper
This study proposes a new scheme for implementing actual data into artificial market simulations at the level of trader agents. Traditionally, agent design is performed by humans, so the reliability of trader agents depends on the sense of the model designer. Because humans can introduce bias or overlook the important features of actual traders, we implemented the actual data and automated the strategy learning (imitating) of agents using machine learning. We then ran artificial market simulations in the treader model, which imitates the actual trading behaviors in a machine learning (ML) architecture. The model that successfully predicted the actual traders' behaviors in given actual situations generally failed to replicate the features of those behaviors in the simulation environment. When the number of ML model parameters was small, the simulation better reproduced the features than the conventional model. Through this study, we demonstrate the potentials and limitations of the proposed scheme.
Article
Full-text available
We present a theory of excess stock market volatility, in which market movements are due to trades by very large institutional investors in relatively illiquid markets. Such trades generate significant spikes in returns and volume, even in the absence of important news about fundamentals. We derive the optimal trading behavior of these investors, which allows us to provide a unified explanation for apparently disconnected empirical regularities in returns, trading volume and investor size. © 2006 by the President and Fellows of Harvard College and the Massachusetts Institute of Technology.
Article
We investigate present some new statistical properties of order books. We analyse data from the Nasdaq and investigate (a) the statistics of incoming limit order prices, (b) the shape of the average order book, and (c) the typical life time of a limit order as a function of the distance from the best price. We also determine the `price impact' function using French and British stocks, and find a logarithmic, rather than a power-law, dependence of the price response on the volume. The weak time dependence of the response function shows that the impact is, surprisingly, quasi-permanent, and suggests that trading itself is interpreted by the market as new information.
Article
This chapter surveys the literature on fixed-income pricing models, including dynamic term-structure models, and interest-rate sensitive, derivative pricing models. Our overview of conceptual approaches highlights the tradeoffs that have emerged between the complexity of the probability model for the "risk factors[equal, rising dots], data availability, the pricing objective, and the tractability of the resulting pricing model. Initially, we examine term-structure models that price both bonds (default-free and defaultable) and fixed-income derivatives with payoffs in terms of prices or yields on these bonds. These include affine, quadratic-Gaussian, and various stochastic volatility models of the term structure. Then we turn to models designed to price fixed-income derivatives, taking the current yield curve as an input into the pricing framework. These include models based on forward rates and the LIBOR and Swaption Market models.
Article
We propose a theory of large movements in stock market activity. Our theory is motivated by growing empirical evidence on the power-law tailed nature of distribu-tions that characterize large movements of distinct variables describing stock market activity such as returns, volumes, number of trades, and order flow. Remarkably, the exponents that characterize these power laws are similar for different countries, for dif-ferent types and sizes of markets, and for different market trends, suggesting that a generic theoretical basis may underlie these regularities. Our theory provides a unified way to understand the power-law tailed distributions of these variables, their appar-ently universal nature, and the precise values of exponents. It links large movements in market activity to the power-law distribution of the size of large financial institutions. The trades made by large financial institutions create large fluctuations in volume and returns. We show that optimal trading by such large institutions generate power-law tailed distributions for market variables with exponents that agree with those found in empirical data. Furthermore, our model also makes a large number of testable out-of-sample predictions.
Article
Buying and selling stocks causes price changes, which are described by the price impact function. To explain the shape of this function, we study the Island ECN orderbook. In addition to transaction data, the orderbook contains information about potential supply and demand for a stock. The virtual price impact calculated from this information is four times stronger than the actual one and explains it only partially. However, we find a strong anticorrelation between price changes and order flow, which strongly reduces the virtual price impact and provides for an explanation of the empirical price impact function.
Article
A model of the continuous double auction is constructed and analysed. Given the underlying supply and demand functions, the analysis yields steady-state probability distributions for the best ask, best bid and transaction prices. Under fairly general assumptions it is found that these prices are confined to a clearly defined window. Expressions are also obtained for the depth of the order book at arbitrary prices, and for the expected time-to-execution of a given order. These can be used to calculate the optimal order price for a trader with a specified level of impatience, to determine when a market order is preferable to a limit order, and hence in some cases to detect the presence of irrational or ill-informed traders in the market. It is conjectured that, in a market of rational and well-informed traders, the two sides of the order book should be statistically independent.
Article
Statistical properties of an order book and the effect they have on price dynamics were studied using the high-frequency NASDAQ Level II data. It was observed that the size distribution of marketable orders (transaction sizes) has power law tails with an exponent 1+μmarket=2.4±0.1. The distribution of limit order (or quote) sizes was found to be consistent with a power law with an exponent close to 2. A somewhat better fit to this distribution was obtained by using a log-normal distribution which has an effective power law exponent equal to 2 in the middle of the observed range. The depth of the order book measured as a price impact of a hypothetical large market order was observed to be a non-linear function of its size. A large imbalance in the number of limit orders placed at bid and ask sides of the book was shown to lead to a predictable short term price change, which is in accord with the law of supply and demand.
Article
Market microstructure deals with the purest form of financial intermediation — the trading of a financial asset, such as a stock or a bond. In a trading market, assets are not transformed but are simply transferred from one investor to another. The field of market microstructure studies the cost of trading securities and the impact of trading costs on the short-run behavior of securities prices. Costs are reflected in the bid-ask spread (and related measures) and in commissions. The focus of this chapter is on the determinants of the spread rather than on commissions. After an introduction to markets, traders and the trading process, I review the theory of the bid-ask spread in Section 3 and examine the implications of the spread for the short-run behavior of prices in Section 4. In Section 5, the empirical evidence on the magnitude and nature of trading costs is summarized, and inferences are drawn about the importance of various sources of the spread. Price impacts of trading from block trades, from herding or from other sources, are considered in Section 6. Issues in the design of a trading market, such as the functioning of call versus continuous markets and of dealer versus auction markets, are examined in Section 7. Even casual observers of markets have undoubtedly noted the surprising pace at which new trading markets are being established even as others merge. Section 8 briefly surveys recent developments in securities markets in the USA and considers the forces leading to centralization of trading in a single market versus the forces leading to multiple markets. Most of this chapter deals with the microstructure of equities markets. In Section 9, the microstructure of other markets is considered. Section 10 provides a brief discussion of the implications of microstructure for asset pricing. Section 11 concludes.
Article
We survey the literature analyzing the price formation and trading process, and the consequences of market organization for price discovery and welfare. We offer a synthesis of the theoretical microfoundations and empirical approaches. Within this framework, we confront adverse selection, inventory costs and market power theories to the evidence on transactions costs and price impact. Building on these results, we proceed to an equilibrium analysis of policy issues. We review the extent to which market frictions can be mitigated by such features of market design as the degree of transparency, the use of call auctions, the pricing grid, and the regulation of competition between liquidity suppliers or exchanges.
Article
We investigate present some new statistical properties of order books. We analyse data from the Nasdaq and investigate (a) the statistics of incoming limit order prices, (b) the shape of the average order book, and (c) the typical life time of a limit order as a function of the distance from the best price. We also determine the `price impact' function using French and British stocks, and find a logarithmic, rather than a power-law, dependence of the price response on the volume. The weak time dependence of the response function shows that the impact is, surprisingly, quasi-permanent, and suggests that trading itself is interpreted by the market as new information.