Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Avellaneda–Stoikov Market-Making Algorithms Turn Inventory Risk into Quotes: Reservation Prices, Optimal Spreads, Poisson Fill Intensities, Risk Aversion and Model Failure

Reader question: A market maker earns spread by quoting bid and ask prices, but every fill changes inventory. How can a mathematical control model move the quotes so that expected spread capture is balanced against the risk of carrying an unwanted position?

The Avellaneda–Stoikov framework converts inventory risk into two objects: a reservation price that shifts the centre of the quotes away from the market mid, and a spread that balances execution probability against risk and spread revenue.

This article owns one precise computational job: the Avellaneda–Stoikov stochastic-control mechanism that maps inventory, volatility, time, risk aversion and fill-intensity assumptions into bid/ask quotes. It does not own market making in general, adverse-selection modelling, exchange queue priority, transaction-cost accounting or execution venue mechanics.

The broader canonical owner remains How Bank Market-Making Algorithms Manage Inventory. This page is deliberately narrower: it teaches one influential stochastic-control model and where that model breaks.

This is public mathematical and computational education. It is not a trading strategy recommendation, personalised financial advice or a claim that the model’s optimal quotes are optimal in a real exchange order book.

1. The simplified market-making world

Let the market mid-price be St.

In the canonical model:

dSt = σ dWt.

The mid-price is a driftless Brownian motion with volatility σ.

The market maker posts:

bid ptb = St − δtb

and:

ask pta = St + δta.

Orders that hit these quotes arrive randomly. In the standard exponential-intensity specification:

λb(δ) = A e−kδ,

λa(δ) = A e−kδ.

Closer quotes have larger arrival intensity; wider quotes trade less often.

2. Inventory and cash jump when fills arrive

Let qt be inventory and Xt cash.

A bid fill means the dealer buys one unit:

q → q + 1

and cash falls by the bid price.

An ask fill means the dealer sells one unit:

q → q − 1

and cash rises by the ask price.

The dealer’s terminal marked wealth is:

XT + qTST.

The key conflict is immediate: trading earns spread, but fills create inventory whose mark-to-market value moves randomly with S.

3. Exponential utility turns inventory into a control penalty

Avellaneda and Stoikov use constant-absolute-risk-aversion utility:

U(w) = −e−γw,

where γ > 0 is risk aversion.

The dealer chooses bid and ask quote distances to maximise:

E[−exp(−γ(XT + qTST))].

This objective rewards cash/spread gains while penalising distributions of terminal wealth with more risk.

Exponential utility is mathematically convenient because cash can be separated from the remaining state variables inside the Hamilton–Jacobi–Bellman (HJB) equation.

4. The HJB view

Let:

u(t,x,q,s)

be the maximum expected terminal utility from time t onward.

Between fills, the mid-price diffuses. Bid and ask fills create jumps in (x,q).

The HJB equation therefore combines:

  • a diffusion term in s;
  • an ask-arrival jump term;
  • a bid-arrival jump term;
  • maximisation over δa and δb.

The optimal-control problem asks: how far should each quote be from the reference price so that the marginal utility of another fill balances its arrival probability?

5. The reservation price

The most intuitive result is the inventory-adjusted reservation price:

r(t,s,q) = s − q γ σ² (T−t).

Interpretation:

  • q = 0 → r = s;
  • q > 0 (long inventory) → r < s;
  • q < 0 (short inventory) → r > s.

The dealer does not treat the public mid-price as its own indifference price when carrying inventory.

6. Why a long dealer shifts quotes down

If q > 0, the dealer already owns too much inventory.

The reservation price moves below the market mid:

r = s − positive amount.

Quoting around this lower centre tends to:

  • move the ask downward, making a sale more likely;
  • move the bid downward, making another purchase less likely.

The entire quote pair is skewed in the direction that encourages inventory mean reversion.

7. Inventory skew grows with risk, volatility and time

The reservation-price displacement is:

s − r = q γ σ² (T−t).

Its magnitude therefore rises with:

  • |q| — larger inventory;
  • γ — stronger risk aversion;
  • σ² — more mid-price variance;
  • T−t — more time for inventory to move against the dealer.

This formula provides a direct unit test. Doubling q should double the reservation-price skew in the simplified model.

8. The familiar closed-form spread approximation

Under the symmetric exponential-arrival specification, the widely used Avellaneda–Stoikov approximation gives total bid–ask spread:

spread ≈ γσ²(T−t) + (2/γ) ln(1 + γ/k).

A convenient half-spread is:

h ≈ ½γσ²(T−t) + (1/γ) ln(1 + γ/k).

Quotes can then be written:

pb = r − h,

pa = r + h.

This separates the quote pair into:

  • centre: inventory-adjusted reservation price r;
  • width: execution-versus-risk spread h.

The exact HJB/control solution and later refinements can be more detailed. The formulas above are best treated as the canonical closed-form intuition/approximation, not as a universal exchange quoting law.

9. Two economic terms live inside the spread

The total spread contains:

γσ²(T−t)

from inventory price risk and:

(2/γ) ln(1 + γ/k)

from the trade-off between quote distance and fill intensity.

The first term widens as risk aversion, volatility or remaining horizon rises.

The second term depends on how rapidly order arrival intensity falls when the quote is moved away from the market.

10. What k means

With:

λ(δ) = A e−kδ,

k measures the sensitivity of order arrival intensity to quote distance.

A large k means fills disappear rapidly as the dealer moves away from the market. The dealer has little freedom to quote wide.

A small k means arrival intensity decays slowly; wider quotes can remain executable.

In the closed-form spread term:

ln(1+γ/k)

falls when k rises.

11. What A means—and why it can disappear from the simple quote formula

A controls the overall scale of order-arrival intensity.

In the simplest exponential-intensity first-order condition, A multiplies the whole arrival function and cancels from the optimal quote-distance expression.

This does not mean A is economically irrelevant.

A affects:

  • expected number of fills;
  • inventory turnover;
  • expected spread capture;
  • distribution of terminal P&L.

If an implementation claims A never matters anywhere, it has confused “cancels from one offset formula” with “does not affect the stochastic trading process.”

12. The net effect of γ on spread is not a one-line slogan

Increasing γ unquestionably increases reservation-price inventory skew.

For the spread:

γσ²(T−t)

increases with γ, while:

(2/γ)ln(1+γ/k)

typically decreases from its small-γ limit.

The total derivative can therefore depend on the parameter region.

A robust educational implementation should evaluate the formula rather than repeating “higher risk aversion always means wider spreads” as an unqualified rule.

13. Risk-neutral limit

As γ approaches zero:

(1/γ) ln(1 + γ/k) → 1/k.

The inventory-risk terms vanish, so:

r → s

and the total spread approaches approximately:

2/k.

This is a useful numerical limiting test for code implementing the closed-form approximation.

14. Fill probability over a time step

If order arrivals follow a Poisson process with intensity λ, the probability of at least one arrival over small interval Δt is:

P(fill) = 1 − e−λΔt.

For very small Δt:

P(fill) ≈ λΔt.

Using λΔt as an exact probability can exceed one when the time step or intensity is large.

Falsifier: enforce probability bounds and compare the Bernoulli approximation with exact Poisson simulation as Δt changes.

15. Calibration of A and k

A practical calibration can estimate how often a hypothetical/passive quote at distance δ would have been executed.

A stylised model fits:

log λ(δ) = log A − kδ.

But the data problem is harder than the regression suggests.

The calibration must decide:

  • what counts as quote exposure time;
  • whether queue position was executable;
  • whether the mid-price moved through the quote;
  • how cancellations are treated;
  • whether fills are censored by the trader’s own cancellations;
  • whether bid and ask share parameters;
  • whether volatility/order flow regimes require different parameters.

A straight line through fill counts without exposure controls can estimate trading activity rather than execution intensity.

16. Queue position is absent from the canonical model

Two identical orders at the same price can have different fill probabilities if one is first in queue and the other is last.

Avellaneda–Stoikov’s intensity is usually a function of price distance, not detailed queue position.

Falsifier: stratify historical fill rates by queue-depth/priority proxy. If execution probability varies strongly after controlling for δ, the one-dimensional intensity model is missing an important state variable.

17. Adverse selection is absent from the basic price process

In the canonical setup, a fill does not itself reveal information about the future drift of S. The mid-price is exogenous Brownian motion.

Real market orders can be informed. A buy market order that lifts the dealer’s ask may predict further price increases, making the fill systematically bad for the seller.

Falsifier: measure post-fill markouts. If ask fills are followed by systematic upward moves and bid fills by systematic downward moves, execution is informative and the symmetric independent-arrival model is incomplete.

This is precisely why the general market-making owner includes adverse selection separately.

18. Order-flow clustering breaks independent Poisson arrivals

Real trades can cluster because large orders are split, algorithms react to one another and information arrives in bursts.

If arrivals are self-exciting, the Poisson assumption understates short-run order-flow persistence.

Falsifier: test inter-arrival times and conditional intensity after recent fills. Strong clustering suggests Hawkes/order-flow models may be more appropriate.

See Hawkes-process algorithms.

19. The Brownian mid-price assumption is a benchmark, not a market law

The model uses:

dS = σdW.

Real intraday mid-prices can exhibit:

  • short-horizon predictability;
  • jumps;
  • stochastic volatility;
  • mean reversion;
  • order-flow-induced movement;
  • regime changes.

If a predictive signal exists, the reservation price may need an alpha/drift term in addition to the inventory adjustment.

20. Tick size and crossing constraints

The theoretical quotes are continuous real numbers.

Exchange prices live on a discrete tick grid.

Rounding can:

  • make bid and ask asymmetric;
  • collapse a small spread to one tick;
  • move a quote across the best price;
  • change fill intensity discontinuously.

An extreme inventory skew can even make the theoretical quote distance negative relative to the mid, which would imply a marketable/crossing order rather than passive market making.

Falsifier: apply exchange tick/side constraints explicitly and report how often theoretical quotes require clipping or crossing.

21. Terminal inventory is not forced to zero in the basic utility

The terminal objective marks remaining inventory at ST.

It does not necessarily impose a real liquidation cost or require qT = 0.

Therefore, as T approaches, the simple inventory-risk skew term shrinks because there is less time for Brownian price risk.

A real desk facing mandatory close-out, inventory penalties or auction liquidity can behave differently.

Later optimal-market-making models add explicit inventory constraints or terminal liquidation penalties.

22. Inventory bounds

A practical market maker normally has:

qmin ≤ q ≤ qmax.

At a limit, one side may be disabled.

Guéant, Lehalle and Fernandez-Tapia develop related stochastic-control formulations with inventory constraints and show how the HJB system can be transformed and approximated.

Inventory limits change the state/action space and are not captured merely by clipping the closed-form reservation price after the fact.

23. Inputs and outputs

Inputs can include:

  • current mid-price S;
  • inventory q;
  • volatility estimate σ;
  • risk-aversion parameter γ;
  • horizon T and current time t;
  • arrival-scale A;
  • arrival-decay k;
  • tick size;
  • inventory bounds;
  • minimum/maximum quote distances;
  • fee/rebate assumptions if added;
  • queue/adverse-selection overlays if added.

Outputs can include:

  • reservation price r;
  • theoretical bid/ask quotes;
  • rounded executable quotes;
  • predicted bid/ask intensities;
  • fill probabilities over Δt;
  • inventory-skew contribution;
  • spread-risk and flow components;
  • inventory-limit flags;
  • parameter-sensitivity table;
  • model-versus-realized fill diagnostics.

24. Evidence polarity

Evidence for confidence includes:

  • historical fill rates decline roughly with quote distance under the chosen state conditioning;
  • reservation-price skew predicts inventory reduction in simulation;
  • zero-inventory quotes are approximately symmetric when bid/ask flow is symmetric;
  • model fill probabilities match held-out exposure data reasonably;
  • inventory variance falls as risk controls strengthen;
  • parameter changes produce directions consistent with the equations;
  • simulation converges as Δt shrinks;
  • results remain sensible after tick rounding and inventory limits.

Evidence against confidence includes:

  • fill rates depend strongly on queue position after controlling for δ;
  • post-fill markouts show persistent adverse selection;
  • A and k drift sharply intraday;
  • inter-arrival times show strong clustering;
  • theoretical quotes require frequent crossing/clipping;
  • inventory does not mean-revert as predicted;
  • small changes in γ or k produce unstable P&L because calibration is poorly identified;
  • backtests ignore fees, queue rejection or latency.

25. Counterexample: the fill curve is not exponential

Suppose observed execution intensity is flat near the best quote, then falls abruptly after two ticks.

Fitting A e−kδ forces a smooth exponential shape that does not exist.

Falsifier: plot non-parametric exposure-adjusted fill intensity against δ and compare exponential residuals. A systematic shape error invalidates the closed-form k interpretation.

26. Counterexample: one k across regimes

During calm periods, liquidity may be deep and fill intensity highly sensitive to quote distance. During news, market orders may cross many levels and the relationship changes.

Falsifier: estimate k by volatility/order-flow regime. Large stable differences imply that a single constant k is not adequate.

27. Counterexample: the model sells into informed buying

The dealer is long and lowers its ask to reduce inventory. But a burst of aggressive buying contains positive short-term information.

The model may sell exactly when expected price drift is positive, creating adverse markouts.

Falsifier: condition post-fill returns on order-flow imbalance. Persistent directional markouts require an information/adverse-selection state, not merely stronger inventory skew.

28. Counterexample: volatility estimate is stale

Because skew/spread risk terms use σ², a sudden volatility jump makes stale quotes too tight relative to inventory risk.

Falsifier: compare realized short-horizon variance with the σ used by the controller. Trigger recalibration or a volatility-state update when error exceeds a documented tolerance.

29. Counterexample: γ is calibrated to one P&L sample

Risk aversion is a preference/control parameter, not a directly observable market constant.

Choosing γ because one backtest produced the highest average P&L can overfit noise and turn a risk parameter into a strategy-mining knob.

Falsifier: evaluate γ across out-of-sample regimes using inventory risk, drawdown, turnover and fill metrics—not only mean P&L.

30. Counterexample: latency makes the quote stale

The model computes r and h from St, but by the time an order reaches the venue the mid-price may have moved.

A theoretically optimal quote can become a stale adverse-selection target.

Falsifier: measure decision-to-acknowledgement latency and markouts versus mid-price movement during that latency. The controller cannot be validated independently of its execution plumbing.

31. Counterexample: queue priority dominates price distance

Moving a bid one tick closer can improve price but place the new order at the back of a very long queue.

The fill intensity may fall rather than rise.

Falsifier: estimate fill probability conditional on both distance and queue/depth state. If distance monotonicity fails after realistic order placement, the simple intensity model is structurally wrong.

32. Relation to the broader BTT market-making owner

How Bank Market-Making Algorithms Manage Inventory owns the full operational picture: inventory, spreads, adverse selection, risk limits and liquidity.

This Avellaneda–Stoikov page owns only one mathematical engine inside that picture:

inventory-aware stochastic-control quote placement under Brownian price and quote-distance-dependent Poisson arrivals.

33. Relation to Kyle’s lambda

Kyle’s lambda algorithms measure the price impact associated with signed order flow.

The canonical Avellaneda–Stoikov model treats the reference mid-price as exogenous and does not make dealer fills move the price through a Kyle-style impact equation.

These are distinct microstructure mechanisms.

34. Relation to Almgren–Chriss

Almgren–Chriss optimal execution owns the problem of liquidating/acquiring a target position while balancing market impact and timing risk.

Avellaneda–Stoikov owns ongoing two-sided liquidity provision where inventory emerges endogenously from random fills.

35. A minimal algorithm

  1. Observe mid-price S and current inventory q.
  2. Estimate/update σ.
  3. Load validated γ, A, k and horizon.
  4. Compute reservation price r = S − qγσ²(T−t).
  5. Compute the model half-spread h.
  6. Set theoretical bid r−h and ask r+h.
  7. Apply inventory limits and side constraints.
  8. Round to tick size under a documented rule.
  9. Check that passive-quote constraints are satisfied.
  10. Send/cancel orders through the venue layer.
  11. Record exposure time, queue state, fills and markouts.
  12. Re-estimate diagnostics and parameters on the approved schedule.

The last four steps are outside the pure formula but essential to validating whether the formula’s assumptions survive contact with real market mechanics.

36. Weak links

  • stale σ;
  • A/k estimated without exposure-time correction;
  • queue priority omitted;
  • bid/ask intensity asymmetry ignored;
  • self-exciting order flow treated as independent Poisson;
  • adverse selection absent;
  • tick rounding changes quote geometry;
  • inventory limits imposed after optimisation without re-solving;
  • latency ignored;
  • terminal inventory/liquidation cost omitted;
  • γ overfit to historical P&L;
  • fees/rebates ignored when economically material.

37. What would falsify confidence?

Confidence should be withdrawn if held-out fill probabilities are badly miscalibrated; if inventory does not respond to quote skew as predicted; if post-fill markouts show strong information effects; if A/k are unstable; if quote-distance monotonicity breaks because of queue mechanics; if simulated results collapse after tick/latency/fee constraints are added; or if a richer model materially improves out-of-sample inventory and fill diagnostics without excessive complexity.

38. Verification and update triggers

Preserve the exact model equations, γ, σ estimator, A/k calibration sample, quote-exposure definition, tick rules, inventory bounds, horizon, fill simulator, latency assumptions and benchmark policy.

Revalidate when:

  • market volatility changes regime;
  • tick size or fee schedule changes;
  • venue queue rules change;
  • fill-rate residuals change materially;
  • post-fill adverse selection increases;
  • inventory distribution drifts;
  • the trading horizon/terminal objective changes;
  • order-flow dependence becomes material;
  • execution latency changes.

39. Primary and high-quality references

Educational boundary: Avellaneda–Stoikov is valuable because it makes the inventory-versus-fill trade-off mathematically explicit. Its clean formulas are produced by strong assumptions about price dynamics, arrivals and execution. Those assumptions must be tested rather than hidden behind the word “optimal.”

Discover more from Bukit Timah Tutor

Subscribe now to keep reading and get access to the full archive.

Continue reading