Market Maker Playground
Run a market maker against a simulated limit order book, entirely in your browser. Noise traders supply liquidity, informed traders trade on a fundamental value nobody else can see, and your market maker earns the spread while trying not to be picked off. The simulator is microbook, running as Python compiled to WebAssembly with Pyodide.
Price
The book's mid price tracks a fundamental value it cannot see.
Market maker PnL
Cash plus inventory marked to the mid, in dollars.
Inventory
Shares held. Quotes skew against the position to bring it back to zero.
Markouts
What a fill is worth h steps later, in ticks per share. Falling means adverse selection.
What to try
Raise latency: quotes update late, so informed traders hit them after the price has already moved. Raise informed traders: more of each fill is adverse selection, and the markout curve drops below zero. Switch to the realistic market: volatility clusters and institutions split large orders, so the market maker sees long one-sided runs.
How to read markouts
A fill's markout at horizon h is how much the trade has made once the mid has moved for h steps. At short horizons it is about the half-spread the market maker captured. If it falls as h grows, the people trading with the market maker knew where the price was going.