Quick glimpse of market microstructure of electronic limit order - - PowerPoint PPT Presentation

quick glimpse of market microstructure of electronic
SMART_READER_LITE
LIVE PREVIEW

Quick glimpse of market microstructure of electronic limit order - - PowerPoint PPT Presentation

Quick glimpse of market microstructure of electronic limit order book markets Costis Maglaras Columbia Business School Oct 2020 C. Maglaras, 10/2020 1 / 81 Specifically... interplay between algorithmic trading & LOBs equities


slide-1
SLIDE 1
  • C. Maglaras, 10/2020

– 1 / 81

Quick glimpse of market microstructure of electronic limit order book markets

Costis Maglaras

Columbia Business School

Oct 2020

slide-2
SLIDE 2
  • C. Maglaras, 10/2020

– 2 / 81

Specifically... interplay between algorithmic trading & LOBs

◮ equities execution ecosystem & algorithmic trading ◮ the financial exchange as a limit order book ◮ prototypical problems in trade execution that involve queueing / LOB dynamics: – order placement . . . , estimation of expected delay to fill order – adverse selection – order routing – optimal execution in LOB and short-term impact costs ◮ descriptive analysis of LOB dynamics (e.g., inter-temporal price dynamics, short-term volatility) ◮ trading signals ◮ market design, regulation & trading implications

slide-3
SLIDE 3
  • C. Maglaras, 10/2020

– 3 / 81

Simplified view of US equities trading

portfolio manager (buy-side) algorithmic trading engine (buy- or sell-side) ? ARCA NASDAQ BATS … Dark Pool #1 … market centers ? market makers / high-frequency traders

slide-4
SLIDE 4
  • C. Maglaras, 10/2020

– 4 / 81

Simplified view of US equities trading - (b)

◮ Electronic ◮ Decentralized/Fragmented NYSE, NASDAQ, ARCA, BATS, Direct Edge, . . . , IEX ◮ Exchanges (∼ 70%) electronic limit order books (LOBs) ◮ Alternative venues (∼ 30%) ECNs, dark pools, internalization, OTC market makers, etc. ◮ Broker dealers: provide information (often not tracked by investors), technology, trading algorithms, market access, liquidity ◮ Market participants increasingly automated – institutional investors: “algorithmic trading” (differ on holding times) – market makers: “high-frequency trading” (∼ 60% ADV) – opportunistic/active & systematic liquidity providers: “aggressive/electronic” – retail: “manual” (∼ 5% ADV; small order sizes)

slide-5
SLIDE 5
  • C. Maglaras, 10/2020

– 5 / 81

Institutional traders (broad strokes)

◮ investment decisions & trade execution are often separate processes ◮ institutional order flow typically has “mandate” to execute ◮ trader selects broker, algorithms, block venue, . . . (algorithm ≈ trading constraints) ◮ main considerations: – “best execution” – access to liquidity (larger orders) – short-term alpha (discretionary investors) – information leakage (large orders the spread over hrs, days, weeks) – commissions (soft dollar agreements) – incentives (portfolio manager & trading desk; buy side & sell side) ◮ execution costs feedback into portfolio selection decisions & fund perf ◮ S&P500: – ADV ≈ <1% MktCap (.1% – 2%) – Depth (displayed, top of book) ≈ .1% ADV – Depth (displayed, top of book) ≈ 10−6 − 10−5 of MktCap ⇒ orders need to be spread out over time

slide-6
SLIDE 6
  • C. Maglaras, 10/2020

– 6 / 81

Market Makers & HFT participants (broad strokes)

◮ supply short-term liquidity; detect flow imbalance and facilitate price discovery; capture bid-ask spread; mostly intraday flow; limited overnight exposure ◮ small order sizes ∼ depth; short trade horizons / holding periods ◮ profit ≈ (captured spread) - (adverse selection) - (TC) – critical to model adverse selection: short term price change conditional on a trade ◮ important to model short term future prices (“alpha”): – microstructure signals (limit order book) – time series modeling of prices (momentum; reversion) – cross-asset signals (statistical arbitrage, ETF against underlying, . . . ) – news (NLP) – detailed microstructure of market mechanisms · · · ◮ risks: adverse price movements; flow toxicity; accumulation of inventory & aggregate market exposure

slide-7
SLIDE 7
  • C. Maglaras, 10/2020

– 7 / 81

Queueing in algorithmic trading and limit order book markets

◮ equities execution ecosystem & algorithmic trading systems ◮ the financial exchange as a limit order book ◮ prototypical problems in LOB that involve queueing considerations: – order placement . . . , estimation of expected delay to fill order – adverse selection – order routing – optimal execution in LOB and short-term impact costs ◮ descriptive analysis of LOB dynamics (e.g., inter-temporal price dynamics, short-term volatility) ◮ trading signals ◮ market design, regulation & trading implications

slide-8
SLIDE 8
  • C. Maglaras, 10/2020

– 8 / 81

Algorithmic Trading Systems: typically decomposed into steps

◮ Forecasts of intraday market variables: volume, spreads, volatility, market depth, . . . ◮ Short-term drift (α) signals: statistical . . . e.g., LOB info to incorporate adverse selection & MM behavior; natural flow imbalance; etc. ◮ Trade scheduling: splits parent order into ∼ 5 min “slices” – relevant time-scale: min-hrs – schedule follows user selected “strategy” (VWAP, POV, IS, . . . ) – reflects investor urgency, “alpha,” risk/return tradeoff – schedule updated during execution to reflect price/liquidity/signals/. . . ◮ Optimal execution of a slice (“micro-trader”): tactically executes slice by further spliting it into child orders – time-scale: sec–min (queue time; short-term LOB dynamics) – optimizes pricing, timing, and management of orders in LOB – execution adapts to short term LOB dynamics, signals, ... ◮ Order routing: decides where to send each child order – relevant time-scale: ∼ .1–100 ms – time/rebate (queueing) tradeoff, liquidity/price, latency, info leakage. . . separation of last two steps mostly technological/historical artifact

slide-9
SLIDE 9
  • C. Maglaras, 10/2020

– 9 / 81

Algorithmic Trading Systems: basic building blocks

◮ forecasts & real-time analytics for intraday trading quantities – volume – volatility – bid-ask spread – market depth – . . . ◮ LOB: – spread dynamics – short-term volatility – signed (buy/sell) volume . . . (not random(?) for short time scales) – effective tick size – cross-asset dependence – short-term impact costs ◮ how we model market participants. . .

slide-10
SLIDE 10
  • C. Maglaras, 10/2020

– 10 / 81

Queueing in algorithmic trading and limit order book markets

◮ equities execution ecosystem & algorithmic trading systems ◮ the financial exchange as a limit order book ◮ prototypical problems in LOB that involve queueing considerations: – order placement . . . , estimation of expected delay to fill order – adverse selection – order routing – optimal execution in LOB and short-term impact costs ◮ descriptive analysis of LOB dynamics (e.g., inter-temporal price dynamics, short-term volatility) ◮ trading signals ◮ market design, regulation & trading implications

slide-11
SLIDE 11
  • C. Maglaras, 10/2020

– 11 / 81

LOB schematic

slide-12
SLIDE 12
  • C. Maglaras, 10/2020

– 12 / 81

The Limit Order Book (LOB)

price ASK BID buy limit order arrivals sell limit order arrivals market sell orders market buy orders cancellations cancellations

slide-13
SLIDE 13
  • C. Maglaras, 10/2020

– 13 / 81

LOB: event driven (short-term) view

price pN λb

N

λs

N

· · · · · · pat +1 λs

at +1

pat λs

at

· · · pbt λb

bt

pbt −1 λb

bt −1

· · · · · · p1 λb

1

buy limit order arrival rates sell limit order arrival rates µs

bt

sell market order rate µb

at

buy market order rate γ cancellation rate γ cancellation rate

slide-14
SLIDE 14
  • C. Maglaras, 10/2020

– 14 / 81

LOB re-drawn as a multi-class queueing network

µs

bt

market sell

  • rders

λb

bt , γ

. . . . . . λb

1, γ

limit buy orders µb

at

market buy

  • rders

. . . λs

at , γ

. . . λs

N, γ

limit sell orders

slide-15
SLIDE 15
  • C. Maglaras, 10/2020

– 15 / 81

Multiple Limit Order Books

exchange 1 exchange 2 . . . exchange N national best bid/ask (NBBO)

Price levels are coupled through protection mechanisms (Reg NMS)

slide-16
SLIDE 16
  • C. Maglaras, 10/2020

– 16 / 81

Execution in LOB: key modeling and trading decisions

◮ real-time measurements and forecasts for event rates (arrivals, trades, cancellations on each side of the LOB) ◮ heterogenous limit order, cancellation & trade flows ◮ time/price queue priority: – estimate queueing delay & P(fill in T time units) – limit order placement . . . depends on queueing effects at each exchange – maintain / estimate queue position (& residual queueing delay) – adverse selection as a fcn of exchange, depth, queue position, . . . – opportunity cost (book moves/jump away) as fcn of depth, time-to-go, – transaction cost models (Processor Sharing in some (very) liquid futures instr.) ◮ microstructure, short-term alpha signals ◮ optimize execution price by tactically controlling – when to post limit orders, and to which exchanges – when to cancel orders – when & how to execute using market orders – typical control problem horizon ∼ queue time-to-fill

slide-17
SLIDE 17
  • C. Maglaras, 10/2020

– 17 / 81

Key points . . .

◮ queueing is an important phenomenon in electronic LOB markets ◮ in the context of electronic trading, queueing delays – introduce risk or market exposure – dictate order routing in fragmented markets – shape MM liquidity provision trading strategies – create incentives for competition among MM and among exchanges – affect magnitude and propagation of market impact costs ◮ from stochastic modeling viewpoint LOBs introduce new/novel stochastic modeling, control and perf analysis questions – coupling – heterogenous flows/participants (a variation on “multi-class”) – should we model rate functions or strategy interaction? ◮ insight on market design & regulation, e.g., – should exchanges charge/pay same fees? lower/higher fees? – time/price versus PS/price – trade/cancel throttles; transaction tax; internalization; . . .

slide-18
SLIDE 18
  • C. Maglaras, 10/2020

– 18 / 81

Event rates (top of book)

100 200 300 400 500 5 10 15 20 25 30 Arrivals Cancellations Trades ADV rank Event rates (# events/sec)

Figure

slide-19
SLIDE 19
  • C. Maglaras, 10/2020

– 19 / 81

Normalized event rates (top of book)

100 200 300 400 500 5 10 15 20 Arrival: λ/µ Cancellations: C/µ ADV rank Normalized event rates

Figure

◮ cancellation volume (at top of book) ≫ trade volume ◮ arrival volume (limit orders at top of book) ≫ traded volume

slide-20
SLIDE 20
  • C. Maglaras, 10/2020

– 20 / 81

Interarrival times (top of book)

100 200 300 400 500 3 6 9 12 15 ADV rank Event inter-arrival times (sec) 100 200 300 400 500 −2.5 −2 −1.5 −1 −0.5 0.5 1 1.5 2 2.5 Arrivals Cancellations Trades ADV rank log (event inter-arrival times (sec))

◮ liquid stocks: # trades, # cancellations, # limit order arrivals are large ◮ # trades ≈ 1 order of magnitude less frequent than cancels or order arrivals

slide-21
SLIDE 21
  • C. Maglaras, 10/2020

– 21 / 81

Heterogeneous event dynamics over 100 microseconds

slide-22
SLIDE 22
  • C. Maglaras, 10/2020

– 22 / 81

Heterogeneous event dynamics over 1 sec

slide-23
SLIDE 23
  • C. Maglaras, 10/2020

– 23 / 81

Variability of order arrival rates

% obs. in ±2σt % obs. in ±3σt % obs. outside ±3σt 1 min 63.33% 79.23% 20.77% 3 min 32.56% 50.39% 49.61% 5 min 27.27% 35.06% 64.94% 10 min 13.16% 31.58% 68.42%

◮ table checks if µt+1 ∈ intervals µt ± kσt for k = 2, 3 ◮ (λ, µ) exhibit significant differences in the time scale of 3 - 5 minutes ◮ cf. top 100 names (by ADV): typical queueing delays = 1 – 100 sec

slide-24
SLIDE 24
  • C. Maglaras, 10/2020

– 24 / 81

Tick period / queueing delay against # trade events

20 40 60 80 100 0.2 0.4 0.6 0.8 1 # trade events per day (1,000’s) Tick period/queueing delay

Figure: Tick period versus queueing delay: ratio against # trade events. (liquid names)

◮ tick period = avg time between changes in the mid-price ◮ tick period is on same (or smaller) order magnitude as queueing delay

slide-25
SLIDE 25
  • C. Maglaras, 10/2020

– 25 / 81

Tick period versus queueing delay: log-log

7 7.5 8 8.5 9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 −3.60 −3.20 −2.80 −2.40 −2.00 −1.60 −1.20 −0.80 −0.40

y = 0.2745x − 3.8102

log (# trade events) log (tick period/queueing delay)

Figure: Tick period versus queueing delay: log-log, slope = 0.27<0.5.

slide-26
SLIDE 26
  • C. Maglaras, 10/2020

– 26 / 81

Tick period versus queueing delay (liquid names): log-log

10 10.5 11 11.5 12 12.5 13 13.5 −3.50 −3.10 −2.70 −2.30 −1.90 −1.50 −1.10 −0.70 −0.30 0.10 0.50

y = 0.1417x − 2.7603

log (# trade events) log (tick period/queueing delay)

Figure: Tick period versus queueing delay: log-log, slope = 0.14<0.5.

slide-27
SLIDE 27
  • C. Maglaras, 10/2020

– 27 / 81

Some observations

◮ Event data: λ ≫ µ and cancellation flow ≫ µ ◮ significant cancellation volume to balance order flow at top of book ◮ price changes on the same time-scale as queueing delays ◮ event rates fluctuate at slightly slower time scale than queueing delays ◮ heterogeneous trading behavior may impact order flow dynamics ◮ fragmentation affects delay estimates and cancellation behavior

slide-28
SLIDE 28
  • C. Maglaras, 10/2020

– 28 / 81

Limit order arrivals

◮ Poisson? ◮ rate fcn’s λ (limit order submissions), µ (trades = service completions) – time-of-day – price level, distance from best bid / best ask, spread – depth, certainly at top of book – effective tick size – rates of other flows; large blocks; . . .

  • ther possible considerations:

– model “strategies” that generate flow, e.g.,

  • POV responds to (filtered) volume
  • HFT participants respond “quickly” to queue depletion events

. . .

structurally estimate state-dependent rate fcn (complex / over fitting? / depends on intended use) ◮ jumps or bursts?

slide-29
SLIDE 29
  • C. Maglaras, 10/2020

– 29 / 81

Trade flows & order sizes

◮ most trades in increments of round lots: 100, 200, . . .

top 500 names (ADV) top 1000 names (ADV) Q1 (# shares) 87 84 Q2 (# shares) 101 101 Q3 (# shares) 151 139

◮ odd lots (mostly < 100 share trades – non-negligible) ◮ roll up prints over δt to account for “simultaneous” trades ◮ think in $ or in shares (or in depth multiples)? ◮ trade sizes are heavy-tailed (lognormal gives reasonable fit) ◮ distinguish trades that happen on exchanges (as opposed to dark pools) µ = µe.d. + µflow and µ = µLOB + µint . . . µLOB = µe.d. + µflow|Q, and µint = µflow| ¯

Q;

µe.d. ∼ 50%µ

slide-30
SLIDE 30
  • C. Maglaras, 10/2020

– 30 / 81

Cancellations

  • 1. disregard cancellations
  • 2. timer-based cancellations:

– each limit order has associated with it a patience ξ – ξ ∼ exp(γ) ⇒ cancellation outflow ≈ −γQ(t)δt – some general patience distributions also tractable (asymptotically) – state-dependent cancellation flow “stabilizes” queues – reasonable model for child orders generated by some trading algorithms

  • 3. constant cancellation outflow ≈ −ηδt

– state independent (not good) – no feedback stabilization, i.e., as Q(t) ↑ cancellation flow constant – but, more tractable

  • 4. event-driven. . . MM behavior

C = Ce.d. + Ct where Ce.d. ∼ 75%C

slide-31
SLIDE 31
  • C. Maglaras, 10/2020

– 31 / 81

Heterogenous trading behaviors

◮ different market participants exhibit significantly different behavior wrt – limit order submission – cancellations – trade sizes & trade submission triggers ◮ should we model flow through one order generating process? (single type model) – e.g., Poisson (λ(t, state vars)), sizes ∼ G, patience ∼ F ◮ or model heterogenous behavior and use a mixture model, e.g., – algo: Poisson (λ(t, state vars)), sizes ∼ Geo(1/s), patience ∼ exp(θ) – MM: event driven arrivals, cancels, trades (fcn of state and signals) – blocks: Poisson(η(t, state vars)), sizes ∼ lognormal

slide-32
SLIDE 32
  • C. Maglaras, 10/2020

– 32 / 81

Queueing in algorithmic trading and limit order book markets

◮ equities execution ecosystem & algorithmic trading systems ◮ the financial exchange as a limit order book ◮ prototypical problems in LOB that involve queueing considerations: – order placement . . . , estimation of expected delay to fill order – adverse selection – order routing – optimal execution in LOB and short-term impact costs ◮ descriptive analysis of LOB dynamics (e.g., inter-temporal price dynamics, short-term volatility) ◮ trading signals ◮ market design, regulation & trading implications

slide-33
SLIDE 33
  • C. Maglaras, 10/2020

– 33 / 81

LOB: event driven (short-term) view

price pN λb

N

λs

N

· · · · · · pat +1 λs

at +1

pat λs

at

· · · pbt λb

bt

pbt −1 λb

bt −1

· · · · · · p1 λb

1

buy limit order arrival rates sell limit order arrival rates µs

bt

sell market order rate µb

at

buy market order rate γ cancellation rate γ cancellation rate

slide-34
SLIDE 34
  • C. Maglaras, 10/2020

– 34 / 81

Stylized optimal execution in a LOB

  • bjective: how to buy C shares within time T at the lowest price

controls: how much, when, at what prices to trade ◮ trade with limit orders / market orders ◮ trade with block trades / continuously submitted trades (rate upper bounded by κi) – T is same order of magnitude as the queueing delays (≈ 1 - 5 min) – microstructure of the LOB affects execution policy and resulting costs – simple motivating problem generates insight on execution strategies . . . and impact cost drivers

slide-35
SLIDE 35
  • C. Maglaras, 10/2020

– 35 / 81

Motivating questions

◮ how long does it take until a limit order gets filled? ◮ risk that a large block or informational event arrives during that time? (adverse selection & opportunity cost) ◮ how do different market participants trade in the LOB? (incentives) ◮ equilibrium behavior of LOB dynamics ◮ tactical execution in a LOB ◮ steady state properties of the market: spread, volatility, depth ◮ how does mkt structure (regulations) affect mkt equilibrium?

slide-36
SLIDE 36
  • C. Maglaras, 10/2020

– 36 / 81

Limit order placement, and queueing delays

◮ estimation of expected delay until a limit order gets filled ◮ related questions: – estimate queue position while in queue – estimate residual delay until an order gets filled while in queue – relevant in deciding when to place limit orders taking into account scheduling objective – routing of orders across exchanges (that may differ in their expected delays) – input to understanding adverse selection

slide-37
SLIDE 37
  • C. Maglaras, 10/2020

– 37 / 81

Two different estimates of delay (liquid, deep queue (λ ≫ µ)) – 1

λ µ γq(t)

◮ Naive estimate (no cancellations, γ = 0): w 0 = q(0) µ

slide-38
SLIDE 38
  • C. Maglaras, 10/2020

– 38 / 81

Two different estimates of delay (liquid, deep queue (λ ≫ µ)) – 2

λ µ γq(t)

◮ Naive estimate (no cancellations, γ = 0): w 0 = q(0) µ ◮ Proportional cancellations: w 1 = 1 γ log

  • 1 + q(0)γ

µ

  • derivation of w 1 uses fluid model of M/M/1 + M:

w 1 = inf{t ≥ 0 : q(t) = 0} ODE: ˙ q(t) = −µ − γq(t) ⇒ q(t) = −µ γ

  • 1 − e−γt

+ q(0)e−γt

slide-39
SLIDE 39
  • C. Maglaras, 10/2020

– 39 / 81

Queue position as fcn of sojourn time s

x(s) = queue position s time units after posting infinitesimal (patient) order ◮ No cancellations: q(s) = q(0) − µs – linear progress through the queue ◮ Proportional cancellations (exp. patience): x(s) = q(0) − λ

s

e−γtdt =

  • q(0) − λ

γ

  • + λ

γ e−γs – non-linear movement thru queue; impatient traders cancel early

slide-40
SLIDE 40
  • C. Maglaras, 10/2020

– 40 / 81

Residual delay as fcn of queue position at time s

x(s) = queue position s time units after posting infinitesimal (patient) order ◮ No cancellations: w 1(x(s)) = x(s) µ , x(0) = q(0) ◮ Proportional cancellations (exp. patience): w 2(x(s)) = 1 γ log

  • 1 + x(s)γ

µ

  • x(0) = q(0)
slide-41
SLIDE 41
  • C. Maglaras, 10/2020

– 41 / 81

Realized delays vs. estimates

◮ dataset: 325,000 algo limit orders, Mar-Apr 2012, ≈500 symbols ◮ fields: date, time (ms), exchange, symbol, buy/sell, parent strategy (e.g., VWAP), outcome, waiting time (till execution or cancellation) ◮ we estimated model parameters using trailing 3 minute statistics (TAQ) ◮ filtered symbols with too few points, to end with 109,000 orders, 268 symbols ◮ uncensored delay observations (the data set was censored due to cancels (65% of orders)

slide-42
SLIDE 42
  • C. Maglaras, 10/2020

– 42 / 81

Realized delays vs. estimates (sample: 325,000 algo orders Mar-Apr 2012)

Figure: Realized limit order delays Du (x axis) compared to delay estimates with proportional

cancelations (blue), or no cancelations (red). Realized delays uncensored (max entropy).

slide-43
SLIDE 43
  • C. Maglaras, 10/2020

– 43 / 81

Treatment of cancellations seems relevant to accuracy of delay estimates ◮ ∼ 80% of orders get cancelled ◮ disregarding cancellations seems too drastic of a simplification ◮ exponential patience / proportional cancellations appear too optimistic

slide-44
SLIDE 44
  • C. Maglaras, 10/2020

– 44 / 81

Alternate model: constant (state-independent) cancellation intensity

˙ q(t) = λ − µ − η, 0 > η ≥ λ − µ ◮ v(s) = µ + (x(s)/q(0))η = speed of moving through queue after s time x(s) = q(0) −

s

v(t)dt = q(0) − µs −

s

(η/q(0))x(t)dt ⇒ ˙ x(s) = −µ − (η/q(0))x(s) It follows that w 2 = inf{t ≥ 0 : x(t) = 0} = · · · = q(0) η log

λ

µ

  • ◮ If queue is stable, then η ≥ λ − µ. Set η = λ − µ.

M/M/1 + M: equilibrium depth q∞ s.t. λ = µ + γq∞ ⇒ η = γq∞. if q(0) = q∞, w 1 = 1 γ log

  • 1 + γq(0)

µ

  • = q(0)

η log

λ

µ

  • = w 2

if q(0) < q∞, then w 2(q(0)) < w 1(q(0)) (and vice versa)

slide-45
SLIDE 45
  • C. Maglaras, 10/2020

– 45 / 81

need more nuanced model to estimate cancellation effect on delay

slide-46
SLIDE 46
  • C. Maglaras, 10/2020

– 46 / 81

Cancelations depend on LOB state

Figure: State-dependent cancelations - more orders cancel from small queues. (grey:

(cancellations in δt intervals) (in shares); red: (cancellations in δt)/Qt ) ◮ exp. patience ⇒ proportional cancellation model ≈ γQtδt ⇒ (cancellations in δt)/Qt ≈ γ (i.e., constant) ◮ data shows normalized cancellation intensity ր as normalized queue size ↓

slide-47
SLIDE 47
  • C. Maglaras, 10/2020

– 47 / 81

Bursty event behavior & cancellation mechanism

Observations: ◮ Event rates increase when queues are small (and likely to get depleted) ◮ Cancellations increase when queues are small

– why? – does it matter in estimating delays and in order placement?

slide-48
SLIDE 48
  • C. Maglaras, 10/2020

– 48 / 81

Limit order FIFO queue with two types of order flow

◮ Type-1 orders (algorithmic flow):

◮ Arrive (join the queue) according to a Poisson process with rate λ ◮ Cancel according to finite deadlines ∼ exp(γ)

◮ Type-2 orders (MM) - event driven:

◮ Join right after any other order joins, with probability F, as long as the queue length q(t) > θ ◮ Cancel all orders immediately whenever q(t) ≤ θ – for simplicity assume that θ is common across all type 2 orders

◮ Market orders arrive according to a Poisson process with rate µ. ◮ Intuition:

– when q(t) is small, a cascade of type-2 order cancelations is likely – when q(t) is large, type-2 orders increase depth and waiting times (“order crowding”)

slide-49
SLIDE 49
  • C. Maglaras, 10/2020

– 49 / 81

Associated fluid model

λ · f 1{q(t)>δ} λ µ γq1(t)

◮ qi(t) = type i orders, i = 1, 2 ◮ q(t) = q1(t) + q2(t) = total queue content ◮ cancellation behavior: – type 1: −γq1(t) ⇐ ξ ∼ exp(γ) – type 2: all q2(t) cancels if q(t) ≤ θ ◮ α(t) = % of µ that trades with type 1

slide-50
SLIDE 50
  • C. Maglaras, 10/2020

– 50 / 81

Contrasting delay estimates against realized delays

Figure: Waiting times with one-type model w1, with no cancelations w0, with two-type model w compared to realized delays Du.

slide-51
SLIDE 51
  • C. Maglaras, 10/2020

– 51 / 81

Rough intuition

◮ need to estimate mixture of patient vs. inpatient orders ◮ incorporate “crowding” out effect of patient orders ◮ resulting delay estimate is not as pessimistic as q/µ (no cancellations) ◮ fragmentation . . . need delay estimates for each exchange ◮ internalization. . . estimate conditional volume that hits exchange (i.e., not internalized) SO WHAT?

slide-52
SLIDE 52
  • C. Maglaras, 10/2020

– 52 / 81

Flow heterogeneity has 1st order effect on LOB behavior

◮ Adverse selection and opportunity costs ◮ Heterogenous trading behavior should affect execution in – order placement – cancellations – market orders ◮ possible explanation for anomalously long waiting times in large queues despite large cancellation rates (some orders never cancel, and in long queues only these orders survive) ◮ significant differences on state-dependent behavior across types of flow – MMs flow sensitive to AS costs, primarily state-dependent policies – algo flow driven by strategy participation considerations, mostly “timer-based” Possible approaches: – work with state- & price-dependent event rates – self-exciting process models – model trading behaviors (game?)

slide-53
SLIDE 53
  • C. Maglaras, 10/2020

– 53 / 81

Recap - 1

◮ modeling strategic cancellations is important ◮ trader behavior is heterogeneous (aka. trading strategies) ◮ important to model network effects . . . state dependent actions depend on other queues, events, exogenous market info, other securities

slide-54
SLIDE 54
  • C. Maglaras, 10/2020

– 54 / 81

Followup question. . .

◮ probability that an order will get filled ◮ conditional probability that this will be an “adverse” fill ◮ estimate adverse selection costs as a fcn of queue position

slide-55
SLIDE 55
  • C. Maglaras, 10/2020

– 55 / 81

Queueing in algorithmic trading and limit order book markets

◮ equities execution ecosystem & algorithmic trading systems ◮ the financial exchange as a limit order book ◮ prototypical problems in LOB that involve queueing considerations: – order placement . . . , estimation of expected delay to fill order – adverse selection – order routing – optimal execution in LOB and short-term impact costs ◮ descriptive analysis of LOB dynamics (e.g., inter-temporal price dynamics, short-term volatility) ◮ trading signals ◮ market design, regulation & trading implications

slide-56
SLIDE 56
  • C. Maglaras, 10/2020

– 56 / 81

Adverse selection

The issue: ◮ for a limit order to get filled, a trader must decide to cross the spread ◮ that action may convey information about the price (that may move adversely) ◮ more likely to get filled by a large trade if at the back of the queue ◮ large trades often indicate future price movements The role of queue position: – front of queue . . . less waiting time, higher probability of a fill, could trade against small counter order – back of queue . . . higher waiting time, smaller probability of a fill, likely to trade against a large (informed) trade . . . higher probability that you may regret trading at that price

slide-57
SLIDE 57
  • C. Maglaras, 10/2020

– 57 / 81

Simple schematic to aid adverse selection discussion

◮ what information should we monitor? ◮ which events should we be concerned about?

slide-58
SLIDE 58
  • C. Maglaras, 10/2020

– 58 / 81

Simplified model of price changes – (1)

  • i. stochastic fluctuations in queue lengths that lead to occasional queue

depletions – when queue is depleted, with probability 1 − α is bounces back up, and – with probability α the price changes (α ≥ .75)

  • ii. flow imbalance “detected” by MM

– MMs maintain noisy estimate of buy/sell imbalance – MMs cancel and/or trade aggressively when imbalance is significant – MMs cancel to avoid AS by filling orders prior to a price change – typically 1-2 ticks and do not require lots of volume to trade

  • iii. block trades (informed investors)

– price change as a result of a block of volume traded may be larger

slide-59
SLIDE 59
  • C. Maglaras, 10/2020

– 59 / 81

Simplified model of price changes – (2)

  • i. stochastic fluctuations in queue lengths that lead to occasional queue

depletions – when queue is depleted, with probability 1 − α is bounces back up, and – with probability α the price changes

◮ unlikely in liquid & deep securities – λ, µ imbalance is O(n), – queues are O(n) but stochastic fluctuations are O(√n) ◮ disregard this effect in the sequel

slide-60
SLIDE 60
  • C. Maglaras, 10/2020

– 60 / 81

Simplified model of price changes – (3)

  • ii. flow imbalance “detected” by MM

– Poisson with rates κ+

1 and κ− 1

– rates could be state dependent (not here; all mkt participants can be tracking)

  • iii. block trades (informed investors)

– Poisson with rates κ+

2 and κ− 2

– rates may be price sensitive (e.g., relative to open price, prev close, . . . ) So: – study superposition of Poisson flows – if we model magnitude of price change, we get compound Poisson’s – could also model size (in # shares) of block trades, get compound Poisson

slide-61
SLIDE 61
  • C. Maglaras, 10/2020

– 61 / 81

Setup for adverse selection calculation

◮ given queue position x, d = E(W (x)) = expected delay until the xth order in queue will get filled ◮ events to keep track (convention: +ve jump pushes price away (no fill)): P(fill) = P(no jumps in [0, d] or 1st jump occurs in [0, d] and is -ve) P(fill & not AS) = P(no jumps in [0, d]) P(fill & AS) = P(1st jump occurs in [0, d] and is -ve) P(no fill) = P(1st jump occurs in [0, d] and is +ve) above calculations depend on queue position x through d = E(W (x))

slide-62
SLIDE 62
  • C. Maglaras, 10/2020

– 62 / 81

Probability of an adverse fill

◮ probability of a fill: P(fill) = κ− κ + κ+ κ e−dκ ◮ probability of an adverse fill (due to a jump): P(fill & AS) = (1 − e−dκ)κ− κ and P(fill & AS|fill) = κ−(1 − e−dκ) κ− + κ+e−dκ ◮ probability of non-adverse fill: P(fill & not AS) = P(no jump in [0, d]) = e−dκ ◮ probability of no fill: P(no fill) = (1 − e−dκ)κ+ κ ◮ above consider a “race” between +ve and -ve jumps over the duration d

slide-63
SLIDE 63
  • C. Maglaras, 10/2020

– 63 / 81

Adverse selection of limit orders

P(fill) = κ− κ + κ+ κ e−dκ and P(no fill) = (1 − e−dκ)κ+ κ P(fill & AS) = (1 − e−dκ)κ− κ and P(fill & not AS) = e−dκ – how do we estimate κi’s? – which of these parameters are “observable” in real-time? – AS often measures price moves within ∆t after fill

slide-64
SLIDE 64
  • C. Maglaras, 10/2020

– 64 / 81

Including trading volume considerations & fragmentation

◮ fragmentation: – queue position: order exchanges by fee (lowest to largest) – cheaper exchanges placed ahead; more expensive placed behind – Qfr = depth in front of order; Qbeh = depth behind order – Qoth is the depth on the other side of the book ◮ consider jump size distribution: – Fill: no jump in [0, d] or (-ve) jump of size ≥ Qfr – AS: (-ve) jump of size ≥ Qfr + Qbeh – No Fill: (+ve) jump of size Qoth ◮ intuitive results: – side of next price move depends on relative sizes of bid and ask queues – duration of race depends on d, a function of our queue position – AS ↓ as Qfr ↓ and as Qbeh ↑ – “ubiquitous” queue imbalance seems to emerge

slide-65
SLIDE 65
  • C. Maglaras, 10/2020

– 65 / 81

Recap - 2

◮ time-in-queue, queue position, other queues affect heterogenous order placement/cancellation behavior ◮ queue position affects adverse selection . . . speed race ◮ fees/rebates at different exchanges affect interplay of econ incentives and trading decisions

slide-66
SLIDE 66
  • C. Maglaras, 10/2020

– 66 / 81

Queueing in algorithmic trading and limit order book markets

◮ equities execution ecosystem & algorithmic trading systems ◮ the financial exchange as a limit order book ◮ prototypical problems in LOB that involve queueing considerations: – order placement . . . , estimation of expected delay to fill order – adverse selection – order routing – optimal execution in LOB and short-term impact costs ◮ descriptive analysis of LOB dynamics (e.g., inter-temporal price dynamics, short-term volatility) ◮ trading signals ◮ market design, regulation & trading implications

slide-67
SLIDE 67
  • C. Maglaras, 10/2020

– 67 / 81

Multiple Limit Order Books

exchange 1 exchange 2 . . . exchange N national best bid/ask (NBBO)

Price levels are coupled through protection mechanisms (Reg NMS)

slide-68
SLIDE 68
  • C. Maglaras, 10/2020

– 68 / 81

Time Scales

Three relevant time scales: ◮ Events: order / trade / cancellation interarrival times (∼ ms – sec) ◮ Delays: waiting times at different exchanges (∼ sec – min) ◮ Rates: time-of-day variation of flow characteristics (∼ min – hrs) Order placement decisions depend on queueing delays in LOBs (our focus) ◮ assume constant arrival rates of limit orders and trades ◮ order sizes are small relative to overall flow over relevant time scale ◮ overall limit order and trade volumes are high We will consider a variation of the problem of execution in a LOB that “incorporates” the fragmented nature of markets

slide-69
SLIDE 69
  • C. Maglaras, 10/2020

– 69 / 81

do exchanges differ in their quote size? trading delays?

slide-70
SLIDE 70
  • C. Maglaras, 10/2020

– 70 / 81

DJIA 30: Expected Queue Lengths – Sept 2011

A A A X P B A B A C C A T C S C O C V X D D D I S G E H D H P Q I B M I N T C J N J J P M K F T K O M C D M M M M R K M S F T P F E P G T T R V U T X V Z W M T X O M 101 102 103 104 105

Queue Length (shares, log scale) ARCA NASDAQ BATS EDGX NYSE EDGA

(b) Average queue length (number of shares at the NBBO) across stocks and exchanges.

slide-71
SLIDE 71
  • C. Maglaras, 10/2020

– 71 / 81

DJIA 30: Expected Delays – Sept 2011

A A A X P B A B A C C A T C S C O C V X D D D I S G E H D H P Q I B M I N T C J N J J P M K F T K O M C D M M M M R K M S F T P F E P G T T R V U T X V Z W M T X O M 10−1 100

Expected Delay (minutes, log scale) ARCA NASDAQ BATS EDGX NYSE EDGA

(a) Average expected delay across stocks and exchanges.

slide-72
SLIDE 72
  • C. Maglaras, 10/2020

– 72 / 81

Simplified view via a One-sided Multi LOB Model

slide-73
SLIDE 73
  • C. Maglaras, 10/2020

– 73 / 81

Simple formulation of order routing in fragmented market – (1)

Fragmented exchanges differ wrt ◮ Expected delay (≈ 1 to 1000 seconds), P(fill in t time) ◮ Rebates/fees for limit/mkt orders (≈ −$0.0002 to $0.0030 per share) ◮ . . . order types, latency, tiering agreements with exchanges, . . . max

Xk

  • k

(s/2 + rk)XkP(τ f

k < {τ −, τ +, T})

(good fill) +

  • k

(s/2 + rk − πas)XkP(τ − < {τ f

k , τ +, T})

(AS fill) +

  • k

(s/2 + fk)XkP(T < {τ f

k , τ −, τ +})

(clean up at far) +

  • k

(s/2 + fk + θ)XkP(τ + < {τ f

k , τ −, T})

(clean up at worse) – τ f

k = time-to-fill passively in exch k

– τ +, τ − time until price moves away or in favor (entire mkt) – Xk = quantity to get posted at exchange K (at top of book) – θ = effective tick size (assume only 1 price level is cleared)

slide-74
SLIDE 74
  • C. Maglaras, 10/2020

– 74 / 81

Order routing in fragmented market . . . comments – (2)

Clear shortcomings: ◮ trading algorithms typically do not post all quantity if C is large ◮ allow to post inside the spread. . . easy to incorporate ◮ revise decision with a) time-to-go, b) changes in mkt state ◮ E(τ f

k ) depends on mkt state; same for κ−, κ+

◮ care needed to estimate time-to-fill as fcn of mkt state (esp. inverted) Also, previous expressions can be cumbersome to work with. . . borrow “standard trick” from discrete choice and model RVs as Gumbel (EV-I) and use MNL-like closed form expressions skipping details. . . produces intuitive allocations; queueing delay key driver; tractable; modest estimation needs; robust

slide-75
SLIDE 75
  • C. Maglaras, 10/2020

– 75 / 81

Time vs. money tradeoff

despite its many caveats, formulation captures time vs. money tradeoff ◮ time: trade now with a market order or sooner in a less congested LOB ◮ money: trade in a high rebate exchange and also avoid paying the spread ◮ adverse selection (also favors less congested LOB) ◮ opportunity cost (also favors less congested LOB) ◮ incentives are such that most institutional flow tries to be patient how does this manifest itself in practice?

slide-76
SLIDE 76
  • C. Maglaras, 10/2020

– 76 / 81

State Space Collapse I – PCA output

% of Variance Explained % of Variance Explained One Factor Two Factors One Factor Two Factors Alcoa 80% 88% JPMorgan 90% 94% American Express 78% 88% Kraft 86% 92% Boeing 81% 87% Coca-Cola 87% 93% Bank of America 85% 93% McDonalds 81% 89% Caterpillar 71% 83% 3M 71% 81% Cisco 88% 93% Merck 83% 91% Chevron 78% 87% Microsoft 87% 95% DuPont 86% 92% Pfizer 83% 89% Disney 87% 91% Procter & Gamble 85% 92% General Electric 87% 94% AT&T 82% 89% Home Depot 89% 94% Travelers 80% 88% Hewlett-Packard 87% 92% United Tech 75% 88% IBM 73% 84% Verizon 85% 91% Intel 89% 93% Wal-Mart 89% 93% Johnson & Johnson 87% 91% Exxon Mobil 86% 92%

Table 4: Results of PCA: how much variance in the data can the first two principle components explain

slide-77
SLIDE 77
  • C. Maglaras, 10/2020

– 77 / 81

do traders care about fees/rebates? does it manifest in depth, delay, AS? what if exchanges changed fee/rebates? Nasdaq ran experiment in 2015

slide-78
SLIDE 78
  • C. Maglaras, 10/2020

– 78 / 81

Nasdaq experiment (Q1-Q2 ‘15): 15 stocks, reduce fee from 30 to 5 mils

Stochastic analysis of LOB market used to study policy / regulatory issues

slide-79
SLIDE 79
  • C. Maglaras, 10/2020

– 79 / 81

Recap - 3

◮ time/money are 1st order drivers of routing decisions ◮ service completions are strategic ◮ technological limitations and latency play important role in this area

slide-80
SLIDE 80
  • C. Maglaras, 10/2020

– 80 / 81

Original outline

◮ equities execution ecosystem & algorithmic trading ◮ the financial exchange as a limit order book ◮ prototypical problems in trade execution that involve queueing: – order placement . . . , estimation of expected delay to fill order – adverse selection – order routing – optimal execution in LOB and short-term impact costs ◮ descriptive analysis of LOB dynamics (e.g., inter-temporal price dynamics, short-term volatility) ◮ trading signals ◮ market design, regulation & trading implications

slide-81
SLIDE 81
  • C. Maglaras, 10/2020

– 81 / 81

THANK YOU