Quant Ladder

Market Microstructure: Where the Spread Comes From

3 min read

Microstructure is the study of how trading actually happens — and it's the theory layer under every "make me a market" interview game. The central question: why does the bid-ask spread exist, and what determines its width?

The limit order book

Modern electronic markets run on a central limit order book: resting limit orders (bids to buy below, offers to sell above) sorted by price, then time. A market order consumes the best resting orders. Two roles emerge:

  • Makers post limit orders — supplying liquidity, earning the spread, risking being run over.
  • Takers cross the spread — paying for immediacy and certainty.

The spread is the price of immediacy. Who sets it, and why isn't it zero?

Three components of the spread

A market maker quoting bid bb and ask aa around fair value must cover three costs; the classical decomposition attributes the spread to:

1. Order-processing costs. Fees, technology, capital — a floor, and in liquid markets the smallest piece.

2. Inventory risk. Every fill leaves a position that the market can move against before it's unwound. Holding inventory of size II over horizon τ\tau costs risk στI\propto \sigma\sqrt{\tau}\,|I|, so quotes widen with volatility and the maker skews quotes to shed inventory: long → lower both bid and ask (eager seller, reluctant buyer). This is the mechanical skill the simulator drills.

3. Adverse selection. The deep one. Some counterparties know something you don't — and they choose when to trade. Your fills are therefore not a random sample of flow: you get lifted disproportionately just before prices rise, hit just before they fall. Even with zero costs and zero risk aversion, trading against informed flow loses money at any spread of zero.

Glosten–Milgrom: the spread as a Bayesian update

The cleanest model: the asset is worth either VHV_H or VLV_L. A fraction π\pi of traders are informed (know the truth); the rest flip a coin. A zero-profit market maker must set the ask equal to the expected value conditional on someone buying:

a=E[Vbuy],b=E[Vsell]a = E[V \mid \text{buy}], \qquad b = E[V \mid \text{sell}]

A buy is evidence the buyer knows the value is high, so E[Vbuy]>E[V]E[V \mid \text{buy}] > E[V] — the ask sits above the unconditional fair value, the bid below, and the spread exists with no costs and no risk aversion whatsoever. The spread is an information gap, and its width scales with:

  • π\pi — the share of informed flow (toxicity),
  • VHVLV_H - V_L — the size of what they might know.

Two famous corollaries: prices become efficient through trading itself — each trade is a Bayesian update, so quotes converge to the truth as order flow accumulates; and a market can fail entirely — if informed share is too high, no spread is wide enough, quotes hit the boundaries and makers withdraw. That is a liquidity crisis, derived in three lines.

Practical consequences worth knowing

  • Trade updating: after a fill, move your fair value in the direction of the trade — the model's Bayesian update, and the correct reflex in interview games. Repeated one-sided flow compounds the update and should also widen you.
  • Toxic vs. benign flow: makers price who they're trading against. Retail flow (uninformed, random) gets tighter spreads — the economics behind payment for order flow. Flow that predicts price moves ("toxic") gets wider quotes or none.
  • Why size moves price: a large order is stronger evidence of information, so price impact grows with size — empirically like size\sqrt{\text{size}} (the square-root impact law).
  • Speed as defense: when public news lands, stale quotes are free options for whoever reacts first. Much of HFT investment is defensive — cancel before being picked off — i.e., adverse selection management in microseconds.

The interview version

The game where the interviewer trades against your market is Glosten–Milgrom with you as the maker. The graded skills map one-to-one: spread ∝ your uncertainty (the VHVLV_H - V_L term), update on every fill (Bayesian), widen on one-sided flow (rising posterior of informed), skew on inventory (component 2). The theory doesn't replace playing the game well — but narrating your quotes in these terms ("I'm widening because this flow looks informed") demonstrates you know why the reflexes are right.