Market Making and Liquidity Provision › Inventory Risk
Quantitative FinanceAll chapters 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 denote your inventory at time . Each trade changes inventory by (assuming unit trade sizes):
where:
- : current inventory level
- : change in inventory (+1 for buy, -1 for sell)
- : inventory level after the trade
If a market sell order arrives, you buy (). If a market buy order arrives, you sell (). 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.
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
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 and the price changes by , the inventory P&L is:
where:
- : current inventory position
- : 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 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 follows a random walk with percentage volatility :
where:
- : inventory size
- : change in asset price
- : current asset price
- : annualized volatility (percentage)
- : 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.
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
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.