Limit Order Books: Ren e Carmona

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

Limit Order Books

René Carmona

Bendheim Center for Finance


Department of Operations Research & Financial Engineering
Princeton University

Princeton, June 17, 2013


Standard Assumptions in Finance

Black-Scholes theory
I Price given by a single number
I infinite liquidity
I one can buy or sell any quantity at this price
I with NO IMPACT on the asset price
I Fixes to account for liquidity frictions
I Transaction Costs (Constantinides, Davis, Paras, Zariphopoulou,
Shreve, Soner, .......)
I liquidity ∼ transaction cost (Cetin-Jarrow-Protter)
Not satisfactory for
I Large trades (over short periods)
I High Frequency Trading
Need Market Microstructure
I e.g. understand how are buy and sell orders executed?
New Markets
I Quote Driven Markets
I Market Maker or Dealer centralizes buy and sell orders and
provides liquidity by setting bid and ask quotes.
Ex: NYSE specialist system

I Order Driven Markets


I electronic platforms aggregate all available orders in a
Limit Order Book (LOB)
Ex: NYSE, NASDAQ, LSE
I Same stock traded on several venues
I Price discovery made difficult as most instruments can be
traded off market without printing the trade to a publicly
accessible data source
I Competition between markets leads to lower fees and smaller
tick sizes
I Creation of Dark Pools
I Increase in updating frequency of order books
High Frequency Trading

Speculative figures – Sound plausible


I HFT accounts for 60 – 75% of all share volume.
I 10% of that is predatory ≈ 600 million shares per day
I At $0.01-$0.02 per share, predatory HFT is profiting $6-$12
million a day or $1.5-$3 billion e year

Algorithmic Trading – Source of concern


I Moving computing facilities closer to trading platform (latency)
I Relying on / competing with Benchmark Tracking execution
algorithms
Pros & Cons

Pros
I Smaller tick size;
I HF traders provide extra liquidity
I Dark pools reduce trade execution costs from price impact
I Markets are more efficient

Cons
I Expensive technological arms race
I Dark trading incentivizes price manipulation, fishing and
predatory trading
I Little or no oversight possible by humans (e.g. flash crash) &
increased systemic risk
I HF trading algorithms do not use economic fundaments (e.g.
value & profitability of a firm)
Some Highly Publicized Mishaps

Flash Crash of May 6, 2010


I Dow Jones IA plunged about 1000 points (recovered in minutes)
I Biggest one-day point decline (998.5 points)
I At 2:32 pm a mutual fund program started to sell 75,000 E-Mini
S&P 500 contracts (≈ 4.1 billion USD) at an execution rate of 9%
I HT trading programs were among the buyers: quickly bought and
resold contracts to each other
I hot-potato volume effect, combined sales drove ”the E-mini price
down 3% in just 4 minutes

Other Notable Crashes


I Associated Press’ Twitter account hack
I White House bombed
I President Obama injured
I DJIA lost 140 points and recovered in minutes
I Several mini flash crashes on NASDAQ in 2012
Limit Order Book (LOB)

List of all the waiting buy and sell orders

I Prices are multiple of the tick size


I For a given price, orders are arranged in a First-In-First-Out
(FIFO) stack
I At each time t
I The bid price Bt is the price of the highest waiting buy order
I The ask price At is the price of the lowest waiting sell order
I The state of the order book is modified by order book events:
I limit orders
I market orders
I cancelations
I consolidated order book: If the stock is traded in several
venues, one aggregates over all (visible) trading venues.
I Here, little or no discussion of pools
The Role of a LOB
I Crucial in high frequency finance: explains transaction costs.
I Liquidity providers post trading intentions: Bids and Offers.
I Liquidity takers execute certain orders: adverse selection.
5000
4000
3000
Volume

2000
1000
0

499.0 499.5 500.0 500.5 501.0

Price

Figure : Snapshot of Apple order book at 8:43 (NASDAQ)


DELL Limit Order Book on May 18, 2013

DELL NASDAQ Order Book, May 18, 2013


1e+05

Time = 9 hr 30 mn
8e+04
6e+04
Volume

4e+04
2e+04
0e+00

13.8 13.9 14.0 14.1 14.2 14.3

Price
Limit Orders

A limit order sits in the order book until it is


I either executed against a matching market order
I or it is canceled
A limit order
I may be executed very quickly if it corresponds to a price near the
bid and the ask
I may take a long time if
I the market price moves away from the requested price
I the requested price is too far from the bid/ask.
I can be canceled at any time
Typically, a limit order waits for a match
I transaction cost is known
I execution time is uncertain
Market Orders
A market order is an order to buy/sell a certain quantity of the asset
at the best available price in the book.
I Agents can put a market order that, for a buy (resp. sell) order,
I the first share(s) will be traded at the ask (resp. bid) price
I the remaining one(s) will be traded some ticks upper (resp. lower)
in order to fill the order size.
I The ask (resp. bid) price is then modified accordingly.
I When either the bid or ask queue is depleted by
I market orders
I cancelations
the price is updated up or down to the next level of the order
book.
Typically a market order consumes the cheapest limit orders
I immediate execution (if the book is filled enough)
I price per share instead uncertain (depends upon the order size)
Cancellations

I Agents can put a cancellation of x orders in a given queue


reduces the queue size by x
I When either the bid or ask queue is depleted by market orders
and cancelations, the price moves up or down to the next level
of the order book.
LOB Dynamics Summary
I Actual trades come in two forms
I Agents can put a limit order and wait that this order matches
another one
I transaction cost is known
I execution time is uncertain
I Agents can put a market order that consumes the cheapest limit
orders in the book
I immediate execution (if the book is filled enough)
I price per share instead depends on the order size
For a buy (resp. sell) order, the first share will be traded at the
ask (resp. bid) price while the last one will be traded some ticks
upper (resp. lower) in order to fill the order size. The ask (resp.
bid) price is then modified accordingly.
I Agents can put a cancellation of x orders in a given queue
reduces the queue size by x
I When either the bid or ask queue is depleted by market orders
and cancelations, the price moves up or down to the next level of
the order book.
Market Impact of Large Fills
DELL NASDAQ Order Book, May 18, 2013

60000
Time = 15 hr 5 mn
I Current mid-price Mid-Price = 13.98

50000
pmid = (pBid + pAsk )/2 = 13.98

40000
I Fill size N = 76015 (e.g. buy)

Volume

30000
I n1 shares available at best bid
p1 , n2 shares at price p2 > p1 ,

20000
···

10000
I nk shares at price pk > pk −1

0
N = n1 + n2 + n3 + · · · + nk 13.85 13.90 13.95 14.00 14.05 14.10

Price

I colorblueTransaction cost DELL NASDAQ Order Book, May 18, 2013

60000
Time = 15 hr 5 mn
Mid-Price = 13.995

n1 p1 +n2 p2 +· · ·+nk pk = 1064578

50000
40000
I Effective price
Volume

1 30000
peff = (n1 p1 + n2 p2 + · · · + nk pk )
20000

N
= 14.00484
10000
0

I New mid-price pmid = 13.995 13.85 13.90 13.95 14.00 14.05 14.10

Price
A LOB Idiosyncrasy: Hidden Liquidity

I Some exchanges (e.g. NASDAQ & NYSE) allow Hidden Orders


I Made visible to the broader market after being executed
I Controversial
I barrier to the implementation of a fully transparent market
I impediment to price discovery and information dissemination
Results of First Empirical Analyzes
I Encourage fishing
I After it is revealed that a hidden order was executed
I rash increase of order placement inside the bid-ask after
I HF Traders divided in two groups
I Traders try to take advantage of the remaining hidden liquidity
I Traders try to steal execution priority from the fully hidden orders
”Partially Hidden” Orders: Iceberg Orders

I Dark liquidity posted inside the LOB


I Two components: the shown quantity and the hidden
remainder
I Order queued with the lit part of the LOB, only the shown
quantity is visible
I When the order reaches the front of the queue, only the display
quantity is filled
I Trade (price & quantity filled) revealed
I hidden part put at the back of the queue
I Sometimes extra execution fee charged by the exchange
Dark Pools / Crossing Networks

I Electronic engine that matches buy and sell orders without


routing them to lit exchanges
I Raison d’être: move large amounts without impacting the price
(no need for iceberg orders)
I Run by private brokerages
I Ex: Liquidnet, Pipeline, ITG’s Posit, Goldman’s SIGMA X.
I Participants submit (wish) lists of orders to a matching engine
I Matched orders are executed at the midpoint of the bid-ask spread.
I Pros: trade at mid-point can be better than on a lit market
I Cons: May have to wait a long time for a match to occur
I Regulated by SEC (in the US) as Alternative Trading Systems
I Little or no public disclosure
I Not much has been done to increase transparency
I Trading on dark pools ≈ 32% of trades in 2012 (!)
Order Book Modeling Objectives
Offer a framework to investigate order impact on execution prices
I Optimal multi-period liquidation strategies against a limit order book
I Detailed but tractable stochastic model of spread and transaction costs
I Benchmark tracking slippage
I Opportunity costs of delayed trading
Existing Literature (very partial list, only relevant to these lectures)
I Equilibrium models: Parlour (1998), Foucault et al. (2005), Rosu
(2009)
I Empirical studies: Bouchaud et al. (2002), Farmer et al. (2004),
Hollifield et al. (2004)
I Reduced form models
I Stochastic dynamic models: Bouchaud et al. (2008), Smith et al.
(2003), Bovier et al. (2006), Luckock (2003), Maslov and Mills
(2001)
I Queuing theory based models: Cont et al. (2010)
Order Book Models

Roughly speaking, LOB is a set of two histograms (Bids and Asks)


Reduced form model: Markov process (Ot )t on a large state space of
order books O.
I Smith-Farmer-Guillemot-Krishnamurthy (SFGK) Model

I Market orders (buys and sells) arrive according to a Poisson


process with rate µ/2
I Cancellation of existing limit orders: outstanding limit orders
”die” at a rate ν
Another Model Capturing Stylized Facts
Cont-Stoikov-Talreja
I P = {1, 2, · · · , n} price grid in multiples of price tick
I LOB at time t O(t) = (O1 (t), O2 (t), · · · , On (t))
I |Op (t)| is the number of outstanding limit orders at price p
I There are −Op (t) bid orders at price p if Op (t) < 0
I There are Op (t) ask orders at price p if Op (t) > 0
I Admissible
 state space
O= O ∈ Zn ; ∃1 ≤ k ≤ ` ≤ n, Op < 0 for p ≤ k ,

Op = 0 for k < p < `, Op > 0 for ` ≤ p

I Ask price at time t:


PA (t) := (n + 1) ∧ inf{p; 1 ≤ p ≤ n, Op (t) > 0}
I Bid price at time t:
PB (t) := 0 ∨ sup{p; 1 ≤ p ≤ n, Op (t) < 0}
I Mid-price P̃(t) = 12 [PA (t) + PB (t)]
I Bid-Ask spread S̃(t) = PA (t) − PB (t)
A Typical State of the LOB
10
5 Hypothetical LOB
Nb of Shares

0
-5
-10
LOB Dynamics

I For the sake of simplicity, we assume that the changes to the


LOB happen
one share at a time!
I We review the events causing the LOB state transitions
I Convenient Notation O p±1 as a transition from O
(
p±1 Oi if i 6= p
Oi =
Oi ± 1 if i = p
Limit buy order at price level p < PA (t)
10
5 Perturbed LOB
Nb of Shares

0
-5
-10

Increases the quantity at level p: O(t) ,→ O(t)p−1


Limit buy order at price level p < PA (t)
10
5 Perturbed LOB
Nb of Shares

0
-5
-10

Increases the quantity at level p: O(t) ,→ O(t)p−1


Limit sell order at price level p > PB (t)
10
5 Perturbed LOB
Nb of Shares

0
-5
-10

Increases the quantity at level p: O(t) ,→ O(t)p+1


Limit sell order at price level p > PB (t)
10
5 Perturbed LOB
Nb of Shares

0
-5
-10

Increases the quantity at level p: O(t) ,→ O(t)p+1


Market buy order
Decreases the quantity at the ask price: O(t) ,→ O(t)PA (t)−1
Perturbed LOB
10
5
Nb of Shares

0
-5
-10
Followed by another Market buy order
Decreases the quantity at the ask price: O(t) ,→ O(t)PA (t)−1
Perturbed LOB
10
5
Nb of Shares

0
-5
-10

Now the Ask price PA (O) changes


Market sell order
Decreases the quantity at the bid price: O(t) ,→ O(t)PB (t)+1
Perturbed LOB
10
5
Nb of Shares

0
-5
-10
Followed by Another Market sell order
Decreases the quantity at the bid price: O(t) ,→ O(t)PB (t)+1
Perturbed LOB
10
5
Nb of Shares

0
-5
-10
Followed by Still Another Market sell order
Decreases the quantity at the bid price: O(t) ,→ O(t)PB (t)+1
Perturbed LOB
10
5
Nb of Shares

0
-5
-10

Now the Bid price PB (O) changes


Cancellation of an outstanding limit buy order at
price level p < PB (t)
Decreases the quantity at level p: O(t) ,→ O(t)p+1
Perturbed LOB
10
5
Nb of Shares

0
-5
-10
Cancellation of an outstanding limit sell order at
price level p > PA (t)
Perturbed LOB
10
5
Nb of Shares

0
-5
-10
Practical Assumptions

I Limit buy (respectively sell) orders arrive at a distance of i ticks


from the opposite best quote at independent, exponential times
with rate λ(i) = Ki −β for some K > 0 and β > 0
I Market buy (respectively sell) orders arrive at independent,
exponential times with constant rate µ
I Cancellations of limit orders at a distance of i ticks from the
opposite best quote occur at a rate proportional to the number of
outstanding orders: If the number of outstanding orders at that
level is x, then the cancellation rate is θ(i)x.
I The above events are mutually independent.
Summary

Under these assumptions, O = [O(t)]t≥0 is a continuous-time Markov


chain with state space O and transition rates:

I O ,→ O p−1 with rate λ(PA (t) − p) for p < PA (t)


I O ,→ O p−1 with rate θ(p − PB (t))|Op | for p > PB (t)
I O ,→ O p+1 with rate λ(p − PB (t)) for p > PB (t)
I O ,→ O p+1 with rate θ(PA (t) − p)|Op | for p < PA (t)
I O ,→ O PB (t)+1 with rate µ
I O ,→ O PA (t)−1 with rate µ

This chain remains in O if it starts from there, i.e.

PB (t) ≤ PA (t), far all t > 0

if it is true at time t = 0.
Cont-Stoikov-Talreja Model

I Descriptive Analysis
I Use ideas from queuing theory
I first passage times of Birth-and-Death processes
I Laplace transform techniques
I Compute / Estimate Probabilities of Conditional Events
I Not sufficient for optimal execution strategies
Extensions

Incorporate the most important stylised facts of order flow.


I Limit order arrival rates conditional on distance from e.g. best
price on same side [MF05]
I Existing limit orders cancelled and immediately resubmitted
[Tse06]
I Aggressiveness of orders depends on depth [LS05]
I Fewer market orders when the spread is large [BJP03]
I More limit orders inside spread when depth at best is large
[EHJJ03]
I (Long-range) autocorrelation of signs of consecutive market
orders [BGPW03] Patrick Hewlett
Optimization Problems

Goal of a LOB model is to


I Understand the costs of transactions
I Develop efficient (if not optimal) trading procedures
Typical challenge
I Sell x0 units of an asset and maximize the sales revenues, using
a limited number of market orders only
n
X
sup E(U( PB (τi )))
τ1 <···<τn <T i=1

where U is a utility function and E is the expectation over a


model for the dynamics of the LOB Ot
Searching for optimal strategies / market timing rules is a
stochastic control problem in prohibitively high dimension

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy