How market makers print money
Citadel Securities. Jane Street. Virtu. Optiver. Hudson River. A handful of electronic market-making firms clear tens of billions of dollars a year by quoting both sides of an order book and capturing the spread millions of times a day. In a Trump-era tape that re-prices on every tariff, every Fed leak, every truth-social post — the spread machine runs hotter. Volatility is their revenue.
This page is 13 interactive sandboxes. Every chart is a live in-browser simulation — drag the sliders, watch the order book breathe, the inventory drift, the P&L distribution narrow once you skew. From the limit order book up through Avellaneda–Stoikov, Glosten–Milgrom, and Kyle's $\lambda$. The math is short. The intuition is built by playing.
The limit order book
Everything starts here. Buyers post bids, sellers post asks; the best bid and best ask sandwich the spread. Orders arrive, get filled, get cancelled. The market maker's job is to sit in the book on both sides and earn the spread without getting run over by directional flow.
The naive market maker
Simplest possible strategy: quote at mid $\pm\,\delta$ and wait. Buy orders hit your ask, sell orders hit your bid. Each round-trip earns you the full spread $2\delta$.
Inventory risk
Now let the mid price diffuse. Your P&L is spread capture plus $q \cdot \Delta s$ where $q$ is your inventory. Inventory and price moves are now what blows you up.
Skew the quotes
Push quotes by $-\gamma\,q$: when long, lower both quotes so you sell faster than you buy. A linear rule already mean-reverts inventory hard.
Spread vs. fill rate
Wider spreads earn more per fill but get fewer fills. Fill intensity decays roughly exponentially in distance from mid: $\lambda(\delta) = A\,e^{-k\delta}$. There's an interior optimum.
Adverse selection
Not all flow is equal. A fraction of trades arrives because the price is about to move against your quote. They look identical to noise on arrival — and they cost you.
Avellaneda–Stoikov
The optimal-control answer to skew + spread, jointly. The maker maximizes expected utility of terminal wealth under inventory risk. Two famous formulas drop out:
$r$ is the reservation price — the mid you actually quote around once inventory bias is in. $\delta^{*}$ is the optimal half-spread.
Queue position
At a price level, fills are FIFO. Your position in the queue matters: orders ahead get filled first, but they also bear the adverse selection first when the level is about to clear.
Latency
A maker's quotes are only as fresh as her connection. While she's updating, the world moves and stale quotes get picked off.
Hedging
If asset $B$ correlates with the inventory you're forced to hold in $A$, hedge with $B$. The variance-minimizing ratio is
Glosten–Milgrom
Sequential trade model. The maker is uncertain about true value $V \in \{V_L, V_H\}$. Each arriving trade is either informed (knows $V$) or uninformed (random). The maker updates beliefs after every fill, and quotes
Kyle's $\lambda$
A single-auction model with one informed trader, noise traders, and a competitive maker. Price impact is linear in net order flow $y$:
Microprice
A free signal on top of the book: weight the best bid and ask by the opposite side's size.
When the bid stack is thick, the next print is more likely at the ask — so the microprice leans up.