Micro Structure Tutorial
Micro Structure Tutorial
24 April 2009
UIC ICFD
[email protected]
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
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, 19934. Strategist, Equity Derivatives, LTCM, 19952000. Trader/Researcher, Equity Trading Lab, Morgan Stanley, 2000-3. Self-employed Trader/Researcher/Coder, Summer 2004.
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
UIC ICFD
So you short one stock... omits a lot.
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Market Types Orders and Quotes Trades and Traders Market Structures Roll and Sequential Trade Models Prices, Sizes, and Times Liquidity and Transactions Costs Market Metrics Across Time Electronic Markets Electronic Trading Tools and Strategies
Dale W.R. Rosenthal
UIC ICFD
Introduction
Today well consider models for microstructure phenomena. For these models, need to adopt a dierent 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
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Some slides are for you to study later; Ill skip those.
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Most famous sequential trade model. MM quotes a bid B and ask A. Security has value V = V or V , V < V . At time t = 0, informed traders (only) learn V . Time is discretized. Trades are for one unit, occur at each time step. MM has innite capital: no inventory/bankruptcy concerns.
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
V V
Trader type T
Traders take action S (buy/sell from MM), one at a time. Informed traders: S if V = V . if V = V
Uninformed traders: S
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
{{ {{ V =? CC CC CC C! C
1 { { {
{= V
t=0
t = 1, 2, . . .
1/2
sell
UIC ICFD
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 + (1 2) = = 2 2 P(sell) = P(sell|V )P(V ) + P(sell|V )P(V ) (1 + ) + (1 )(1 ) 1 (1 2) = = 2 2 (1) (2) (3) (4)
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
After one trade, we have information via Bayes Theorem: P(buy|V )P(V ) (1 )(1 + ) = P(buy) 1 + (1 2) P(buy|V )P(V ) (1 ) P(V |buy) = = P(buy) 1 + (1 2) P(V |buy) = P(sell|V )P(V ) (1 )(1 ) = P(sell) 1 (1 2) P(sell|V )P(V ) (1 + ) P(V |sell) = = P(sell) 1 (1 2) P(V |sell) = (5) (6) (7) (8)
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
If competition narrows prot to 0, before trading. . . A = E (V |buy) and B = E (V |sell). A = V P(V |buy) + V P(V |buy) (1 ) (1 )(1 + ) =V +V 1 + (1 2) 1 + (1 2) B = V P(V |sell) + V P(V |sell) (1 + ) (1 )(1 ) +V =V 1 (1 2) 1 (1 2) AB = 4(1 )(V V ) 1 2 (1 2)2 (9) (10) (11) (12) (13)
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
sells:
(14) (15)
)k+1 (1
)k+1 (1
(16) (17)
UIC ICFD
SBSBBBBSBSBSSBBSBSSBBSSBBBBBBBSBSSBBBBSBSBBSBBBSBB
1.4 0
10
20 Time
30
40
50
UIC ICFD
= 0.5
Price
1.4
1.6
1.8
10
20 Time
30
40
50
= 0.3
1.8
Price
Price
1.6
1.4
1.4 0
1.6
1.8
10
20 Time
30
40
50
10
20 Time
30
40
50
= 0.3
Dale W.R. Rosenthal
= 0.5
UIC ICFD
Trades have price impact: a buy increases B and A. Spreads tend to decline over time as MMs gure out V . Bid-ask may be such that market eectively 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 at V .
Stunning: still converging after 50,000 trades.
3
UIC ICFD
We nd ourselves in the game-theoretic Paradox of Trade.
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Kyle (1985) proposed a model with a single informed trader. The informed trader:
Considers price impact in setting trade size; Learns securitys terminal value v ; and, Submits order for quantity x.
Liquidity (noise) traders submit net order u. The single market maker (MM):
Observes total order y = x + u; Makes up the dierence; and, Sets the market clearing price p.
All trades happen at one price; no bid-ask spread. All trading occurs in one period.
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
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 MMs price? A: Linear function? (Yes.)
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Security value Noise order MM assumes: informed order Net order Informed assumes: trade price Informed trader prot
v N(p0 , 0 ) u
2 N(0, u )
x = v + y =x +u p=
illiquidity
y +
= (v p)x = (v (x + u) )x
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
(25)
Cov(y , v ) = Cov( + v , v ) = 0
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
UIC ICFD
Due to competition, again.
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
5 6
Except data errors and adverse selection will hurt you. Use uninformed orders to hide. 7 Information in a Fisher sense.
Dale W.R. Rosenthal
UIC ICFD
y =
Nice: Demanding liquidity has a cost. Full course covers more such ideas.
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Kyle also discussed a multi-period model. Slice time t {0, 1} into N bins, n = 1, . . . , N: Time: Noise order: Informed order: Price change: E(Later prot): tn = 1/N, tn = n/N. un
2 N(0, u tn ).
(43)
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Use the following denitions: Strategy: X = (x1 , . . . , xN ). Pricing rule: P = (p1 , . . . , pN ). (44) (45)
X chosen to always maximize expected future prot: E (n (X , P)|v , p1 , . . . , pn1 ) E (n (X , P )|v , p1 , . . . , pn1 ) n = 1, . . . , N. (46)
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
n1 = 1/(4n (1 n n )); 1 2n n ; n tn = 2n (1 n n )
2 n = n n /u ;
and,
(52)
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
Guess N (call the guess ). N Use N = N = 0 to get N = Set n = N. Solve for n and . n1 Find n1 for n .
2 3 4 5 6 7 8 9
N . 2tN
Solve (52)8 , using middle root for n1 . n = n 1; if n > 0, go to step 4. If | 0 | > : try another , go to step 1. 0 N Solve for 0
UIC ICFD
Numerically or via Cardanos formula.
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
We can simulate the Kyle model to see its behavior. Use p0 = 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
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
10
20 Time
30
40
50
alpha
0.0 0
0.1
0.2
0.3
0.4
10
20 Time
30
40
50
beta
10
15
20
25
10
20 Time
30
40
50
UIC ICFD
lambda
1.05 0
1.10
1.15
1.20
10
20 Time
30
40
50
Sigma
0.0 0
0.1
0.2
0.3
0.4
10
20 Time
30
40
50
UIC ICFD
E.B.
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
10
20 Time
30
40
50
UIC ICFD
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).
10 As with the Glosten-Milgrom model, I have yet to see plots from anybody else who has simulated the Kyle model. 11 Informed trades are shown as is; uninformed trades as us. Dale W.R. Rosenthal
UIC ICFD
Books:
OHara, 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 Osborne and Rubinstein, A Course in Game Theory
Dale W.R. Rosenthal
UIC ICFD
Center Events: UIC ICFD, NWU Zell, UofC Stevanovich Conferences: ASSA, SoFiE, Oxford-Man Institute
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009
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
UIC ICFD
Dale W.R. Rosenthal Market Microstructure Tutorial R/Finance 2009