Market Microstructure
Chapter: 6.3 Market Microstructure Level: 5 — Mastery (cross-domain: probability/math + coding + proof/derivation) Time limit: 90 minutes Total marks: 60
Instructions. Answer all three questions. Show all derivations. Where code is requested, write clean pseudocode or Python. Use notation for mathematics. State every assumption.
Question 1 — Price Impact & Limit Order Book Depth (20 marks)
A limit order book (LOB) for a stock has a discrete price grid with tick size \delta = \0.01k$-th price level above the best ask is
where the best ask is at price a_0 = \100.00ka_k = a_0 + k\deltaQ_0 = 5000\lambda = 0.20$.
A market buy order of size shares "walks the book," consuming levels from upward.
(a) Derive a closed-form expression for the cumulative depth available through level , and hence the minimum number of levels that must be swept to fill an order of shares. (6)
(b) Define the volume-weighted average execution price (VWAP) of the marketable buy order of size as
where is the quantity taken from level (with possibly partial). Derive the price impact as an explicit function, and evaluate it numerically for . (8)
(c) In the continuous-depth limit (, density shares per dollar), show that price impact grows approximately as or a power law of for small , and identify the regime. Comment on what this implies about market depth as a liquidity measure. (6)
Question 2 — Bid–Ask Spread Decomposition & Adverse Selection (22 marks)
Adopt a Glosten–Milgrom-style single-trade model. A market maker (MM) quotes a bid and ask around an unknown true value . With probability the incoming trader is informed (knows ), and with probability is a noise trader who buys or sells with equal probability . The prior distribution of is: (high) or (low), each with prior probability . Let and .
(a) Using Bayes' theorem, show that the competitive (zero-expected-profit) ask price equals the expected value of conditional on a buy order arriving:
Derive explicitly in terms of , , and . (8)
(b) By symmetry derive the bid , and hence show the adverse-selection component of the spread is
Evaluate for , \Delta = \2.00\partial S_{\text{adv}}/\partial \pi > 0$ and interpret. (8)
(c) Real spreads also contain an order-processing component (per share, fixed) and an inventory component. Suppose the MM adds a symmetric processing charge c=\0.02\piA - \mu_{\text{prior}}$. State clearly the estimator and one source of bias. (6)
Question 3 — Iceberg Orders, Latency & a Detection Simulation (18 marks)
A trader posts an iceberg (hidden) order at the best bid: total size shares, displayed peak shares. Each time the displayed peak is fully executed, a new peak of shares is automatically reposted at the same price with a fresh time-priority timestamp; hidden reserve replenishes until exhausted.
(a) A competing latency-arbitrage bot observes each fill at the bid. Model detection: the bot infers a hidden order is present if it observes consecutive immediate re-displays of size exactly at the same price with no price move. If any single "innocent" (non-iceberg) reload occurs with probability per event independently, compute the probability of a false positive for a detection threshold of , and choose the smallest giving false-positive probability below . (6)
(b) The bot sits in a co-location rack with round-trip latency ; a remote competitor has . A new displayed peak lasts on average before being hit. Explain quantitatively which participant can reliably react within the peak's lifetime, and compute the latency advantage margin (as a fraction of ) enjoyed by the co-located bot. (4)
(c) Write a simulation (Python-style pseudocode) that, given the fill stream, (i) reconstructs how many iceberg reloads occurred, (ii) estimates total hidden size , and (iii) outputs the fraction of that was never displayed. Then compute that hidden fraction for the given numbers and comment on the microstructure trade-off between information leakage and execution speed for iceberg orders. (8)
End of paper.
Answer keyMark scheme & solutions
Question 1
(a) Cumulative depth (6)
Geometric series:
Total book depth as : . With : , so shares (>12000, so fillable).
Solve : . (3) (Levels are swept, with partial.)
(b) Price impact / VWAP (8)
Full levels give shares (round: use exact). Cumulative:
- , , .
- Remaining to fill at : shares. (Full , so partial — consistent.) (2)
Cost:
with . ... compute precisely:
- Sum . (2)
.
Closed form: = tick times the volume-weighted average level index. Here weighted level . (2)
(c) Continuous limit & interpretation (6)
Continuous depth density with exponential decay: to fill shares, sweep price up to where
Let . Then , so
For small (i.e. ): expand , giving
so the marginal impact is linear then convex; the average impact to leading order , i.e. linear in for small orders (linear-impact regime), becoming logarithmically divergent as (book near exhaustion). (2)
Interpretation: market depth (or the coefficient ) is the reciprocal of the linear price-impact slope. A deeper book (larger , smaller ) yields smaller impact per share — depth and impact are inversely related; depth is a valid resiliency/liquidity measure only in the small-order linear regime, and breaks down near exhaustion. (2)
Question 2
(a) Competitive ask (8)
A "buy" is a marketable order lifting the ask. Likelihoods:
- If : informed traders (prob ) buy for sure; noise (prob ) buy w.p. .
- If : informed sell (never buy); noise buy w.p. . (3)
Posterior after a buy (equal priors ):
(Denominator .) (2) Zero-profit competitive ask:
(b) Bid, spread, monotonicity (8)
By symmetry , so
Adverse-selection spread:
(The messy form in the paper simplifies to this clean result.) Numeric: \pi=0.30,\Delta=2 \Rightarrow S_{\text{adv}}=0.30\times2=\0.60.\partial S_{\text{adv}}/\partial\pi=\Delta=2>0$: strictly increasing. Interpretation: more informed flow ⇒ MM faces greater adverse selection ⇒ must widen the spread to break even; spread is pure compensation for expected losses to better-informed counterparties. (2)
(c) Full spread + estimator (6)
Observed quotes add symmetric processing charge : , . Half-spread ; full spread =\pi\Delta+2c=0.60+0.04=\0.64.$ (2)
Estimator idea: post-trade midpoint revision after a buy is ; after a sell . So average absolute mid-revision , giving (with estimated from realized value moves or long-run price variance). (3)
def estimate_pi(trades, Delta):
# trades: list of (sign, mid_before, mid_after), sign=+1 buy,-1 sell
revisions = [sign*(mid_after - mid_before)
for (sign, mid_before, mid_after) in trades]
r_hat = mean(revisions) # = pi*Delta/2 in expectation
return 2*r_hat/DeltaOne source of bias: inventory-driven quote skew and order-processing cost contaminate the mid-revision (transitory bounce), so naive overstates the permanent adverse-selection component unless one uses long-horizon (permanent) price impact rather than the immediate next mid. (1)
Question 3
(a) False positive & threshold (6)
Independent innocent reloads, each prob . False positive at threshold = probability of consecutive innocent reloads . (2) For : . Already . (2) Smallest with : . Check ✓; . So smallest . (Given has FP .) (2)
(b) Latency (4)
Peak lifetime .
- Co-located bot: $\ell_{\text{co}}=40