Quant Memo
Advanced

The Avellaneda-Stoikov Model

The canonical high-frequency market-making model, an inventory-averse quoter derives a reservation price that skews with position, then sets optimal bid/ask offsets balancing spread capture against inventory risk, with a closed-form optimal spread.

Prerequisites: Brownian Motion, Expectation, Variance & Moments

Avellaneda and Stoikov (2008) gave market-making its cleanest quantitative recipe. A dealer must continuously post a bid and an ask; quote too wide and you never trade, too tight and you accumulate a dangerous inventory that the price then moves against. Their model solves this as a stochastic-control problem and produces two beautiful objects: a reservation price that shifts with your inventory, and an optimal spread around it. It is the practical face of Bid-Ask Spread Decomposition's inventory component and the starting point for essentially all modern automated market-making.

Setup

The mid-price is driftless Brownian motion (a Brownian Motion):

dSt=σdWt.dS_t = \sigma\, dW_t.

The dealer posts a bid at StδbS_t - \delta^b and an ask at St+δaS_t + \delta^a. Orders arrive as a Poisson process whose intensity falls exponentially the further your quote is from the mid, quote closer and you fill more often:

λ(δ)=Aekδ.\lambda(\delta) = A\, e^{-k\,\delta}.

Filling the bid adds one unit of inventory qq; filling the ask removes one. The dealer holds cash XtX_t and inventory qtq_t, and maximizes expected exponential (CARA) utility of terminal wealth at horizon TT with risk aversion γ\gamma:

max  E[eγ(XT+qTST)].\max\; \mathbb{E}\big[-e^{-\gamma\, (X_T + q_T S_T)}\big].

The inventory term qTSTq_T S_T is what carries the risk: holding a nonzero position at the mercy of σ\sigma is punished by γ\gamma.

The reservation price

Solving the Hamilton–Jacobi–Bellman equation for the value function, the dealer's indifference (reservation) price, the price at which they are indifferent to holding their current inventory, is

r(s,q,t)=sqγσ2(Tt).\boxed{\,r(s, q, t) = s - q\,\gamma\,\sigma^2\,(T - t).\,}

This is the single most important formula in the model. The reservation price is the mid shifted by an inventory penalty qγσ2(Tt)q\gamma\sigma^2(T-t):

  • If the dealer is long (q>0q > 0), r<sr < s: they mark their fair value below the market mid, because they want to sell down the risky inventory. Their quotes drop, making their ask more attractive and their bid less so.
  • If short (q<0q < 0), r>sr > s: they lean up, eager to buy back.
  • The penalty grows with risk aversion γ\gamma, volatility σ2\sigma^2, and time remaining (Tt)(T-t), more risk, or more time exposed to it, means a bigger inventory nudge. As tTt \to T, the penalty vanishes: no time left to be hurt.

This is precisely the inventory-control mechanism of Ho–Stoll, now closed-form: skew your quotes against your inventory.

The optimal spread

Quotes are placed symmetrically around the reservation price (not the mid), with a total spread that trades off capturing more edge per fill against filling less often. The optimal bid–ask spread is

  δa+δb=γσ2(Tt)  +  2γln ⁣(1+γk).  \boxed{\;\delta^a + \delta^b = \gamma\,\sigma^2\,(T - t) \;+\; \frac{2}{\gamma}\ln\!\left(1 + \frac{\gamma}{k}\right).\;}

Two terms with clean readings:

  1. Inventory-risk term γσ2(Tt)\gamma\sigma^2(T-t): wider quotes when the world is riskier (high γ\gamma, high σ\sigma) or when there is more time left to accumulate a bad position. This is the risk premium for making a market.
  2. Order-arrival term 2γln(1+γ/k)\frac{2}{\gamma}\ln(1 + \gamma/k): depends on the liquidity/elasticity kk of order flow. Steeper intensity decay (large kk, fills fall off fast as you widen) argues for tighter quotes; it is the microstructural, spread-capture piece.

The dealer then posts ask=r+12(δa+δb)\text{ask} = r + \tfrac12(\delta^a+\delta^b) and bid=r12(δa+δb)\text{bid} = r - \tfrac12(\delta^a+\delta^b). Because the center rr moves with inventory while the width is roughly symmetric, the net effect is: when long, both quotes shift down (sell-side more aggressive); when flat, quotes straddle the mid.

Worked example

A dealer makes a market with σ=2\sigma = 2 (price units per time\sqrt{\text{time}}), risk aversion γ=0.1\gamma = 0.1, order-flow decay k=1.5k = 1.5, and time remaining Tt=1T - t = 1. Mid S=100S = 100.

  • Flat inventory (q=0q = 0): reservation price r=100r = 100. Spread =γσ2(Tt)+2γln(1+γ/k)=0.141+20.1ln(1+0.0667)=0.4+20×0.0645=0.4+1.29=1.69= \gamma\sigma^2(T-t) + \tfrac{2}{\gamma}\ln(1+\gamma/k) = 0.1\cdot 4\cdot 1 + \tfrac{2}{0.1}\ln(1 + 0.0667) = 0.4 + 20\times 0.0645 = 0.4 + 1.29 = 1.69. So the dealer quotes bid 99.155\approx 99.155, ask 100.845\approx 100.845.
  • Long 5 units (q=5q = 5): the reservation price drops to r=1005(0.1)(4)(1)=1002.0=98.0r = 100 - 5(0.1)(4)(1) = 100 - 2.0 = 98.0. Keeping the same width 1.691.69, the quotes become bid 97.155\approx 97.155, ask 98.845\approx 98.845, the entire quote pair has slid $2 lower, making the dealer far more likely to sell and reduce the unwanted long. That inventory-driven skew, not the spread width, is the model's signature behavior.

Failure modes and caveats

  • No adverse selection. Avellaneda–Stoikov models inventory risk but not informed flow: order arrivals are exogenous Poisson, blind to whether the mid is about to move. Real market-making is dominated by Adverse Selection, you get filled precisely when the price is about to move against you, so the pure model under-widens against toxic flow. Extensions add order-flow signals and asymmetric fill intensities.
  • Driftless mid. Assuming dS=σdWdS = \sigma\,dW with no drift ignores short-term predictability (order-book imbalance, momentum); a dealer with a drift view should skew beyond the inventory term.
  • Constant σ\sigma, AA, kk. Intraday these are highly time-varying; naive calibration to a full day misprices open/close regimes.
  • Terminal-horizon artifact. The (Tt)(T-t) factor and the terminal liquidation assumption are somewhat artificial for a perpetual market maker; the Guéant–Lehalle–Fernandez-Tapia treatment gives a cleaner infinite-horizon / inventory-bounded version with asymptotically constant quotes.
  • Discrete ticks and queue. The continuous quote offsets must be snapped to the tick grid and combined with Order Book Mechanics queue-position logic; the closed form is a guide, not the literal order to send.

In interviews

This is the market-making model to know. Lead with the reservation price r=sqγσ2(Tt)r = s - q\gamma\sigma^2(T-t) and explain its meaning: skew your fair value against your inventory, more so when volatility, risk aversion, or time remaining is larger, this is how a market maker manages inventory risk. Then give the optimal spread γσ2(Tt)+2γln(1+γ/k)\gamma\sigma^2(T-t) + \tfrac{2}{\gamma}\ln(1+\gamma/k) and read its two terms (inventory risk vs. order-flow elasticity). The insight interviewers want spoken aloud: a good market maker does not just quote a spread, they lean, long inventory drops both quotes to attract sellers-to-them and shed risk. The essential caveat to volunteer is that the model omits Adverse Selection, which is the dominant real-world risk and why practitioners bolt on order-flow toxicity signals.

Related concepts

Practice in interviews

Further reading

  • Avellaneda & Stoikov (2008), High-Frequency Trading in a Limit Order Book
  • Ho & Stoll (1981), Optimal Dealer Pricing Under Transactions and Return Uncertainty
  • Guéant, Lehalle & Fernandez-Tapia (2013), Dealing with the Inventory Risk
ShareTwitterLinkedIn