Projects

Avellaneda–Stoikov market making on intraday replay

How should a market maker move its quotes as inventory builds up, and does inventory-aware quoting actually control risk on real intraday price paths?

Python, stochastic control, EODHD intraday data, 2026. Code on GitHub

average |inventory| vs. fixed spread, AAPL
−82%
average |inventory| vs. fixed spread, MSFT
−88%
average |inventory| vs. fixed spread, NVDA
−50%

The question

The Avellaneda–Stoikov model shifts a market maker's reservation price against its inventory: long inventory pushes quotes down to encourage selling, short inventory pushes them up. The project starts from a pure Brownian simulation and replaces the simulated path with real one-minute bars, to see how the idea behaves on actual prices.

Approach

Results

TickerDay returnAvg |inv| A–SAvg |inv| naiveP&L A–SP&L naive
AAPL−0.56%1.789.85−5.1751.32
MSFT+3.03%0.887.33−19.1062.82
NVDA−0.71%1.242.4927.1439.09
One-minute replay, 29 May 2026. P&L in simulation units.

The fixed-spread quoter earned more raw P&L on all three names, but it did so by carrying two to eight times as much inventory. On MSFT, which rose about 3% during the day, much of the naive strategy's profit was directional exposure it never meant to take. NVDA is the honest counterexample: there the inventory-aware strategy was profitable but had the larger drawdown, so the risk-control edge is not automatic.

What I learned

Market making should not be judged on final P&L alone. A strategy that earns more by holding a larger position is taking a different risk, not doing the same job better.

Next

More sessions and averaged results, parameter sweeps over risk aversion and fill intensity, fees and rebates, and real bid/ask or order-book data so fill rates can be estimated rather than assumed.