Market Microstructure
Tutorial
R/Finance 2009
Dale W.R. Rosenthal1
Department of Finance and
International Center for Futures and Derivatives University of Illinois at Chicago
UIC
ICFD
Who Am I
Assistant Professor of Finance at UIC
– Teach Investments; Market Microstructure; Commodities. B.S., Electrical Engineering, Cornell U., 1995.
Ph.D., Statistics, U. Chicago, 2008.
Programmer Intern, Listed Equities, Goldman Sachs, 1993–4. Strategist, Equity Derivatives, LTCM, 1995–2000.
Trader/Researcher, Equity Trading Lab, Morgan Stanley, 2000-3. Self-employed Trader/Researcher/Coder, Summer 2004.
What Microstructure Is — and Is Not
Market microstructure studies the details of how markets work. Market microstructure is not “neoclassical” finance2.
often directly opposes Efficient Market Hypothesis. If you believe markets are efficient:
the details of how markets work are irrelevant since. . . you always get efficient price (less universally-known fee). Thus microstructure embraces:
the possibility of short-term alpha; and behavioral effects.
UIC
ICFD
What I Cover in a Microstructure Course
When I teach microstructure, I cover many topics: 1 Market Types
2 Orders and Quotes 3 Trades and Traders 4 Market Structures
5 Roll and Sequential Trade Models ← Play with some 6 Strategic Trader and Inventory Models ← of these today. 7 Prices, Sizes, and Times
8 Liquidity and Transactions Costs 9 Market Metrics Across Time 10 Electronic Markets
Introduction
Today we’ll consider models for microstructure phenomena. For these models, need to adopt a different perspective. Models are simple; lets us conduct controlled experiments.
Eliminate all but one or two major factors.
Question: Does this model reproduce real-life features? If so: factors we are considering probably matter.
We may even have an idea about how those factors matter.
Less confusion about what matters helps build better models. Newest research combining such models with time series.
All models are wrong; some models are useful. — George Box
UIC
ICFD
Asymmetric Information Models
We will examine two asymmetric informationmodels.
Asymmetry: Trades may contain private information.
Sequential trade: independent sequence of traders.
Traders: informed (know asset value) or not; trade once. Single market maker; learns information by trading.
Strategic trader: one informed trader can trade many times.
Informed trader considers own impact on later trades. Uninformed (noise) traders also submit orders. Single MM sees combined order, sets price, fills order.
UIC
ICFD
Glosten and Milgrom (1985) Model
Most famous sequential trade model. MM quotes a bid B and askA.
Security has value V =V or V,V <V. At time t= 0, informed traders (only) learnV. Time is discretized.
Trades are for one unit, occur at each time step.
Glosten-Milgrom Model: Setup
V ∼ ( V w.p.1−δ V w.p. δ Trader type T ∼ ( Informed w.p. µ Uninformed w.p.1−µ.Traders take action S (buy/sell from MM), one at a time. Informed traders: S ∼ ( buy ifV =V sell ifV =V. Uninformed traders: S ∼ ( buy w.p.1/2 sell w.p.1/2.
UIC
ICFD
Glosten-Milgrom Model: Event Trees
buy I;S =? 1jjjj55 j 0 //sell V V =V;T =? µgggg33 g 1−µWWWW++ W buy U;S =? 1/k2kkkk55 k 1/2 //sell V =? 1−δ{{{{== { { { { δCCCC!! C C C C I;S =? 0 // 1SSS)) S S buy V V =V;T =? µggggg33 g 1−µWWWW++ W sell U;S =?1/2 // 1/2TTT)) T T buy t= 0 t = 1,2, . . . sell V = security value (V,V)
T = trader type (Informed/Uninformed)
Glosten-Milgrom Model: Likelihood of Buys and Sells
What is P(buy), P(sell) after one trade?
P(buy) =P(buy|V)P(V) +P(buy|V)P(V) (1) = (1−µ)δ+ (1 +µ)(1−δ)
2 =
1 +µ(1−2δ)
2 (2)
P(sell) =P(sell|V)P(V) +P(sell|V)P(V) (3) = (1 +µ)δ+ (1−µ)(1−δ)
2 =
1−µ(1−2δ)
UIC
ICFD
Glosten-Milgrom Model: Likelihood of
V
,
V
After one trade, we have information via Bayes’ Theorem:
P(V|buy) = P(buy|V)P(V) P(buy) = (1−δ)(1 +µ) 1 +µ(1−2δ) (5) P(V|buy) = P(buy|V)P(V) P(buy) = δ(1−µ) 1 +µ(1−2δ) (6) P(V|sell) = P(sell|V)P(V) P(sell) = (1−δ)(1−µ) 1−µ(1−2δ) (7) P(V|sell) = P(sell|V)P(V) P(sell) = δ(1 +µ) 1−µ(1−2δ) (8)
Glosten-Milgrom Model: Bid, Ask, Spread
If competition narrows profit to 0, before trading. . .
A=E(V|buy) and B=E(V|sell).
A=V P(V|buy) +V P(V|buy) (9) =V δ(1−µ) 1 +µ(1−2δ) +V (1−δ)(1 +µ) 1 +µ(1−2δ) (10) B =V P(V|sell) +V P(V|sell) (11) =V δ(1 +µ) 1−µ(1−2δ) +V (1−δ)(1−µ) 1−µ(1−2δ) (12) A−B = 4(1−δ)δµ(V −V) 1−µ2(1−2δ)2 (13)
UIC
ICFD
Glosten-Milgrom Model: Updating Bids and Asks
After each trade, Bayesian update of beliefs about V. Idea: How often would we see these trades if V =V vs. V? With these ideas, we can update the bid and ask prices. Expected bid and ask afterk buys and `sells:
Ak+`=
=V P(V|k+ 1 buys, `sells) +V P(V|k+ 1 buys, ` sells) (14) = Vδ(1−µ)
k+1(1 +µ)`+V(1−δ)(1 +µ)k+1(1−µ)`
(1−δ)(1 +µ)k+1(1−µ)`+δ(1−µ)k+1(1 +µ)` (15)
Bk+`=
=V P(V|k buys, `+ 1 sells) +V P(V|k buys, `+ 1 sells) (16) = Vδ(1−µ)
k(1 +µ)`+1+V(1−δ)(1−µ)k(1 +µ)`+1
Glosten-Milgrom Model: Simulation Example
One simulation for µ= 0.3,δ = 0.5; example bids and asks. Simple case: V =V = 2 (versusV = 1).
Can see price impact — especially for sequence of orders.
0 10 20 30 40 50 1.4 1.6 1.8 2.0 Price SBSBBBBSBSBSSBBSBSSBBSSBBBBBBBSBSSBBBBSBSBBSBBBSBB
UIC
ICFD
Glosten-Milgrom Model: Simulation Averages
Simulate to find the average bid and ask.
10,000 simulations; tried µ= 0.3,0.5, δ= 0.3,0.5. Simple case: V =V = 2 (versusV = 1).
µ = 0 . 5 0 10 20 30 40 50 1.4 1.6 1.8 2.0 Time Price 0 10 20 30 40 50 1.4 1.6 1.8 2.0 Time Price µ = 0 . 3 0 10 20 30 40 50 1.4 1.6 1.8 2.0 Time Price 0 10 20 30 40 50 1.4 1.6 1.8 2.0 Time Price δ = 0.3 δ = 0.5
Glosten-Milgrom Model: Other Results
Basic idea: Spreads exist due to adverse selection.
Buys/sells are unbalanced; but, price series is a martingale. Orders are serially correlated: buys tend to follow buys.
This and the preceding line seem contradictory.
Difference is akin to Pearsonρversus Kendallτ.
Trades have price impact: a buy increases B andA. Spreads tend to decline over time as MMs figure out V. Bid-ask may be such that market effectively shuts down3 If uninformed were price sensitive, spreads would be wider. Code in THE SECRET DIRECTORY (glosten-milgrom.r). Fun: Add very rare third trader, govt, who always buys atV.
UIC
ICFD
One-Period Kyle (1985) Model
Kyle (1985) proposed a model with a single informed trader. The informed trader:
Considers price impact in setting trade size;
Learns security’s terminal valuev; and,
Submits order for quantityx.
Liquidity (“noise”) traders submit net orderu. The single market maker (MM):
Observes total ordery =x+u;
Makes up the difference; and,
Sets the market clearing pricep.
All trades happen at one price; no bid-ask spread. All trading occurs in one period.
UIC
ICFD
One-Period Kyle Model: Informed Trader vs. MM
The informed trader would like to trade aggressively. Q1: What sort of function maps v to order size? A: Linear function? (Yes.)
MM knows larger net orders are more likely to be informed. Thus MM sets price increasing in net order size.
Q2: What sort of function maps order size to MM’s price? A: Linear function? (Yes.)
One-Period Kyle Model: Setup
Security value v ∼N(p0,Σ0) (18)
Noise order u ∼N(0, σu2) u ⊥⊥v (19)
MM assumes: informed order x =βv+α (20)
Net order y =x+u (21)
Informed assumes: trade price p = λ
|{z} illiquidity
y+µ (22) Informed trader profit π = (v−p)x (23) = (v−λ(x+u)−µ)x (24)
UIC
ICFD
One-Period Kyle Model: Optimize, Compute Statistics
If we combine the previous formulæ, we get a little further:
E(π) =E((v−λ(x+u)−µ)x) | {z } E(u)=0;x non-random = (v−λx−µ)x (25) x∗ = argmax x∈R E(π) = v−µ 2λ ifλ >0 (26) ⇒β = 1 2λ, α= −µ 2λ (27) E(y) =α+βE(v) = −µ 2λ + p0 2λ (28)
Var(y) = Var(x) + Var(u) =β2Var(v) + Var(u) (29)
=β2Σ0+σ2u (30)
One-Period Kyle Model: Find Linear Parameters
Now solve for the linear MM pricing and trader order parameters. MM earns no expected profit4, prices trade atp =E(v|y). Since v,y normal, form ofE(v|y) is like linear regression.
p =E(v|y) =E(v) +Cov(v,y) Var(y) (y−E(y)) (32) =p0+ βΣ0 σ2 u+β2Σ0 (y−α−βp0) (33)
Use (33), (27), and (22) to solve forα, β, µ, λ: α=p0√σu Σ0 ; β = √σu Σ0 ; µ=p0; λ= √ Σ0 2σu . (34)
UIC
ICFD
One-Period Kyle Model: MM Price; Informed Order, Profit
MM trade price p=E(v|y) =λy+µ=
√
Σ0
2σu
·y+p0 (35)
Value uncertainty Var(v|y) = σ
2 uΣ0 σ2 u+β2Σ0 = Σ0 2 (36) Informed order x∗=βv+α= (v−√p0)σu Σ0 (37) Expected profit E(π) = (v−λx−µ)x = (v−p0) 2σ u 2√Σ0 (38)
One-Period Kyle Model: Commentary
What can we learn from the one-period Kyle model? Trade price linear in net order size, security volatility. Trade price inverse to noise order volatility.
Informed order linear in security’s deviation from mean. Expected profit quadratic in security’s deviation from mean.
Large deviations matter much more than small deviations5.
Informed order, expected profit linear in noise order volatility6. Var(v|y) = Σ0
2 ⇒ Half of information7 leaks after one trade.
UIC
ICFD
One-Period Kyle Model: Illiquidity Parameter
Finally: Consider the illiquidity parameter. Illiquidity parameter λ= √ Σ0 2σu. √ Σo/σu is ratio of volatilities.
Value uncertainty vs. noise order uncertainty.
λy =√Σ02yσu: like liquidity risk:
Scaled by volatility of security; and,
y/σu is similar/proportional to percentage of volume.
Nice: Demanding liquidity has a cost. Full course covers more such ideas.
Multi-Period Kyle (1985) Model
Kyle also discussed a multi-period model. Slice time t∈ {0,1}into N bins,n= 1, . . . ,N:
Time: ∆tn= 1/N,tn=n/N. (39) Noise order: ∆un ∼N(0, σ2u∆tn). (40) Informed order: ∆xn=βn(v−pn−1)/N. (41) Price change: ∆pn =λn(∆xn+ ∆un). (42) E(Later profit): E(πn|pt<n) =αn−1(v−pn−1)2+δn−1 (43) Competition⇒pn=E(v|∆x1+ ∆u1, . . . ,∆xn+ ∆un) Informed orders not autocorrelated, by construction.
UIC
ICFD
Multi-Period Kyle Model: Further Definitions
Use the following definitions:
Strategy: X = (x1, . . . ,xN). (44) Pricing rule: P = (p1, . . . ,pN). (45) X chosen to always maximize expected future profit:
E(πn(X,P)|v,p1, . . . ,pn−1)≥
Multi-Period Kyle Model: Dynamics Equations
Model dynamics are given by difference equations forn= 1, . . . ,N: δn−1 =δn+αnλ2nσu2∆tn; (47) αn−1 = 1/(4λn(1−αnλn)); (48) βn∆tn= 1−2αnλn 2λn(1−αnλn) ; (49) λn=βnΣn/σ2u; and, (50) Σn= (1−βnλn∆tn)Σn−1. (51)
λn is the middle root of the cubic equation: (1−λ2nσu2∆tn/Σn)(1−αnλn) =
1
UIC
ICFD
Multi-Period Kyle Model: Solving for Dynamics
Solving for the model dynamics is a bit crusty: 1 Guess ΣN (call the guess Σ∗
N). 2 UseαN =δN = 0 to getλN = √ Σ∗ N σu √ 2∆tN. 3 Set n=N.
4 Solve forβn and Σ∗
n−1.
5 Find αn−1 for λn.
6 Solve (52)8, using middle root for λn−1. 7 n =n−1; ifn>0, go to step 4. 8 If|Σ∗
0−Σ0|> : try another Σ∗N, go to step 1.
9 Solve forβ0
Multi-Period Kyle Model: Simulation
We can simulate the Kyle model to see its behavior. Usep0 = 2, Σ0 = 0.4, andσu = 0.5.
Run one simulation. What do we get? The parameter evolution is not so surprising. The action evolution is more illuminating.
UIC
ICFD
Multi-Period Kyle Model: Evolution of Parameters I
0 10 20 30 40 50 0.00 0.04 0.08 0.12 Time delta 0 10 20 30 40 50 0.0 0.1 0.2 0.3 0.4 Time alpha 0 10 20 30 40 50 0 5 10 15 20 25 Time beta
Multi-Period Kyle Model: Evolution of Parameters II
9 0 10 20 30 40 50 1.05 1.10 1.15 1.20 Time lambda 0 10 20 30 40 50 0.0 0.1 0.2 0.3 0.4 Time SigmaUIC
ICFD
Multi-Period Kyle Model: Evolution of Actions
u u u u u u u u u uu u u uu u u u u u u u u u u u u u u u u u u u u u uu u uu u u u u u u u u u 0 10 20 30 40 50 -0.010 0.000 0.010 Time Orders i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i ii i i i i i i i ii i i 0 10 20 30 40 50 2.0 2.1 2.2 2.3 2.4 Time Trade Prices True Price
Multi-Period Kyle Model: Commentary
A few details nobody has previously noted10:
Informed orders11 are larger after negative uninformed trades. Informed orders decrease after larger net orders, price moves.
Recall: one leads to the other; confounding lives here.
Informed order size increases slightly with time. Trade price moves toward the true value.
Trade price may not converge to true value by end of trading. Code in THE SECRET DIRECTORY (kyle.r).
UIC
ICFD
If You Want More: to Read
Journals (and associated societies):
Journal of Financial Markets
Journal of Business and Economic Statistics/ASA Journal of Financial Econometrics/SoFiE
Journal of Financial Economics
Journal of Financial and Quantitative Analysis Review of Financial Studies/SFS
Books:
O’Hara,Market Microstructure Theory
Harris,Trading and Exchanges
Hasbrouck,Empirical Market Microstructure
Weisberg,Applied Regression Analysis
Montgomery,Design and Analysis of Experiments
McCullagh and Nelder,Generalized Linear Models
Box, Jenkins, Reinsel,Time Series Analysis
If You Want More: to Interact With
Seminars (times may change next year)
UIC Northwestern U. Chicago
Finance MSCS Finance IEMS Stat E&S Stat FinMath
Fri Wed Wed Tue Wed Thu Mon Fri
10:30 4:15 11:00 4:00 11:00 1:20 4:00 4:30
Center Events: UIC ICFD, NWU Zell, UofC Stevanovich Conferences: ASSA, SoFiE, Oxford-Man Institute
UIC
ICFD
If You Want: to Support Work Like This
Talk to academics at the conference; some glad to consult. Take courses through UIC External Ed:
Market Microstructure and Electronic Trading Commodities, Energy, and Related Markets Fixed Income/Structured Products
Empirical Methods for Finance
Univariate and Mutivariate Time Series Analysis