Avellaneda-Stoikov Market Making Lab

Model Marco Avellaneda and Sasha Stoikov's (2008) high-frequency market making model, reservation price skewing, optimal bid-ask spreads, and inventory risk control.

TRADING DESK REGIMES:
Terminal Wealth PnL
$0.00
vs Naive MM: $0.00 (+0.00)
Max Inventory Excursion
0 units
Naive Max: 0 units
Optimal Symmetric Spread (S*)
$0.00
0.0 bps | Decay kappa: 1.50
Executions & Sharpe
0 executions
Sharpe: 0.00 (Naive: 0.00)
Microstructure Parameters
Initial Mid Price (\(S_0\)) $100.00
$20 $250
Asset Volatility (\(\sigma\)) $0.30
$0.05 $1.00
Inventory Risk Aversion (\(\gamma\)) 0.100
0.01 (Tolerant) 0.80 (Averse)
Liquidity Fill Decay (\(\kappa\)) 1.50
0.50 (Deep Book) 4.00 (Thin/Sensitive)
Base Arrival Rate (\(A\)) 140
30 / period 300 / period
Microstructure & Inventory Control Decomposition
Stochastic Control & Simulation Equilibrium
Metric / Parameter Mathematical Formula / Definition Simulated Equilibrium Value
Sensitivity 1: Risk Aversion (\(\gamma\)) vs Fill Decay (\(\kappa\)) on Optimal Spread \(S^*\) ($)
Sensitivity 2: Inventory (\(q\)) vs Horizon Remaining (\(T - t\)) on Reservation Skew (\(r - s\))

Theoretical Foundations: The Avellaneda-Stoikov (2008) Framework

In high-frequency algorithmic trading, market makers provide liquidity by posting limit orders at both the bid and the ask. However, providing liquidity carries two acute financial risks: adverse selection (trading against informed order flow) and inventory risk (accumulating large directional positions whose value fluctuates wildly before they can be unwound).

In their landmark 2008 paper "High-frequency trading in a limit order book", Marco Avellaneda and Sasha Stoikov formulated market making as an optimal stochastic control problem under constant absolute risk aversion (CARA) utility:

1. Reservation Price (Indifference Valuation)

A market maker with inventory \(q\) values the asset differently from the unconstrained market mid-price \(s\). The reservation price \(r(s, q, t)\) satisfies the dynamic indifference condition:

$$r(s, q, t) = s - q \gamma \sigma^2 (T - t)$$

When \(q > 0\) (long inventory), holding more shares increases portfolio variance. The market maker's private valuation drops below the mid-price (\(r < s\)), inducing them to shade both quotes downward to entice buyers and offload inventory.

2. Limit Order Fill Intensity

Incoming market order arrivals follow a Poisson process whose fill intensity decays exponentially with the distance \(\delta\) from the mid-price:

$$\lambda(\delta) = A e^{-\kappa \delta}$$

Where \(A\) is the baseline arrival rate and \(\kappa\) characterizes the order book liquidity elasticity. Quoting closer to the mid-price drastically increases fill probability at the expense of a narrower earned spread.

3. Optimal Bid and Ask Quoting Schedules

Solving the Hamilton-Jacobi-Bellman (HJB) PDE yields optimal half-spread distances \(\delta^a\) and \(\delta^b\) positioned symmetrically around the reservation price \(r(s, q, t)\):

$$p^a(t) = r(s, q, t) + \frac{1}{2} S^*, \quad p^b(t) = r(s, q, t) - \frac{1}{2} S^*$$

Where the optimal baseline spread is \(S^* = \frac{2}{\gamma}\ln\left(1 + \frac{\gamma}{\kappa}\right)\). Quotes naturally track the reservation price, ensuring continuous inventory self-correction.

4. Why Naive Symmetric Market Makers Fail

A naive market maker centers quotes at the mid-price \(s_t \pm \frac{1}{2}S\) regardless of inventory position \(q\).

$$\text{Var}(q_t^{\text{naive}}) \propto t \gg \text{Var}(q_t^{\text{Stoikov}})$$

Without reservation price feedback, naive market makers suffer from inventory runaway: in trending or volatile conditions, adverse executions accumulate without self-correction, causing massive mark-to-market drawdowns and frequent ruin.

Avellaneda-Stoikov Market Making Mastery Quiz

Related Quantitative Trading & Microstructure Simulators

VPIN & Order Flow Toxicity Lab

Model Easley-López de Prado-O'Hara volume clock toxicity, bulk volume classification, and flash crash liquidity cascades.

Kyle's Lambda & Microstructure Lab

Model Pete Kyle's (1985) insider trading equilibrium, Glosten-Milgrom Bayesian price discovery, and adverse selection spreads.

Almgren-Chriss Optimal Execution Lab

Balance permanent and temporary market impact against execution risk on optimal non-linear trading trajectories.

Frequently Asked Questions

The Avellaneda-Stoikov (2008) model, published in Quantitative Finance by Marco Avellaneda and Sasha Stoikov, is the foundational continuous-time stochastic control framework for algorithmic market makers in limit order books. It solves for the optimal bid and ask limit quotes that maximize expected terminal wealth while penalizing inventory variance under constant absolute risk aversion (CARA) utility. It analytically formalizes how market makers should adjust their bid-ask spreads and skew quotes away from the mid-price as their inventory position changes.

The reservation price r(s, q, t) = s - q * gamma * sigma^2 * (T - t) represents the market maker's subjective indifference valuation for holding an additional unit of the asset. When holding positive inventory (q > 0), the reservation price falls below the mid-price s to reflect inventory risk; this shifts quotes downward so the ask is closer to the market (increasing the probability of selling) while the bid is further away. Conversely, when short (q < 0), the reservation price rises above mid-price, quoting more aggressively on the bid to repurchase inventory.

The parameter gamma measures the market maker's inventory risk aversion. A higher gamma increases the penalty on holding inventory variance, which widens the optimal symmetric spread S* = (2 / gamma) * ln(1 + gamma / kappa) and intensifies the reservation price skew -q * gamma * sigma^2 * (T - t). Highly risk-averse market makers quote wider spreads and skew prices aggressively to rapidly mean-revert inventory back toward zero, whereas low-gamma market makers quote narrower spreads and tolerate larger inventory swings.

The parameter kappa measures the exponential liquidity decay of market order arrivals: lambda(delta) = A * exp(-kappa * delta). A high kappa indicates that limit order fill probability drops off sharply as the quote moves away from the mid-price, meaning liquidity demand is highly price-sensitive. In response, the market maker must quote tighter spreads to achieve executions. Lower kappa values reflect deeper, less price-sensitive markets where market makers can quote wider spreads without sacrificing fill rates.

A naive symmetric market maker quotes fixed spreads centered strictly on the mid-price regardless of inventory. In trending markets or adverse order flow conditions, naive market makers experience inventory runaway, accumulating large dangerous directional exposures that result in severe mark-to-market drawdowns. Avellaneda-Stoikov dynamically skews quotes around the reservation price, driving natural mean-reversion of inventory back to zero, halving inventory variance, and achieving significantly higher Sharpe ratios and CARA utility.