The Market Making Book

7. Microstructure Signals: Microprice, Queues, and Toxicity

The order book is constantly whispering where the price is about to go. Three signals every quoting engine should listen to.

Part II · Chapter 7

Signal 1 — The microprice (Stoikov, 2018)

The mid-price treats the book as symmetric. It usually isn't. If 900 contracts rest on the bid and 100 on the ask, the next move is more likely up — buyers are queuing, sellers are scarce. Stoikov's microprice formalizes this: it is the martingale (unbiased) estimator of the near-future price given book imbalance and spread, computed from a Markov model of book states. A first-order cousin you can compute instantly is the imbalance-weighted mid:

Weighted mid (microprice's simple cousin) Pw = ( Pask · Qbid + Pbid · Qask ) / ( Qbid + Qask ) What the symbols mean P is a price, Q is a quantity (size). Specifically: Pbid — the best (highest) price buyers are offering  ·  Pask — the best (lowest) price sellers are asking  ·  Qbid — how many contracts are resting at that best bid  ·  Qask — how many are resting at the best ask  ·  Pw — the result: a weighted average of the two prices that leans toward whichever side of the book is thinner.

Note the cross: heavy bid size pulls the estimate toward the ask — each price is weighted by the opposite side's quantity, which is what makes the estimate lean toward the side about to give way. Worked example: bid 48¢ with 900 resting, ask 50¢ with 100 resting → Pw = (50·900 + 48·100)/(900+100) = 49.8¢, almost at the ask, while the plain mid says 49¢. Anchoring your quotes on the microprice instead of the mid means you lean away from the side that's about to get run over — a free reduction in adverse selection.

interactive — book imbalance & the microprice
Mid
Weighted mid
Imbalance
Drag the sizes. The amber marker (weighted mid) slides toward the thin side of the book — the side likely to give way first. Quoting around the amber marker instead of the white one is microprice anchoring.

Signal 2 — Queue position

Under price-time priority, being first at a price level is worth real money: the early order collects the benign, random fills, while the back of the queue gets filled mostly when the level is about to be swept through — i.e., precisely when you don't want to be filled. Practical consequences: cancel-and-replace resets you to the back — and so does any reprice, even through an amend endpoint. What an amend buys you (Kalshi's Amend Order — Chapter 9) is keeping the order's identity, and crucially: shrinking size in place keeps your spot in the queue, while moving price (or growing size) forfeits it everywhere. So treat queue position as an asset you spend, not a free action — the cheapest risk reduction is often cutting size at the same price rather than repricing. On large-tick instruments (where the spread is almost always one tick), queue position is the whole game.

simulation — life inside the queue
Ahead of you
Behind you
Benign fills (front)0
Swept fills (anywhere)0
Last event
One price level under FIFO: gray contracts joined before you, your amber order, dim contracts behind. Random market orders nibble from the front — patient orders migrate forward and eventually collect a benign fill. But occasionally a sweep clears the whole level and runs through the price: everyone fills, front and back alike, on the wrong side of a move. Watch the ratio: the front of the queue earns mostly benign fills; the back earns mostly sweeps. Now press cancel & replace a few times and see what repricing really costs — this is why amend-in-place (Chapter 9) is worth real money.

Signal 3 — Flow toxicity (VPIN)

Easley, López de Prado and O'Hara's VPIN (Volume-Synchronized Probability of Informed Trading) estimates, in near-real-time, how informed the current flow is: chop volume into equal-size buckets, classify each bucket's volume as buyer- or seller-initiated, and track the absolute imbalance. Persistent one-sided pressure ⇒ rising VPIN ⇒ the Glosten–Milgrom μ of Chapter 5 is climbing. VPIN famously spiked in the hour before the 2010 Flash Crash (though its predictive power is academically contested — Andersen and Bondarenko argue it mostly tracks trading intensity). Use it as a regime alarm, not an oracle: when toxicity rises, widen or pull; when it normalizes, re-tighten.

simulation — a VPIN-style toxicity alarm
Toxicity (VPIN-style)
Engine response
Bottom: equal-volume buckets, split green/red by buyer- vs seller-initiated volume — in normal flow they hover near 50/50. Top: the rolling absolute imbalance, the VPIN-style toxicity reading. Press the button: an informed campaign hits one side bucket after bucket, the line climbs through the alarm threshold, and the engine's correct reflex fires — widen or pull, then re-tighten as flow normalizes. Note the alarm's built-in lag: it confirms toxicity, it doesn't predict it. That's why it's a regime alarm, not an oracle.

Fees: the fourth signal that isn't optional

None of these signals matter if the fee math doesn't close. The viability inequality of all market making:

The viability condition E[captured spread] + rebates  >  E[adverse selection loss] + fees + hedging costs What the symbols mean E[·] — expected (average) value over many trades, as in Chapter 3  ·  captured spread — what your round trips actually earn, not the quoted spread  ·  rebates — money some venues pay you for providing liquidity as a maker  ·  adverse selection loss — the average cost of fills that arrive right before the price moves against you  ·  fees, hedging costs — what the venue charges, plus what you pay elsewhere to lay off risk. If the left side doesn't beat the right side on average, no algorithm can save the strategy.

Maker rebates push the left side up; taker fees on your hedges push the right side up. Part III evaluates each venue with exactly this inequality.

Engine checklist so farAnchor on microprice, not mid (Ch. 7) · skew by inventory via reservation price (Ch. 6) · widen on toxicity (Ch. 5, 7) · respect the fee inequality (Ch. 7). That's already a competent market maker. Two ingredients remain: jumps, and venue-specific terrain.

On this page

GitHubGitHub repository