Professional Documents
Culture Documents
Alvaro's Slides - Lecture 1
Alvaro's Slides - Lecture 1
University of Oxford
Oxford-Man Institute
Álvaro Cartea
alvaro.cartea@maths.ox.ac.uk
1
Notes based on textbook “Algorithmic and High-Frequency Trading” with
Sebastian Jaimungal and Jose Penalva.
1 / 41
Limit Order Book
2 / 41
The Limit Order Book
▶ The limit order book is a record of collective interest to buy or
sell certain quantities of an asset at a certain price.
Buy Orders Sell Orders
Price Volume Price Volume
60.00 80 60.10 75
59.90 100 60.20 75
59.80 90 60.30 50
▶ Graphical representation of the limit order book:
Volume
Price
3 / 41
Market Orders
▶ An incoming market order is filled by limit orders from the
book.
Volume
Price
4 / 41
Market Orders
▶ An incoming market order lifts limit sell orders from the book.
Volume
Price
5 / 41
Market Orders
▶ An incoming market order lifts limit orders from the book.
Volume
Price
6 / 41
LOB
75 80
mp = 60 + 60.1 .
80 + 75 80 + 75
7 / 41
LOB
8 / 41
LOB
A market buy order for 100 shares comes in
9 / 41
LOB (part IV)
A market sell order for 100 shares comes in
10 / 41
Imagine that you are a market maker
▶ Are there any events that make you withdraw from the
market?
11 / 41
Imagine you are a market maker
▶ You can observe the entire LOB, but do not know who you
trade with
You are a large equity fund and must rebalance your portfolio.
What do you fear?
▶ being frontrun or detected by other ‘clever’ algorithms
▶ your order is too large and will move the market against you
▶ etc
13 / 41
Limit Order Book
Trade Activity
MSFT 20110322 : 9:30:0.0 to 9:40:0.0
25.55
25.5
25.45
25.4
25.35
25.3
25.25
25.2
25.15
0 2 4 6 8 10
14 / 41
Limit Order Book
Trade Activity
MSFT 20110322 : 10:0:0.0 to 10:10:0.0
25.5
25.48
25.46
25.44
25.42
25.4
25.38
25.36
25.34
25.32
0 2 4 6 8 10
15 / 41
Limit Order Book
Trade Activity
MSFT 20110322 : 11:0:0.0 to 11:10:0.0
25.45
25.4
25.35
25.3
0 2 4 6 8 10
16 / 41
Limit Order Book
Trade Activity
MSFT 20110322 : 12:0:0.0 to 12:10:0.0
25.5
25.45
25.4
25.35
0 2 4 6 8 10
17 / 41
Limit Order Book
Trade Activity
MSFT 20110322 : 13:0:0.0 to 13:10:0.0
25.42
25.4
25.38
25.36
25.34
25.32
25.3
25.28
25.26
25.24
0 2 4 6 8 10
18 / 41
Limit Order Book
Trade Activity
MSFT 20110322 : 14:0:0.0 to 14:10:0.0
25.42
25.4
25.38
25.36
25.34
25.32
25.3
25.28
25.26
25.24
0 2 4 6 8 10
19 / 41
Limit Order Book
Trade Activity
MSFT 20110322 : 15:0:0.0 to 15:10:0.0
25.42
25.4
25.38
25.36
25.34
25.32
25.3
25.28
25.26
25.24
0 2 4 6 8 10
20 / 41
Limit Order Book
Trade Activity
25.35
25.3
25.25
0 2 4 6 8 10
21 / 41
Order Imbalance
22 / 41
Volume Order Imbalance
Vtb − Vta
It = ∈ [−1, 1]
Vtb + Vta
23 / 41
Order Imbalance: ORIT
24 / 41
Order Imbalance
0.8
0.6
0.4
0.2
0
3.6 3.61 3.62 3.63 3.64 3.65 3.66
7
x 10
25 / 41
Predictive power of volume imbalance
▶ More aggressive market
▶ buys when imbalance is high, It > 1/3
▶ sells when imbalance is low, It < −1/3.
4
x 10
4.5
Market Buys
4 Market Sells
Number of Trades 3.5
3
2.5
2
1.5
1
0.5
0
Sell−Heavy Neutral Buy−Heavy
Imbalance Level
Figure: INTC: one month of NASDAQ trades. Imbalance ranges are
[−1, −0.33), [−0.33, 0.33], and (0.33, 1].
26 / 41
Midprice change 10ms after aggressive buy order
4
x 10
2
Sell-Heavy
Neutral
Buy-Heavy
1.5
0.5
0
−3 −2 −1 0 1 2 3
Midprice Change (ticks)
27 / 41
Midprice change 10ms after aggressive buy order
4
x 10
2
Sell-Heavy
Neutral
Buy-Heavy
1.5
0.5
0
−3 −2 −1 0 1 2 3
Midprice Change (ticks)
28 / 41
Midprice change 10ms after aggressive buy order
▶ Distribution of midprice change 10ms after a market buy
order.
4
x 10
2
Sell-Heavy
Neutral
Buy-Heavy
1.5
0.5
0
−3 −2 −1 0 1 2 3
Midprice Change (ticks)
4
x 10
2
Sell-Heavy
Neutral
Buy-Heavy
1.5
0.5
0
−3 −2 −1 0 1 2 3
Midprice Change (ticks)
30 / 41
Tick Activity
▶ Number of market orders that take place at ticks from
midprice.
4
x 10
7
Beyond first tick
6 Within first tick
0
Buys Sells
31 / 41
Order Imbalance
32 / 41
Order Imbalance
33 / 41
Order Imbalance
34 / 41
Order Imbalance
35 / 41
Order Imbalance
36 / 41
Order Imbalance
37 / 41
Order Imbalance
38 / 41
Order Imbalance
39 / 41
Order Imbalance
40 / 41
Order Imbalance
41 / 41