Quantitative & Market Making

rodlaf / KalshiMarketMaker

by Rodney Lafuente-Mercado (rodlaf)

195 stars View on GitHub →

What it does

The most-cited reference for "real" market-making math on Kalshi. Implements multiple MM strategies in parallel, including an Avellaneda-Stoikov model. Dynamic market selection scores by volume and spread; a real-time terminal dashboard (curses) visualizes inventory. Strict deselect-cleanup invariant: stop worker → cancel all resting orders → verify cleanup before exit. Per-market 3-contract cap, 20 global. Inventory risk aversion increases as inventory approaches limits.

What we learned from it

the cleanup invariant matters more than people think. A bot that crashes with resting orders on the book can take losses you never modeled. The "verify cleanup" step isn't paranoid; it's the difference between a controlled shutdown and a financial event.

Don't want to maintain your own bot?

Bot for Kalshi is the no-code platform for automated prediction-market trading — visual builder, signals, encrypted credentials, kill switch. The infrastructure these open-source projects build, ready to use.

Start Free Trial →