Home/Financial AI/Part V

Episode 26 · Concept · Part V · Microstructure

Avellaneda–Stoikov: Inventory Risk for Makers

Quote policy (A–S): δ*; inventory-aware, not a chatbot. The most famous equation in modern market microstructure is the Avellaneda-Stoikov optimal market-making formula (Avellaneda & Stoikov, 2008, "High-frequency trading in a limit order book," Quantitative Finance 8(3):217-224). It describes the optimal bid and ask prices for a market maker who wants to maximise expected profit while controlling inventory risk. The model has become foundational not just for HFT market makers but for any trader who wants to understand why spreads widen when volatility spikes, why large positions are riskier than small ones, and how to think about the time decay of an open position.

Related reading This chapter stands on its own, but Ep25 covers a related idea in more depth if you want it.

This chapter develops the model intuitively, derives its key results, and shows how the lessons apply even to taker (aggressive) strategies that never quote a price themselves. A market maker is a liquidity factory. They post two-sided quotes and profit from the spread between bid and ask, every time a trader transacts against them. The dilemma is inventory: every fill leaves them holding stock, and the stock's price could move against them before they can unwind.

Figure 1. Concept map for this episode: fight, desk translation, what to lock.

Episode 26 concept map

The market-maker's problem

A market maker continuously posts bid and ask quotes around some reference price. When a trader hits the bid, the maker buys (accumulating inventory); when a trader lifts the ask, the maker sells (reducing inventory). Each fill earns the half-spread minus any subsequent adverse price move.

The reservation price

The first key result is the reservation price - the price at which the maker would be indifferent to holding the current inventory. It shifts away from the reference price in proportion to how much inventory you hold, how volatile the asset is, how much time remains, and how risk-averse you are. If you are long, the reservation price sits below the reference - you would prefer to sell at a slight discount to reduce inventory. If you are short, the reservation price sits above the reference - you would prefer to buy at a slight premium to cover.

The optimal spread

The second key result is the optimal half-spread to quote around the reservation price. It has two parts: an inventory-cost term (widen the spread when you are carrying more risk) and a trade-off term against how quickly orders tend to arrive (quote tighter when fills are scarce, wider when they're plentiful, to balance spread capture against fill frequency).

Translating to taker strategies

You are not a market maker. So why does the Avellaneda-Stoikov model matter? Because the underlying principles - inventory risk, volatility scaling, time-to-event awareness, adverse selection - apply to every trading strategy that holds positions for non-zero time.

Worked picture

Inventory shift in reservation price

A stock trades at a reference price of ₹100. A maker holds 500 shares long, with a moderate risk-aversion setting and volatility of about ₹2/day, one day remaining. Working through the reservation-price formula, their reservation price comes out to ₹80 - 20 points below mid, so they skew quotes to sell inventory. A taker holding the same 500-share long position through a similarly volatile day should apply the same logic: cut size or widen stops, not because the signal changed but because the inventory risk grows with the square of both volatility and position size.

What breaks in production

Treating AS as a market-maker-only model

The Avellaneda-Stoikov model is often dismissed by retail traders as "HFT math" that does not apply to them. This is a costly misreading. The model's operational consequences - scale down when vol rises, scale down when you already hold concentrated inventory, scale down before known events - are the four central disciplines of professional risk management for any holding-period strategy. Treating AS as inapplicable to your strategy because you do not quote two-sided markets is like treating Bernoulli's law of large numbers as inapplicable because you do not flip coins. The math originates in a specific context; the lessons generalise to every situation where the underlying problem (managing risk in a stochastic environment) is the same.

What to lock

The four AS lessons for takers

1. Size positions in inverse proportion to inventory risk (concentration limits). 2. Cut size when volatility rises (volatility-adaptive sizing). 3. Unwind or reduce before known volatility events (time-to-event awareness). 4. Avoid trading immediately after surprising news (adverse-selection mitigation). These four principles, applied consistently, are worth more than any single signal. They are the defensive operational discipline that protects an edge from being destroyed by execution.

Book pointer · Chapter 26 This essay is the precursor layer: richer explanation for the desk picture. Full derivations and callout stacks live in Financial AI Chapter 26.

Ep26Open on YouTube ↗

Next. Open Ep27: VPIN: Detecting Toxic Order Flow. Previous: Ep25 (Spread, Slippage, and the True Cost of a Trade). Part V index.