The Claude Quant PlaybookDownload ebookDownload ebook

Reservation price (Avellaneda–Stoikov)

A market maker holding inventory should centre its quotes away from the mid, below it when long and above it when short. The shift grows with inventory, risk aversion, variance and the time left to hold.

Build a trading system with Claude.Download ebook

01The formula

the reservation price: the price the market maker is indifferent to trading at, given its inventory
the current mid price
inventory: positive if long, negative if short
risk aversion: how much the maker dislikes inventory risk
volatility of the mid price per unit of time
time left until the end of the session

02See it move

03Where it is used

04Why traders use it

Without skew, a maker that gets filled on one side keeps getting filled there and builds a large position. The reservation price says exactly how much to lean, trading a little edge for much less risk.

05Worked example

With mid $100.00, inventory 4 lots, γ = 0.10, σ = 2.0 and 0.50 of the day left, the reservation price is $99.200: a skew of −$0.800. Each extra lot moves it by $0.200.

06How it is built

  1. The maker maximises expected exponential utility of final wealth, with risk aversion .
  2. Holding units until exposes it to a price variance of .
  3. The price at which one more unit leaves its utility unchanged is the mid minus a risk charge: .
  4. Long inventory pushes below , so the maker sells more readily; near the close and the skew vanishes.

07The common mistake

Mixing time units. If σ is per day, must be in days too; using σ per second with time in hours can make the skew hundreds of times too large or too small.

08In Python and LaTeX

s, q, gamma, sigma, tau = 100, 4, 0.1, 2.0, 0.5
r = s - q * gamma * sigma**2 * tau
print(round(r, 3))  # 99.2
r = s - q\,\gamma\,\sigma^2\,(T - t)

09Where it fits

Rather not code the maths yourself? Describe your trading idea and let AI build the bot.

Build a bot with AgenKit

The worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.