Browser port of my model.py. A market maker quoting with the Avellaneda–Stoikov (2008) solution runs against a naive fixed-spread quoter on the same mid-price path and the same random order arrivals. Change the parameters and the whole thing reruns, including a 300-path Monte Carlo.
# reservation price, optimal spread, fill intensity
r = s − q·γ·σ²·(T−t)
δ* = γ·σ²·(T−t) + (2/γ)·ln(1 + γ/k)
λ(δ) = A·exp(−k·δ)
| strategy | final PnL | Sharpe | max drawdown | trades | inventory σ |
|---|
Reservation price shifts off the mid with inventory; the quote band tightens as t → T.