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.
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:
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.
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.
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.
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:
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.
6. The Mathematics of Optimal Quoting
Avellaneda–Stoikov (2008): the two formulas that run half the market making bots on Earth — derived gently, then driven with sliders.
8. Brownian Motion vs. Jump-Diffusion: Why Sports Break the Textbook
Avellaneda–Stoikov assumes prices diffuse smoothly. A tennis market doesn't diffuse — it detonates, point by point.