Market making simulator

Avellaneda-Stoikov · mock data

A market maker earns the spread but takes inventory risk. Watch how the quotes skew to control inventory — then turn risk aversion to zero and see what breaks.

Half-spread (each side)1.12
Inventory skew per unit0.25
Live book
bid ask buy fill sell fill
7,499.327,501.917,504.49ask 7,504.60bid 7,502.36
t=150/1200
tick 150mid 7,503.89bid 7,502.36ask 7,504.60inv 0pnl +$5
Inventory0 contracts
+100−10

Dashed lines = limits — the quote on that side is pulled when reached.

PnL+$5
+$20$0−$10
total (mark-to-market) realized

Spread captured

+$14

gross edge

Total PnL

+$5

after inventory

Trades

14

7B / 7S

Max |inventory|

2

limit 10

Time one-sided

1%

Unrealized

$0

The model (Avellaneda-Stoikov, 2008)

The mid price is a random walk. Every tick the maker quotes a bid and an ask around a reservation price — not the mid itself:

r = S − q·γ·σ²·τ

spread = γ·σ²·τ + (2/γ)·ln(1 + γ/κ)

fill intensity λ(δ) = A·e^(−κ·δ)

  • Inventory skew: after buying (q > 0) the reservation price drops, so both quotes shift down — the next fill is more likely a sale. That's inventory control without any rules.
  • Adverse selection: bids fill right before drops, asks before rallies — fills cluster against you. Spread income must cover it.
  • γ = 0: quotes stay symmetric, inventory random-walks to the limits, and PnL variance explodes. Same spread, worse outcome.