Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceProbability & MeasureStochastic ModelsMarket MicrostructureGuide
Guide
Derivatives pricing0 / 17
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Options on dividend-paying stocks, indices, currencies and futures14Implied volatility and the volatility smile15Stochastic volatility and the Heston model16Static replication: Breeden–Litzenberger and Carr–Madan17Exotic options: barriers, Asians and digitals
Portfolio & risk0 / 12
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08The Fama–French factor models09Value at Risk and expected shortfall10Systemic risk and contagion11Portfolio constraints and the no-short-sales frontier12Estimating expected returns and covariances
Fixed income0 / 10
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Non-parallel curve moves and key-rate durations06Bond futures and the cheapest-to-deliver07Interest rate swaps08Callable bonds and negative convexity09Credit risk: default probabilities and credit spreads10Real rates, inflation and inflation-linked bonds
Corporate finance0 / 10
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04Project risk: sensitivity, scenarios and Monte Carlo NPV05The weighted average cost of capital06Capital structure and the Modigliani–Miller theorems07Dividends, payout policy and the dividend discount model08Discounted cash flow valuation09Relative valuation with multiples10Real options: the value of flexibility
Probability and measure0 / 13
01Measuring the size of sets02σ-algebras and Borel sets03Lebesgue measure and null sets04Measurable functions05The Lebesgue integral06Convergence theorems07Probability spaces and Kolmogorov's axioms08Random variables and their distributions09Expectation, variance and inequalities10Independence and product measures11Modes of convergence and the law of large numbers12Conditional probability and conditional expectation13Measure theory in option pricing
Stochastic models0 / 17
01Random walks and Brownian motion02The law of large numbers and the central limit theorem03Probability spaces, σ-algebras and random variables04Filtrations, adapted processes and stopping times05Conditional expectation and martingales06Properties of Brownian motion07The reflection principle and first passage times08The Brownian bridge09The Itô integral10Itô's lemma11Kolmogorov equations and the Feynman–Kac formula12Change of measure and Girsanov's theorem13Monte Carlo option pricing14Simulating SDEs: the Euler–Maruyama scheme15Correlated Brownian motions and multi-asset models16Mean reversion: Ornstein–Uhlenbeck and Vasicek17Jumps and the Merton jump-diffusion model
Market microstructure0 / 11
01Market makers and liquidity02The limit order book03Queue position and fill probability04Adverse selection and informed trading05The Glosten–Milgrom model06Measuring and decomposing the bid–ask spread07Informed trading and Kyle's lambda08Price impact and optimal execution09Inventory risk and quote skewing10Optimal quoting: the Avellaneda–Stoikov model11Market making profit and loss attribution
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guides/Market microstructure/09

Inventory risk and quote skewing

Lesson 9 of 11 · 1 min read

A market maker earns the spread on every round trip, but between the two halves of a round trip it holds a position, and the price keeps moving. "Market makers and liquidity" showed one such trip; this lesson asks what happens when many trips overlap and positions pile up on one side. It uses the idea from "Random walks and Brownian motion" that price changes behave like a random walk, measures the risk that position creates, and shows the maker's main tool for controlling it: shifting both quotes.

Inventory profit and loss

The maker's inventory qqq is the number of shares held: positive when long, negative when short. If the mid price changes by Δm\Delta mΔm while the position is unchanged, the profit or loss is

P&L=q Δm.\text{P\&L} = q\,\Delta m.P&L=qΔm.

Suppose the mid moves like a random walk whose standard deviation is σ\sigmaσ per second\sqrt{\text{second}}second​. Over τ\tauτ seconds Δm\Delta mΔm has mean 0 and standard deviation στ\sigma\sqrt{\tau}στ​, so the position's P&L has mean 0 and

sd(q Δm)=∣q∣ στ,Var=q2σ2τ.\text{sd}(q\,\Delta m) = |q|\,\sigma\sqrt{\tau}, \qquad \text{Var} = q^2\sigma^2\tau.sd(qΔm)=∣q∣στ​,Var=q2σ2τ.

The risk grows in proportion to the size of the position and to the square root of the time it is held. Doubling the position doubles the standard deviation and quadruples the variance. The maker is not paid for this risk in expectation, since the mean is zero, so the sensible aim is to hold only as much of it as the spread income justifies.

How inventory builds

Inventory changes only when a customer trades with the maker. A fill at the bid adds a lot (here 100 shares) and a fill at the ask removes one. Which side fills next is random, so even with quotes that are symmetric around the mid the position drifts. Suppose each side fills at rate λ\lambdaλ per second. In TTT seconds the maker sees about 2λT2\lambda T2λT fills, each +1+1+1 or −1-1−1 lot with equal probability, so the position after TTT seconds is a random walk with variance 2λT2\lambda T2λT lots2^22. Its typical size grows like T\sqrt{T}T​, exactly as a price does.

A quote at distance δ\deltaδ from the mid fills at the rate λ(δ)=A e−kδ\lambda(\delta) = A\,e^{-k\delta}λ(δ)=Ae−kδ: the closer the quote, the more often it is hit. With A=0.25A = 0.25A=0.25 per second, k=30k = 30k=30 per USD and δ=0.02\delta = 0.02δ=0.02 USD, each side fills at 0.25 e−0.6≈0.1370.25\,e^{-0.6} \approx 0.1370.25e−0.6≈0.137 per second, about once every seven seconds. Such a maker will often end a minute holding several lots, none of which it chose.

Skewing the quotes

The maker can influence which side is hit. If it is long, it wants a sell to come before a buy. It achieves that by moving both quotes down: the ask becomes cheaper and is hit more often, the bid becomes less attractive and is hit less often. This is called skewing the quotes. Let ℓ=q/100\ell = q/100ℓ=q/100 be the inventory in lots and θ\thetaθ the shift per lot, in USD. The bid and ask are then at distances

δbid=δ+θℓ,δask=δ−θℓ\delta_{\text{bid}} = \delta + \theta\ell, \qquad \delta_{\text{ask}} = \delta - \theta\ellδbid​=δ+θℓ,δask​=δ−θℓ

from the mid. The quotes' centre is m−θℓm - \theta\ellm−θℓ and the spread 2δ2\delta2δ is unchanged. The expected change in inventory per second is the bid fill rate minus the ask fill rate:

λb−λa=Ae−kδ(e−kθℓ−ekθℓ)=−2λ sinh⁡(kθℓ)≈−2λkθ ℓ,\lambda_b - \lambda_a = A e^{-k\delta}\left(e^{-k\theta\ell} - e^{k\theta\ell}\right) = -2\lambda\,\sinh(k\theta\ell) \approx -2\lambda k\theta\,\ell,λb​−λa​=Ae−kδ(e−kθℓ−ekθℓ)=−2λsinh(kθℓ)≈−2λkθℓ,

where λ=Ae−kδ\lambda = A e^{-k\delta}λ=Ae−kδ and the approximation holds for small kθℓk\theta\ellkθℓ. The drift is proportional to −ℓ-\ell−ℓ: long positions are pushed down and short ones up. Inventory is no longer a plain random walk but is pulled back to zero at rate κ=2λkθ\kappa = 2\lambda k\thetaκ=2λkθ. Balancing the random fills against this pull gives a long-run variance of 1/(2kθ)1/(2k\theta)1/(2kθ) lots2^22, which does not depend on AAA and falls as θ\thetaθ grows.

What skewing costs

Skewing reduces risk but it is not free. When the maker is long, its ask is closer to the mid than δ\deltaδ, so each share it sells earns less than the full half-spread. It also fills less often on the side that would add to its position. Average spread income falls as θ\thetaθ rises, while the standard deviation of the final position and of the P&L falls too. The figure runs 200 simulated minutes with the same random numbers for every θ\thetaθ, so the changes you see are caused by the skew alone.

Start with the skew at 0. The final inventory has a standard deviation of about 372 shares, the mean P&L is 36.01 USD and the P&L has a standard deviation of 39.62 USD. Drag the marker down, or use the slider, to 0.20 cents per 100 shares: the inventory spread falls to 253 shares and the P&L standard deviation to 34.50 USD, while the mean falls to 33.59 USD, about 7% less. At 0.40 cents the inventory spread is 202 shares and the P&L standard deviation 29.58 USD, but the mean has fallen to 30.39 USD. How much to skew depends on how much the maker dislikes risk, which is the question the next lessons answer precisely.

Inventory and quote skewOpen in Market Making
0.00¢
00.5
AskQuote centreBid
Spread of final inventory (shares)
372
Mean P&L (USD)
36.01
P&L standard deviation (USD)
39.62

Hedging instead of skewing

There is a second way to remove inventory: trade it away. The maker can cross the spread, selling at the bid what it holds, and pay the half-spread plus any fee. Or it can trade a correlated instrument, such as a future or an exchange-traded fund, and leave the shares in place; this is the idea of "Delta and hedging", applied to an equity position rather than an option. Crossing the spread is certain and immediate but costs money on every share. Skewing costs nothing up front and works slowly, so it suits small positions and calm markets. Hedging suits large positions, fast markets, or a maker who cannot wait for customers to arrive.

Worked example

Hold the position or flatten it

  1. A maker is long 500 shares and σ=0.02\sigma = 0.02σ=0.02 USD per second\sqrt{\text{second}}second​. The standard deviation of the P&L over 60 seconds, in USD:

    500×0.02×60\displaystyle 500 \times 0.02 \times \sqrt{60}500×0.02×60​=77.46
  2. A one-sided 95% loss is 1.645 standard deviations, in USD:

    1.645×77.46\displaystyle 1.645 \times 77.461.645×77.46=127.42
  3. Flattening now means selling 500 shares at the bid, which is the half-spread of 0.01 plus a fee of 0.003 below the mid. The cost in USD:

    500×(0.01+0.003)\displaystyle 500 \times (0.01 + 0.003)500×(0.01+0.003)=6.5
  4. The 95% loss avoided, net of the cost of flattening, in USD:

    127.42−6.50\displaystyle 127.42 - 6.50127.42−6.50=120.92

A cost of 6.50 USD for removing a 127.42 USD tail loss is cheap, which is why makers flatten large positions rather than wait. With a position of 50 shares the same trade buys little, and skewing is enough.

Summary

  • Inventory qqq earns q Δmq\,\Delta mqΔm; its P&L standard deviation is ∣q∣ στ|q|\,\sigma\sqrt{\tau}∣q∣στ​, so risk grows with the size of the position and the square root of time.
  • With symmetric quotes, random fills make inventory a random walk whose typical size grows like the square root of time.
  • Moving both quotes down by θ\thetaθ per lot when long makes the expected inventory change −2λsinh⁡(kθℓ)-2\lambda\sinh(k\theta\ell)−2λsinh(kθℓ), which pulls inventory back to zero.
  • Skewing lowers the variance of inventory and P&L but gives up some spread income; the figure shows both effects.
  • Crossing the spread or trading a correlated instrument removes inventory at a certain cost, which pays off for large positions.

The next lesson, "Optimal quoting: the Avellaneda–Stoikov model", chooses the skew from the maker's risk aversion instead of treating it as a free number.

Try itOpen the Market Making lab
3 questions on this lesson at the end of the series
Previous · 08Price impact and optimal executionNext · 10Optimal quoting: the Avellaneda–Stoikov model
Connections

Inventory risk and quote skewing

Open the full graph
Builds on
07.08Price impact and optimal execution07.01Market makers and liquidity06.01Random walks and Brownian motion01.09Delta and hedging
Leads to
07.10Optimal quoting: the Avellaneda–Stoikov model07.11Market making profit and loss attribution
See it in the knowledge graph
Labs for this lesson
Market Making