Market Making and Mean ReversionTanmoy Chakraborty Michael Kearns CK11

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Market Making and Mean Reversion

Tanmoy Chakraborty Michael Kearns


University of Pennsylvania University of Pennsylvania
[email protected] [email protected]

ABSTRACT 1. INTRODUCTION
Market making refers broadly to trading strategies that seek A market maker is a firm, individual or trading strategy
to profit by providing liquidity to other traders, while avoid- that always or often quotes both a buy and a sell price for a
ing accumulating a large net position in a stock. In this financial instrument or commodity, hoping to make a profit
paper, we study the profitability of market making strate- by exploiting the difference between the two prices, known as
gies in a variety of timeseries models for the evolution of a the spread. Intuitively, a market maker wishes to buy and
stock’s price. We first provide a precise theoretical charac- sell equal volumes of the instrument (or commodity), and
terization of the profitability of a simple and natural market thus rarely or never accumulate a large net position, and
making algorithm in the absence of any stochastic assump- profit from the difference between the selling and buying
tions on price evolution. This characterization exhibits a prices.
trade-off between the positive effect of local price fluctua- Historically, the chief purpose of market makers has been
tions and the negative effect of net price change. We then to provide liquidity to the market — the financial instrument
use this general characterization to prove that market mak- can always be bought from, or sold to, the market maker at
ing is generally profitable on mean reverting time series — the quoted prices. Market makers are common in foreign ex-
time series with a tendency to revert to a long-term aver- change trading, where most trading firms offer both buying
age. Mean reversion has been empirically observed in many and selling rates for a currency. They also play a major role
markets, especially foreign exchange and commodities. We in stock exchanges, and historically exchanges have often
show that the slightest mean reversion yields positive ex- appointed trading firms to act as official market makers for
pected profit, and also obtain stronger profit guarantees for specific equities. NYSE designates a single market maker
a canonical stochastic mean reverting process, known as the for each equity, known as the specialist for that stock. In
Ornstein-Uhlenbeck (OU) process, as well as other stochastic contrast, NASDAQ allows several market makers for each
mean reverting series studied in the finance literature. We equity. More recently, fast electronic trading systems have
also show that market making remains profitable in expec- led trading firms to behave like market makers without for-
tation for the OU process even if some realistic restrictions mally being designated so. In other words, many trading
on trading frequency are placed on the market maker. firms attempt to buy and sell an equity simultaneously, and
profit from the difference between buying and selling prices.
Categories and Subject Descriptors We shall refer to such trading algorithms generally as market
making algorithms.
F.2.2 [Theory of Computation]: Analysis of Algorithms In this paper, we analyze the profitability of market mak-
and Problem Complexity; J.4 [Social and Behavioral Sci- ing algorithms. Market making has existed as a trading
ences]: Economics practice for a long time, and it has also inspired significant
amount of empirical as well as theoretical research [9, 5, 10,
General Terms 1, 2, 3]. Most of the theoretical models [5, 9, 2, 3] view mar-
ket makers as dealers who single-handedly create the market
Theory, Economics, Algorithms
by offering buying and selling prices, and there is no trading
in their absence (that is, all trades must have the market
Keywords marker as one of the counterparties). On the other hand,
Computational Finance, Algorithmic Trading, Market Mak- much of the empirical work has focused on analyzing the be-
ing, Mean Reversion havior of specialist market makers in NYSE, using historical
trading data from NYSE [10, 1]. In contrast, our theoretical
and empirical work studies the behavior of market making
algorithms in both very general and certain specific price
Permission to make digital or hard copies of all or part of this work for time series models, where trading occurs at varying prices
personal or classroom use is granted without fee provided that copies are even in the absence of the market maker. This view seems
not made or distributed for profit or commercial advantage and that copies
appropriate in modern electronic markets, where any trad-
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific ing party whatsoever is free to quote on both sides of the
permission and/or a fee. market, and officially designated market makers and special-
EC’11, June 5–9, 2011, San Jose, California, USA. ists are of diminishing importance.
Copyright 2011 ACM 978-1-4503-0261-6/11/06 ...$10.00.
Market Making vs. Statistical Arbitrage. and sell limit orders with some quoted prices at any time,
Before describing our models and results, we first offer and may also cancel these orders at any future time. For
some clarifying comments on the technical and historical dif- simplicity, we assume that each order requests only one share
ferences between market making and statistical arbitrage, of the equity (a trader may place multiple orders at the same
the latter referring to the activity of using computation- price). If at any time after placing the order and before its
intensive quantitative modeling to design profitable auto- cancellation, the market price of the equity equals or exceeds
mated trading strategies. Such clarification is especially (respectively, falls below) the quoted price on a sell order
called for in light of the blurred distinction between tra- (respectively, buy order), then the order gets executed at
ditional market-makers and other kinds of trading activity the quoted price, i.e. the trader pays (respectively, gains)
that electronic markets have made possible, and the fact one share and gains (respectively, pays) money equal to the
that many quantitative hedge funds that engage in statisti- price quoted on the order. We shall refer to the net volume
cal arbitrage may indeed have strategies that have market of the equity held by a trader at a given point of time as
making behaviors. inventory. Note that inventory may be positive (net long
Perhaps the hallmark of market making is the willingness position) or negative (net short position). To evaluate the
to always quote competitive buy and sell prices, but with profit made by a market making algorithm, we shall fix a
the goal of minimizing directional risk. By this we mean time horizon when the algorithm must liquidate its inventory
that the market maker is averse to acquiring a large net at the current market price.
long or short position in a stock, since in doing so there is Our first and most general theoretical result is a succinct
the risk of large losses should the price move in the wrong and exact characterization of the profit obtained by a sim-
direction. Thus if a market maker begins to acquire a large ple market-making algorithm, given any market price time
net long position, it would continue to quote a buy price, series, in the model above. If the sum of absolute values
but perhaps a somewhat lower one which is less likely to get of all local price movements (defined below) is K, and the
executed. Alternatively (or in addition), the strategy might difference between opening and closing prices is z, we show
choose to lower its sell quote in order to increase the chances that the profit obtained is exactly (K − z 2 )/2. The positive
of acquiring short trades to offset its net long inventory. In term K can be viewed as the product of the average volatil-
this sense, pure market making strategies have no “view” ity of the price and the duration for which the algorithm is
or “opinion” on which direction the price “should” move — run. The negative term z 2 captures the net change in price
indeed, as we shall show, the most profitable scenario for during the entire trading period. Thus this characterization
a market maker is one in which there is virtually no overall indicates that market making is profitable when there is a
directional movement of the stock, but rather a large amount large amount of local price movement, but only a small net
of non-directional volatility. change in the price. This observation matches a common
In contrast, many statistical arbitrage strategies are the intuition among market makers, and provides a theoretical
opposite of market making in that they deliberately want foundation for such a belief. An unbiased random walk (or
to make directional bets — that is, they want to acquire Brownian motion) provides a boundary of profitability — the
large net positions because they have a prediction or model algorithm makes zero expected profit (as do all trading al-
of future price movement. To give one classic example, in gorithms), while any stochastic price process whose closing
the simplest form of pairs trading, one follows the prices of price has comparatively less variance from the opening price
two presumably related stocks, such as Microsoft and Ap- makes positive expected profit. The last observation leads
ple. After normalizing the prices by their historical means to our second result.
and variances, one waits for there to be a significant gap in
their current prices — for instance, Apple shares becoming Mean Reversion.
quite expensive relative to Microsoft shares given the his- We next exhibit the benefit of obtaining a succinct and
torical normalization. At this point, one takes a large short exact expression for profit by applying it to some classes of
position in Apple and an offsetting large long position in stochastic time series that help in understanding the circum-
Microsoft. This amounts to a bet that the prices of the two stances under which the algorithm is profitable. We identify
stocks will eventually return to their historical relationship: a natural class of time series called mean-reverting processes
if Apple’s share price falls and Microsoft’s rises, both po- whose properties make our market making algorithm prof-
sitions pay off. If the gap continues to grow, the strategy itable in expectation. A stochastic price series is considered
incurs a loss. If both rise or both fall without changing the to be reverting towards its long-term mean µ if the price
gap between, there is neither gain nor loss. The important shows a downward trend when greater than µ and upward
point here is that, in contrast to market making, the source trend when less than µ. Prices of commodities such as oil
of profitability (or loss) are directional bets rather than price [11, 13] and foreign exchange rates [8] have been empirically
volatility. observed to exhibit mean reversion. Mean-reverting stochas-
tic processes are studied as a major class of price models, as
Theoretical Model and Results. a contrast to stochastic processes with directional drift, or
We first summarize our theoretical models and our three with no drift, such as Brownian motion. One widely studied
main theoretical results. We assume there is an exogenous mean-reverting stochastic process is the Ornstein-Uhlenbeck
market where an equity can be bought and sold at prices process [7].
dictated by a given time series process. At any given point Formally, our second result states that out market mak-
of time, there is a single market price at which the equity can ing algorithm has expected positive profit on any random
both be bought as well as sold. The price evolution in the walk that reverts towards its opening price. This result is
market is captured by the time series. The market making quite revealing — it holds if the random walk shows even
algorithm is an online decision process that can place buy the slightest mean reversion, regardless of how complex the
process may be (for instance, its evolution may depend not 2. A GENERAL CHARACTERIZATION
only on the current price, but also on the historical prices We first describe our theoretical model formally. We as-
in an arbitrary way, as well as the current time). It iden- sume that all events occur at discrete time steps 0, 1, 2 . . . T ,
tifies mean reversion as the natural property which renders where T is the time horizon when the market making al-
market making profitable. gorithm must terminate. There is a market price Pt of the
Our third result shows that simple market making algo- equity at every time step 0 ≤ t ≤ T . Thus P0 , P1 . . . PT
rithms yield stronger profit guarantees for specific mean- is the market price time series. We assume that all prices
reverting processes. As an example, we consider the Ornstein- are integral multiples of a basic unit of money (regulations
Uhlenbeck (OU) process. If the price series follows this pro- in NYSE/NASDAQ currently require prices to be integral
cess, we show that a simple market making algorithm is multiples of a penny).
profitable when run for a sufficiently long time. Moreover, A trading algorithm may place and cancel (possibly both)
the profit grows linearly with the duration for which the al- buy and sell orders at any of these time steps, and each order
gorithm is run, and the profit guarantees hold not only in requests a single share at a quoted price Y . A buy (respec-
expectation, but with high probability. We prove this by tively, sell) order at price Y placed at time t gets executed
showing that while E[K] grows linearly with time, E[z 2 ] is at the earliest time t0 > t such that Pt0 ≤ Y (respectively,
upper bounded by a constant. Unlike our second result, we Pt0 ≥ Y ), provided that the order is not canceled before t0 .
do not need the assumption that the price series begins at If the buy (respectively, sell) order gets executed, then the
the long-term mean — the initial price appears in the upper algorithm pays (respectively, earns) Y units of money due to
bound on E[z 2 ]. the execution. We assume no market impact — the orders
We also show an analogous result for another mean revert- placed by the algorithm (which may get executed) do not
ing process that has been studied in the finance literature, affect the prices in the future. We leave to future work the
a model studied by Schwartz [14]. In this model, the local important topic of incorporation of market impact into our
volatility is a linear function of price, while the OU process results.
models volatility as a constant. The inventory held by the algorithm at time t is the num-
We remark that the results outlined above assume a model ber of shares held by it at that time. The inventory is in-
where the market maker can place and cancel orders as fre- cremented upon every executed buy order, and decremented
quently as it likes, and in fact our algorithm does so af- upon every executed sell order. The initial inventory is, nat-
ter every change in price. In practice, however, a market urally, assumed to be zero. At time T , the algorithm must
maker cannot react to every change, since the price may liquidate its inventory at market prices (mark-to-market). If
change with every trade in the market. We thus also ana- the algorithm has inventory x (x may be negative) at time
lyze the profitability of our market making algorithm when T , then it earns or pays xPT from the liquidation. The
it is allowed to change its orders only after every L steps, by profit obtained by the algorithm is then its net cash position
simulating our algorithm on random samples from the OU (positive or negative) after liquidation.
process. If the price series is the OU process, we show that A trading algorithm is considered to be an online process
the expected profit continues to grow linearly with time. — it makes its decisions (about placing and canceling or-
ders) at time t after observing the price series up to (and
Other Related Work. including) time t. The algorithm may or may not have ad-
To our knowledge, no previous work has studied market ditional information about the price series. Note that we
making in an exogenously specified price time series model. assume no latency and arbitrary frequency — the algorithm
Most of the theoretical work, as mentioned before, considers can look at current prices and place buy and sell orders in-
a single dealer model where all trades occurred through the stantaneously, and it can do so as frequently as it wishes.
market maker at its quoted prices [5, 9, 2, 3]. This includes Again, we leave the relaxation of these unrealistic assump-
the well-known Glosten-Milgrom model for market making tions for future work.
[9]. On the other hand, there has been a fair amount of
work in algorithmic trading, especially statistical arbitrage, Market Making Algorithms.
that assumes an exogenous price time series. The closest The basic class of market making algorithms that we con-
line of research to our work in this literature is the analy- sider is the following: At time t, the algorithm cancels all un-
sis of pair trading strategies under the assumption that the executed orders, and places new buy orders at prices Yt , Yt −
price difference between the two equities show mean rever- 1, Yt − 2 . . . Yt − Ct and new sell orders at prices Xt , Xt +
sion (e.g. [4, 12]). As discussed before, such strategies are 1, Xt +2 . . . Xt +Ct , where Yt < Xt and Ct is a non-negative
qualitatively very different from market making strategies. integer. Such ladders of prices are set up to ensure that large
Moreover, most algorithmic trading work, to our knowledge, sudden fluctuations in price causes a proportionally large
either analyze price series given by very specific stochastic volume of executions. Ct is called the depth of the price
differential equations (similar to Sections 3.1 and 3.2 of our ladder at time t, and intuitively, the algorithm believes that
paper), or empirically analyze these algorithms against his- the price fluctuation |Pt+1 − Pt | shall not exceed Ct . Un-
torical trading data (e.g. [6]). In contrast, we also give profit executed orders are canceled and fresh orders are placed at
guarantees for the weakest of mean reversion processes with- every time step (changes are necessary only if Xt+1 6= Xt or
out assuming a specific form (Theorem 3.1), and in fact de- Yt+1 6= Yt ). Thus the algorithm is determined by the choices
rive an exact expression for arbitrary price series (Theorem of Xt , Yt and Ct for all t, and these choices may be made
2.1), inspired from the notion of worst-case analysis in the- after observing the price movements up to time t.
oretical computer science. We begin by presenting our basic result for a simple mar-
ket making algorithm, that sets Xt = Pt +1 and Yt = Pt −1.
Theorem 2.1. Let P0 , P1 . . . PT be a market price time
price of an equity would change by more than a few dollars
within a few seconds. In that case, one may set Ct = C ∀t.

/)00

*
,-.

()
3. MEAN REVERSION MODELS

%&'
+%&'( 1!!!!!!1

#$
2 3 In this section, we use Theorem 2.1 to relate profitability

!!"
1 to mean reversion.
3

Definition 3.1. A unit-step walk is a series P0 , P1 . . . PT


such that |Pt+1 − Pt | ≤ 1 ∀T > t ≥ 0. A stochastic price se-
ries P0 , P1 . . . PT is called a random walk if it is a unit-step
walk almost surely. We say that a random walk is unbiased
if Pr [Pt+1 − Pt = 1|Pt , Pt−1 . . . P0 ] = 1/2, for all unit-step
walks Pt . . . P0 , for all T > t ≥ 0.
Figure 1: Matched and unmatched trades We say a random walk is mean-reverting towards µ if

Pr [Pt+1 − Pt = 1|Pt = x, Pt−1 . . . P0 ] ≥


PT
series. Let K = t=1 |Pt − Pt−1 |, and let z = PT − P0 .
Pr [Pt+1 − Pt = −1|Pt = x, Pt−1 . . . P0 ]
Suppose that |Pt+1 − Pt | ≤ Dt ∀t, where Dt is known to the
algorithm at time t. If the market making algorithm, that for all x ≤ µ, and
sets Xt = Pt + 1, Yt = Pt − 1 and ladder depth Ct = Dt ,
is run on this price series, then the inventory liquidated at Pr [Pt+1 − Pt = 1|Pt = y, Pt−1 . . . P0 ] ≤
time T is −z, and the profit is (K − z 2 )/2. Pr [Pt+1 − Pt = −1|Pt = x, Pt−1 . . . P0 ]
Proof. Note that at any time step t > 0, at least one or-
der gets executed if the price changes. Moreover, the num- for all y ≥ µ, for all t, Pt−1 , Pt−2 . . . P0 such that P0 , . . . Pt
ber of orders executed at time t ≥ 1 is Pt−1 − Pt (a negative is a unit-step walk, and at least one of these inequalities for
value indicates that shares were sold). The statement holds t < T is strict (i.e., it is not an unbiased random walk).
as long as |Pt−1 − Pt | ≤ Ct−1 , which is true by assumption.
Thus K is equal to the total number of orders that gets exe-
Note that all trading algorithms yield zero expected profit
cuted. Moreover, the size of inventory held by the algorithm
on an unbiased random walk. This is because the profit Ft
at time t is P0 − Pt . We shall construct disjoint pairs of all
of the algorithm, if its inventory were liquidated at time t, is
but |z| of the executed orders, such that each pair of execu-
a martingale, irrespective of the number of shares bought or
tions comprises an executed buy and a sell execution, and
sold at each time step, and so the expected profit is E[FT ] =
the price of the buy order is 1 less than the price of the sell
E[F0 ] = 0.
order, so that each such pair can be viewed as giving a profit
of 1.
For p > P0 , we pair each sell order, priced at p, that Theorem 3.1. For any random walk P0 , P1 . . . PT that is
gets executed when price increases to p or more, with the mean-reverting towards µ = P0 , the expected profit of the
executed buy order, priced at p − 1, that gets executed at market making algorithm that sets Xt = Pt + 1 and Yt =
the earliest time in the future when the price falls back to Pt − 1 (any Ct ≥ 0 suffices) is positive.
p − 1 or less (if the price ever falls to p − 1 again). Note
that these pairs are disjoint, since between every rise of the Proof. Since the price does not change by more than 1
price from p − 1 to p, the price must obviously fall to p − 1. in a time step, the market making algorithm need not set
Similarly, for p < P0 , we pair each executed buy order when a ladder of prices. By Theorem
Pt 2.1, the expected profit is
the price decreases to p or less, with the executed sell order E[(K − z 2 )/2]. Let Kt = i=1 |Pi − Pi−1 |, and let zt =
at the earliest time in the future when the price increases to Pt − P0 . We show by induction on t that E[Kt ] ≥ E[zt2 ] for
p + 1 or more (if it exists). all t. For t = T , this would imply positive expected profit
We claim that only |z| executions remain unmatched (see for our algorithm. Without loss of generality, we assume
Figure 2). If z > 0, then the only executions that remain un- that P0 = µ = 0.
matched are the sell orders executed when the price increases For t = 0, the statement is trivially true, since Kt =
to p and never again falls below p: for each P0 + z ≥ p > P0 , zt = 0. Suppose it is true for some t ≥ 0, then we can
there is one such executed order. During liquidation at time show that it is true for t + 1. Let Ft denote the set of
T , these unmatched sell orders are matched by buying z all unit-step walks such that P0 = µ = 0. For s ∈ Ft ,
shares Pat price PT = P0 + z. The total loss during liquida- let α(s) = Pr [Pt+1 − Pt = 1|Pt , Pt−1 . . . P0 ], and let β(s) =
tion is P 0 +z
p=P0 +1 ((P0 + z) − p) = z(z − 1)/2. Since there are
Pr [Pt+1 − Pt = −1|Pt , Pt−1 . . . P0 ]. Also, let Pr [s] denote
K − z paired executions, the profit obtained from them is the probability that the first t steps of this random walk is
(K − z)/2. Hence the net profit is (K − z − z(z − 1))/2 = s. Then we have
(K − z 2 )/2. A symmetric argument holds for z < 0.
E[Kt+1 ] = E[Kt + |Pt+1 − Pt |]
(1)
X
Note that it is typically reasonable to assume that |Pt+1 − = E[Kt ] + Pr [s] (α(s) + β(s))
Pt | < C for some large enough C, since it is unlikely that the s∈Ft
integer to Qt , for all non-negative integers t. The rounding
2
E[zt+1 ] = 2
E[Pt+1 ] is practical since in reality prices are not allowed to be real-
X valued, and further, our algorithm reacts to only integral
= Pr [s] α(s)(Pt + 1)2 + β(s)(Pt − 1)2 changes in price. We shall analyze our algorithm on Pt .
s∈Ft A significant hindrance in applying Theorem 2.1 to the
+ (1 − α(s) − β(s))Pt2
 OU process is that the jumps |Pt+1 − Pt | are not necessar-
X ily bounded by some constant C, so we have to put some
Pr [s] Pt2 + α(s) + β(s) + 2Pt (α(s) − β(s))

= effort into determining Ct . Since the OU process is memo-
s∈Ft ryless, Equation 2 implies that given Qt , Qt+1 is normally
distributed with expectation µ + (Qt − µ)e−γ and variance
X
= E[Pt2 ] + Pr [s] (α(s) + β(s)) 2√
s∈Ft less than σ 2 /2γ, so if we set C >> σ2γ ln T and then set
X Ct = E[|Qt+1 − Qt | |Qt ] + C, then the probability that the
+2 Pr [s] Pt (α(s) − β(s))
price jump at any time exceeds the depth of the ladder is
s∈Ft
X vanishing, and such events do not contribute significantly
≤ E[Kt ] + Pr [s] (α(s) + β(s)) to the expected profit if we simply stop the algorithm when
s∈Ft such an event occurs.
X
+2 Pr [s] Pt (α(s) − β(s))
Theorem 3.2. Let P0 , P1 . . . PT be a price series obtained
s∈Ft
from an OU process {Qt } with long-term mean µ. Then the
(by induction hypothesis) market making algorithm that sets Xt = Pt + 1, Yt = Pt − 1
2√
and Ct = E[|Qt+1 − Qt | |Qt ] + 10 σ2γ ln T yields long term
X
= E[Kt+1 ] + 2 Pr [s] Pt (α(s) − β(s))
s∈Ft expected profit Ω(σT − σ 2 /2γ − (µ − Q0 )2 ).
(by Equation 1) Proof. It is easy to show, as outlined above, that the
It suffices to show that that Pt (α(s) − β(s)) ≤ 0 for all s ∈ contribution of events where a price jump larger than Ct
Ft . This follows immediately from the definition of a mean- occurs to the expected profit is negligible. We restrict our
reverting random walk: if Pt > P0 = 0, then α(s) < β(s), attention to the event when no such large jump occurs. By
and if Pt < P0 = 0, then α(s) > β(s). Thus we have proved Theorem 2.1, the profit on a sample series is (K − z 2 )/2,
where K = Tt=1 |Pt − Pt−1 |, and z = PT − P0 . The result
P
the induction hypothesis for t + 1.
Finally, for the smallest t such that for some s ∈ Ft we follows by giving a lower bound on E[K] and an upper bound
have α(s) 6= β(s), the inequality in the induction hypothesis on E[z 2 ].
2 Let us derive a lower bound on E[|Qt+1 − Qt |]. Note that
becomes strict at t + 1, i.e. E[Kt+1 ] > E[zt+1 ], and so the
expected profit for T > t is strictly positive. this quantity is equal to E[|Q01 − Q00 | Q00 = Qt ], where Q0t is
an identical but independent OU process. This is because
3.1 Ornstein-Uhlenbeck Processes the OU process is Markov, and future prices depend only
One well-studied mean-reverting process is a continuous on the current price. Since γ < 1, so Equation 2 implies
time, real-valued stochastic process known as the Ornstein- that given Qt , Qt+1 is normally distributed with variance
−2γ
Uhlenbeck (OU) process [7]. We denote this process by Qt . greater than σ 2 /4, since 1−e2γ > 1/4 when γ < 1. Hence
It is usually expressed by the following stochastic differential
E[|Qt+1 − Qt |] is at least σ/4 (using properties of a folded
equation:
normal distribution). Since Pt is obtained by rounding Qt ,
dQt = −γ(Qt − µ)dt + σdWt , we have |Pt+1 − Pt | > |Qt+1 − Qt | − 2. Thus for large
where Wt is a standard Brownian motion, and γ, σ are posi- enough σ (see comments at the end of the theorem), we get
tive constants, and γ < 1. The value µ is a constant around that E[K] = Ω(σT ).
which the price fluctuates — it is called the long term mean E[z 2 ] is approximated well enough by E[(QT −Q0 )2 ], since
of the process. The coefficient of dt is called drift, while that |z − (QT − Q0 )| < 2 for all possible realizations. Again,
of dWt is called volatility. Observe that the drift is negative Equation 2 implies that QT −Q0 has mean µ+(Q0 −µ)e−γT −
for Pt > µ and positive for Pt < µ — this is why the process Q0 = (µ − Q0 )(1 − e−γT ) and variance σ 2 (1 − e−2γT )/2γ.
tends to revert towards µ whenever it is far from it. γ is Thus, we have
the rate of mean reversion. The OU process is memoryless E[(QT − Q0 )2 ] = Var[QT − Q0 ] + E[QT − Q0 ]2
(distribution of Qt given Q0 is the same as distribution of
Qt+x given Qx ), and given an opening value Q0 , the variable σ 2 (1 − e−2γT )
=
Qt is known to be normally distributed, such that 2γ
E[Qt ] = µ + (Q0 − µ)e−γt , + (µ − Q0 )2 (1 − e−γT )2
σ2 (2) σ2
Var[Qt ] = (1 − e−2γt ) < + (µ − Q0 )2
2γ 2γ
Now we consider the OU process Qt as a price series in Thus, E[K] grows linearly with T , while E[z 2 ] is bounded
the unique model, and analyze profitability of our algorithm. by a constant. This completes the proof.
However, since the OU process is a continuous time real-
valued process, we need to define a natural restriction to a A few points worth noting about Theorem 3.2: our lower
discrete integral time series that conforms to our theoreti- bound on E[K] is actually ( σ4 − 2)T and σ must exceed 8 for
cal model. We achieve this by letting Pt to be the nearest this term to be positive and grow linearly with T . This is just
an easy way to handle the arbitrary integral rounding of Qt .
Intuitively, the algorithm typically cannot place orders with 2

prices separated by less than a penny. Thus the volatility E[Qt ] = eαt +βt /2
2 2
needs to be sufficient for integral changes to occur in the Var[Qt ] = (eβt − 1)e2αt +βt
price series. If the unit of money could be made smaller,
the loss due to rounding should diminish. Then σ in terms Suppose the unit of price is small enough so that ln µ >
σ2
of the new unit increases linearly, while γ remains constant 2γ
(again, this is essentially equivalent to choosing a finer
(Qt becomes cQt for some scaling factor c). Thus for any granularity of placing orders). Note that shrinking the size
constant σ, a sufficiently small granularity of prices allows us of a unit step by a factor c leaves both σ and γ unchanged,
to apply Theorem 3.2. In fact, it is not difficult to see from but inflates µ by c. Since αt and βt are upper bounded
the above analysis that the profit will grow linearly with by constants, so are E[Qt ] and Var[Qt ], and hence E[z 2 ] is
time as long as the limiting variance of the process σ 2 /2γ bounded by a constant.
is larger than (or comparable to) the granularity of bidding It remains to show that E[K] = Ω(T ). It suffices to show
(normalized to 1). If this does not hold, then the algorithm that E[|Qt+1 − Qt |] is at least some constant. Note that Qt
will rarely get its orders executed, and will neither profit nor is always positive, since it has a lognormal distribution. We
lose any significant amount. shall show that E[|Qt+1 − Qt | Qt ] is at least some constant,
Moreover, in the proof of Theorem 3.2, one may note that for any positive Qt . Since Qt is a Markov process, this is
z is a normal variable with variance bounded by a constant, equal to E[|Q01 − Q00 | Q00 = Qt ] for an identical but indepen-
while the lower bound on K grows linearly with T , and oc- dent process Q0t . Observe that α1 ≥ (ln µ− σ2γ )(1−e−γ ) > 0,
2

curs with high probability. Thus the profit expression in


Theorem 3.2 not only holds in expectation (as is the case if Q0 > 0. Also, we have β12 > σ 2 /4. Thus
in Theorem 3.1 for general mean-reverting walks), but with Var[Q01 ] > eσ
2
/4
(eσ
2
/4
− 1) > σ 2 eσ
2
/4
/4 .
high probability. Furthermore, for even the smallest of γ,
Theorem 3.2 says that the profit is positive if T is large This shows that Var[Q01 ], given Q0 , is lower bounded by a
enough. Thus, even when mean reversion is weak, a suffi- constant (that depends on σ). Since Q01 has a lognormal dis-
ciently long time horizon can make market making profitable. tribution, it follows that E[|Q01 − Q00 |] is also lower bounded
Finally, the profit expression of the OU process has a term by a constant. This completes the proof for E[K] = Ω(T ).
(µ − Q0 )2 . While we can treat it as a constant independent
of the time horizon, we can also apply another trick to re- 4. TRADING FREQUENCY
duce this constant loss if Q0 is far from µ. This is because
Our price series model makes the assumption that the
Equation 2 tells us that the process converges exponentially
market maker can place fresh orders after every change in
fast towards µ — in time t = γ −1 log |Q0 − µ|, |E[Qt − µ]| is
price. In practice, however, there are many traders, and each
down to 1, and Var[Q0 − µ] is less than σ 2 /γ. Thus if the
trade causes some change in price, and an individual trader
horizon T is large enough, then the market maker would like
cannot react immediately to every change. We thus con-
to simply sit out until time t (if allowed by market regula-
sider a more general model where the market maker places
tions), and then start applying our market making strategy.
fresh orders after every L steps. Let us consider the same
market making algorithm as before, in this infrequent order
3.2 The Schwartz Model model. Thus, for every i, at time iL the algorithm places or-
We now analyze another stochastic mean reversion model ders around PiL in a ladder fashion as before. These orders
that has been studied in the finance literature and was stud- remain unchanged (or get executed if the requisite price is
ied by Schwartz [14]. The OU process assumes that the reached) until time (i + 1)L, and then the algorithm cancels
volatility of the price curve is a constant. Schwartz pro- the unexecuted orders and places fresh orders. We say that
posed a model where the volatility is a linear function of the L is the trading frequency of the algorithm.
price: The profit of the algorithm can no longer be captured suc-
cinctly as before. In particular, the profit is not exclusively
dQt = −γQt (ln Qt − ln µ)dt + σQt dWt ,
determined by (nor can it be lower bounded by a function
where µ is the long term mean price of the process, γ < 1, of) the prices P0 , PL , P2L . . . PiL . . . at which the algorithm
and σ < 1. Also assume that Q0 > 0. refreshes its orders — it depends on the path taken within
We shall show that the profitability of our market making every interval of L steps and not just the net change within
algorithm for the Schwartz model is analogous to Theorem this interval. Still, some of our profit guarantees continue to
3.2: E[K] grows linearly in T , while the expected loss due hold qualitatively in this model. In particular, we simulate
to liquidation E[z 2 ] is bounded by a constant, and hence the the OU process and run our algorithm on this process, to
expected profit grows linearly in T . Applying Ito’s lemma, analyze how trading frequency affects the profit of the algo-
Schwartz showed that log Qt is an OU process, and so Qt rithm. We simulate an OU process with γ = 0.1, σ = 1 and
has a lognormal distribution, such that the initial price equal to the long term mean.
First, we find that the profit still shows a trend of growing
linearly with time, for different trading frequencies L that
σ2 are still significantly smaller than the time horizon T . We
αt = E[log Qt ] = (ln µ − )(1 − e−γt ) + Q0 e−γt ,
2γ simulate the algorithm with different time horizons T and
σ2 different trading frequencies, and all of them show a strong
βt2 = Var[log Qt ] = (1 − e−2γt ) linear growth (see Figure 2).

Also, the profit is expected to fall as the trading frequency
Then, by properties of lognormal distributions, we have increases (keeping time horizon fixed), since the number of
trades executed will clearly decrease. We find that for a
large enough horizon (T = 1000), this is indeed the case, but
400 the decrease in profit is quite slow, and even with trading
frequency as high as 40, the expected profit is more than
80% of the expected profit with unit trading frequency (see
300 Figure 3).
Average Profit

We computed average profit by simulating each setting


10000 times, to get a very narrow confidence interval. In
200
fact, the standard deviation of the profit never exceeds 50
for any of our simulations, so the confidence interval (taken
100 as 2σ divided by the square root of sample size) is less than
1, while the expected profit is much higher in all the cases.
The standard deviation in the profit itself goes up sharply
0 as the trading frequency is increased from 1, but then quickly
200 400 600 800 1000
Time Horizon T stabilizes (see Figure 4).The increase in variance of profit
can perhaps be explained by the increase in variance of the
Figure 2: Profit increases linearly with the time number of shares that are liquidated at the end.
horizon, for different trading frequencies 1, 2, 5, 10, 20.
5. CONCLUSIONS
In this paper, we analyze the profitability of simple mar-
ket making algorithms. Market making algorithms are a
restricted class of trading algorithms, though there is no
formal specification of the restrictions. Intuitively, the re-
350 striction is that a market maker has to always be present
300 in the market, and offer prices that are close to the mar-
ket price. A future direction would be to put such a formal
250 restriction, and try to design an optimal trading algorithm
Mean Profit

200
that satisfies the formal restrictions.

150 Acknowledgments
100 We give warm thanks to Yuriy Nevmyvaka for helpful com-
ments and suggestions.
50

0
0 10 20 30 40
6. REFERENCES
Trading Frequency [1] C. Comerton-Forde, T. Hendershott, C. M. Jones,
P. C. Moulton, and M. S. Seasholes. Time variation in
Figure 3: Mean profit decreases slowly with trading liquidity: The role of market maker inventories and
frequency (Horizon T = 1000). revenues. Journal of Finance, 65:295–331, 2010.
[2] S. Das. A learning market-maker in the
Glosten-Milgrom model. Quantitative Finance,
5(2):169–180, 2005.
[3] S. Das and M. Magdon-Ismail. Adapting to a market
50 shock: Optimal sequential market-making. In NIPS,
pages 361–368, 2008.
Standard Deviation of Profit

40 [4] R. J. Elliott, J. van der Hoek, and W. P. Malcolm.


Pairs trading. Quantitative Finance, 5(3):271–276,
2005.
30
[5] M. B. Garman. Market microstructure. Journal of
Financial Economics, 3(3):257–275, 1976.
20
[6] E. Gatev, W. N. Goetzmann, and K. G. Rouwenhorst.
Pairs trading: Performance of a relative-value
10 arbitrage rule. Review of Financial Studies,
19(3):797–827, 2006.
0 [7] G.E.Uhlenbeck and L.S.Ornstein. On the theory of
0 10 20 30 40
Trading Frequency Brownian motion. Physical Review, 36:823–841, 1930.
[8] L. A. Gil-Alana. Mean reversion in the real exchange
Figure 4: Standard deviation of profit increases rates. Economics Letters, 69(3):285–288, 2000.
quickly with trading frequency, then stabilizes [9] L. Glosten and P. Milgrom. Bid, ask and transaction
(Horizon T = 1000). prices in a specialist market with heterogeneously
informed traders. Journal of Financial Economics,
14:71–100, 1985.
[10] T. Hendershott and M. S. Seasholes. Market maker
inventories and stock prices. American Economic
Review, 97:210–214, 2007.
[11] R. H. Litzenberger and N. Rabinowitz. Backwardation
in oil futures markets: Theory and empirical evidence.
The Journal of Finance, 50(5):1517–1545, 1995.
[12] S. Mudchanatongsuk, J. Primbs, and W. Wong.
Optimal pairs trading: A stochastic control approach.
Proceedings of the American Control Conference,
pages 1035–1039, 2008.
[13] R. Pindyck. The dynamics of commodity spot and
futures markets: A primer. Energy Journal,
22(3):1–29, 2001.
[14] E. S. Schwartz. The stochastic behavior of commodity
prices: Implications for valuation and hedging. The
Journal of Finance, 52(3):923–973, 1997.

You might also like