Stochastic Control Formulations Of Market Making
Market making can be posed as a control problem: pick bid and ask quotes every instant to maximize expected profit while penalizing the risk of holding inventory when the price moves against you.
Prerequisites: Order Book Mechanics, Inventory Management for Market Makers
A market maker who just quotes the mid on both sides, tight and symmetric, will accumulate inventory whenever flow is one-sided — and the moment it accumulates, every further tick of adverse price movement multiplies the loss. Widening the quotes reduces fills but doesn't stop the drift. The question a market maker actually needs answered is: given how much inventory I'm holding right now, where should I place my bid and my ask? That is a control problem — a decision that gets remade continuously as the state (inventory, time left, volatility) changes — and stochastic control is the machinery built to answer it.
Think of it like steering a boat with a current. If you're dead center in the channel, you point straight ahead. If you've drifted toward one bank, you angle the rudder to correct, even if it costs you some forward speed. The market maker's "position in the channel" is inventory; the "rudder angle" is how asymmetric the two quotes are.
The classic formulation (Avellaneda–Stoikov) sets up a value function — the maximum expected utility of wealth , holding shares of inventory, with time left before the trading session ends. It solves a Hamilton-Jacobi-Bellman (HJB) equation, which is just the continuous-time version of "the best decision now equals the immediate reward plus the best possible future, discounted for risk." Under exponential utility with risk-aversion parameter , the solution collapses to two clean numbers: a reservation price
where is the mid, the price volatility, and the time remaining. In words: your personal fair value sits below the market mid by an amount proportional to how much inventory you're long, how volatile the asset is, and how much time is left for that inventory to hurt you. A market maker sitting long shades their reservation price down (they want to sell); short, they shade it up. And an optimal spread around that reservation price,
where measures how fast fill probability decays as you quote further from the touch. In words: total spread has two pieces — a risk piece that grows with volatility and time remaining, and a liquidity piece that depends on how competitive the order flow is.
Worked example. Suppose (2% daily vol equivalent, scaled to the trading horizon), , (one full day left), , and mid . The risk-aversion term in the spread is . The liquidity term is . Total optimal spread ≈ 1.29 (dominated by the liquidity term at this vol level). Now suppose the market maker is long shares: the reservation price is — barely shaded here because volatility is low, but the mechanism is the point: quotes get centered below the market mid, and the ask gets pulled in to encourage selling out of the long position.
Second example, larger position. Same parameters but (a much bigger long). Reservation price: . Now the shading is visible: two full cents below mid. With a half-spread of about 0.645 either side of , the bid sits near 99.34 and the ask near 100.62 — both quotes have shifted down relative to a flat symmetric quote at 99.36/100.64, making a sell more likely than a buy at every price level.
What this means in practice
A quoting engine built on this framework doesn't ask "what's the mid" and stop there — it asks "what's the mid, and how much do I already own, and how much time do I have to unwind it." The output is a bid and ask that move continuously as the inventory clock ticks, tightening near the close (less time for inventory to hurt you, less need to shade) and widening early in the session when there's more time for volatility to bite. This is the mathematical form of what a discretionary market maker does by instinct: skew quotes to work off an unwanted position.
The control isn't "what's a good spread" — it's "what's my reservation price given my inventory, time left, and risk aversion," with the spread built symmetrically around that, not around the market mid.
The classic confusion
It's tempting to read and conclude that a market maker should always shade toward flat inventory as hard as possible. But (risk aversion) and (fill-rate sensitivity) are calibrated parameters, not physical constants — set too high and the model prescribes quotes so defensive that fill rates collapse and the desk earns nothing; set it too low and inventory swings become large and volatility risk dominates. The formula gives the shape of the optimal policy, not a number you can plug in without fitting and to the actual market you're trading, which is where most of the real engineering effort goes.
The Avellaneda-Stoikov closed form only holds under specific assumptions — constant volatility, symmetric fill-rate functions, terminal-time inventory penalty — and real desks extend it with running inventory penalties, adverse-selection terms, and numerically solved HJB equations when the assumptions break. See The Avellaneda-Stoikov Model for the full derivation and Skewing Quotes To Manage Inventory for how the reservation-price idea gets implemented on a live desk.
Related concepts
Practice in interviews
Further reading
- Avellaneda & Stoikov (2008), High-frequency Trading in a Limit Order Book
- Guéant, Lehalle & Fernandez-Tapia (2013), Dealing with the Inventory Risk