Stochastic Control
/
Market Microstructure
/
Python & C++
Market-Making Simulator (Avellaneda–Stoikov)
An algorithmic market-making simulation engine built on the classic Avellaneda–Stoikov framework.
Models high-frequency quoting strategies where an agent dynamically shifts bid and ask quotes
away from the mid-price to manage inventory risk under Poisson arrival intensity.
r(s, q, t) = s - q \cdot \gamma \cdot \sigma^2(T - t)
\delta^a + \delta^b = \gamma \sigma^2(T - t) + \frac{2}{\gamma}\ln\left(1 + \frac{\gamma}{\kappa}\right)
Reservation price shifts quotes asymmetrically to penalize excess inventory (q).
Reservation Price
$100.00
Total Spread
$1.42
Bid / Ask Quote
99.29 / 100.71