Market Making and Liquidity Provision › Inventory Risk

Michael BrenndoerferDecember 31, 20256 min read
Quantitative FinanceAll chapters
Part 12 of 15Market Making and High-Frequency Trading
Chapter 65Market Making and Liquidity Provision › Inventory Risk
Reading section 4 of 13 · Inventory Risk · 6 minSection 4 of 13 · 6 min

Book contents

Section 4 of 13 · 6 min read

Market Making and Liquidity Provision › Inventory RiskOne section · Sections in this chapter4 / 13 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The central challenge in market making is inventory risk, the risk that accumulated positions will lose value before they can be unwound. If you buy more than you sell, you accumulate a long position. If prices then fall, you suffer losses that may exceed the spread revenue earned. This risk is unavoidable because you cannot control the timing or direction of incoming orders. You must quote continuously, but you cannot determine which of your quotes will be executed.

The Inventory Accumulation Problem

Consider a scenario where you start the day flat (no position). Over the course of trading, order arrivals are random. Sometimes more buyers arrive, causing you to sell and become short. Other times more sellers arrive, causing you to buy and become long. Your inventory thus evolves as a consequence of the random sequence of order arrivals, not as a result of any deliberate trading decision.

We can model inventory evolution as a random process. This mathematical framework helps us understand why inventory accumulation is such a persistent concern. Let qtq_t denote your inventory at time tt. Each trade changes inventory by ±1\pm 1 (assuming unit trade sizes):

qt+1=qt+Δqtq_{t+1} = q_t + \Delta q_t

where:

  • qtq_t: current inventory level
  • Δqt\Delta q_t: change in inventory (+1 for buy, -1 for sell)
  • qt+1q_{t+1}: inventory level after the trade

If a market sell order arrives, you buy (Δqt=+1\Delta q_t = +1). If a market buy order arrives, you sell (Δqt=−1\Delta q_t = -1). Notice that you take the opposite side of each incoming order, which is what it means to "make a market." The inventory change is thus determined by the arriving order, not by your preference.

In[6]:
Code
import numpy as np

# Simulate inventory paths for a market maker
np.random.seed(123)

n_steps = 1000
n_paths = 5

# Simulate multiple inventory paths
# Assume 50% probability of buy vs sell order, with slight imbalance
buy_prob = 0.50  # Probability that incoming order is a sell (market maker buys)

inventory_paths = np.zeros((n_paths, n_steps + 1))

for i in range(n_paths):
    for t in range(n_steps):
        # Random order arrival: +1 if market maker buys, -1 if sells
        if np.random.random() < buy_prob:
            inventory_paths[i, t + 1] = inventory_paths[i, t] + 1
        else:
            inventory_paths[i, t + 1] = inventory_paths[i, t] - 1
Out[7]:
Visualization
Line chart showing five random walk inventory paths diverging from zero over time.
Simulated inventory paths over 1,000 trades. Even with perfectly balanced order arrival probabilities, inventory levels follow a random walk and can drift significantly from zero. This unmanaged drift exposes a market maker to directional price risk.

The simulation shows that even with perfectly balanced order flow, where buys and sells arrive with equal probability, inventory follows a random walk and can drift far from zero. This is a mathematical consequence of the random walk properties: the expected position is zero, but the variance of the position grows with the number of trades. This drift is dangerous because it exposes you to directional price risk, exactly the risk you don't want to take. You aim to profit from the spread, not from predicting price direction. Yet without active management, you inevitably accumulate positions that bet on price direction.

Quantifying Inventory Risk

To understand how to manage inventory risk, we must first quantify it precisely. The P&L impact of inventory comes from price changes. If you hold inventory qq and the price changes by ΔP\Delta P, the inventory P&L is:

Inventory P&L=q×ΔP\text{Inventory P\&L} = q \times \Delta P

where:

  • qq: current inventory position
  • ΔP\Delta P: change in asset price

This formula captures the essence of the risk: your profit or loss depends on how much inventory you hold and how much the price moves. A long position profits when prices rise and loses when prices fall; a short position has the opposite exposure.

The variance of inventory P&L over a short time interval Δt\Delta t can be derived from the price variance. This derivation connects our understanding of price dynamics to the specific risk you face. Assuming the asset price PP follows a random walk with percentage volatility σ\sigma:

Var[Inventory P&L]=Var[qΔP]=q2Var[ΔP](properties of variance)=q2(Pσ)2Δt(substitute price variance)\begin{aligned} \text{Var}[\text{Inventory P\&L}] &= \text{Var}[q \Delta P] \\ &= q^2 \text{Var}[\Delta P] && \text{(properties of variance)} \\ &= q^2 (P \sigma)^2 \Delta t && \text{(substitute price variance)} \end{aligned}

where:

  • qq: inventory size
  • ΔP\Delta P: change in asset price
  • PP: current asset price
  • σ\sigma: annualized volatility (percentage)
  • Δt\Delta t: time interval

This result reveals a critical insight: inventory risk grows quadratically with position size. Holding twice the inventory creates four times the variance, not twice the variance. This non-linear relationship means that large positions are disproportionately risky. If you hold 100 shares, you face four times the risk variance of holding 50 shares, even though you hold only twice as many shares. This quadratic scaling provides strong incentive to keep positions small.

In[8]:
Code
import numpy as np

# Demonstrate the relationship between inventory and risk
sigma = 0.02  # 2% daily volatility
dt = 1 / 252  # One trading day
price = 100

# Calculate P&L variance for different inventory levels
inventory_levels = np.arange(-100, 101, 10)
pnl_std = np.abs(inventory_levels) * sigma * np.sqrt(dt) * price
Out[9]:
Visualization
Line chart showing V-shaped relationship between inventory and P&L standard deviation.
Inventory risk profile showing P&L standard deviation vs inventory size. The linear relationship between position size and risk deviation implies that variance (risk) grows quadratically. This convex risk profile creates a strong incentive for market makers to actively manage inventory toward zero.

This risk profile motivates a key market making principle: inventory mean reversion. You should actively adjust your quotes to encourage trades that reduce inventory. When long, you lower your ask price to attract buyers; when short, you raise your bid price to attract sellers. This quote adjustment technique is called "skewing" and represents the primary tool you use to control their exposure. By making it more attractive for the market to trade in the direction that reduces your position, you can systematically pull your inventory back toward zero without waiting passively for favorable order flow.