The Market Making Book

16. Risk Management & Operations

Market making fails operationally before it fails mathematically. The boring chapter that keeps the account alive.

Part IV · Chapter 16

The non-negotiables

  • Hard inventory limits — per market and aggregate, enforced in the engine (GLFT does it natively: hit the bound, stop quoting that side). A limit you can override under stress is not a limit.
  • Kill switches — automatic full-cancel + halt on: max drawdown, inventory breach, stale market data (heartbeat timeout), abnormal order-to-fill latency, or connectivity loss. On Kalshi, set cancel_order_on_pause; everywhere, know what happens to your resting orders when your process dies. Dead-man's-switch first, dashboard second.
  • Markout monitoring — your single most informative live metric (Ch. 5): price drift at +1s/+5s/+30s after your fills, by market, by side, by hour. Negative beyond half-spread = you're the exit liquidity; widen or leave.
  • Event discipline — a calendar of scheduled releases (macro prints, earnings) and a real-time jump detector for unscheduled ones; both trigger the same reflex: widen/pull, reprice, re-tighten. In sports this fires on every scoring event.
  • Fee accounting at trade granularity — the viability inequality (Ch. 7) audited daily. Many "profitable" MM books are profitable only before fees or only because of rebates; know which business you're actually in.

Kill switches feel abstract until you watch one work. The simulation below runs the same market twice — identical income, identical toxic episodes — once with no protection, once with an automatic drawdown halt. Slide the limit and watch the trade-off: too tight and you sit out good periods; too loose and a single toxic hour erases a month.

simulation — the kill switch at work
P&L — no kill switch0.00
P&L — with kill switch0.00
Max DD (none / with)
Halts triggered0
Both equity curves earn the same steady spread income and face the same toxic episodes (the shaded red bursts — informed flow, a trend, a stale feed). The dim red curve quotes through everything; the green curve halts when drawdown from its peak exceeds the limit (amber bands), waits out a cooldown, and resumes. The kill switch doesn't make money — it declines to lose it. Note what a very tight limit costs: constant halts forfeit income too. Risk management is a parameter, and this slider is the most important one you own.

The triple barrier: three exits, decided in advance

The kill switch protects the whole book; the triple barrier protects each position. The idea (popularized by López de Prado, and the risk backbone of the live crypto experiments in Chapter 17): the moment a position opens, three exits are armed — a take-profit price above, a stop-loss price below, and a time limit. Whichever the price path touches first closes the trade. No debate, no "let me watch it a bit longer" — the exit was chosen before the entry, which is the entire point.

interactive — the triple barrier
Hit take-profit
Hit stop-loss
Timed out
Avg exit P&L
Every run drops a fresh price path into the barrier box: green line above = take-profit, red line below = stop-loss, amber wall on the right = time limit. The path stops at whichever it touches first, and the tallies accumulate. Play with the geometry and feel the trade-offs: a tight stop with a far profit target exits red constantly but each loss is tiny; a far stop "wins" most runs while quietly betting the account on the rare deep loss. One empirical finding from the Chapter 17 lab worth internalizing: optimal spreads track volatility almost linearly, but optimal stop-loss and take-profit levels don't — tune the barriers per market, from data, not from a vol formula.

Sizing and capital

Size positions so the worst credible jump against a full inventory is an acceptable day, not an account event. In binaries the worst case is explicit: a full bound position moving to 0 or 1. In perps, include funding flips and liquidation cascades (JELLY, Ch. 11). Keep idle capital productive where the venue pays for it (Kalshi interest) but never let yield-seeking dictate position structure.

Regulatory hygiene

  • Kalshi: CFTC-regulated; cleanest US-legal path for event contracts.
  • Polymarket / Hyperliquid: smart-contract, oracle, and jurisdiction risk are part of the position. Self-custody discipline applies.
  • US equities: liquidity provision yes, dealer-like patterns at scale can trigger registration questions (Ch. 13). Know the line before approaching it.
  • Quoting conduct: spoofing/layering prohibitions apply to bots as to humans; your quoting logic should never place orders it intends not to honor.
The uncomfortable truthEvery market making disaster in this book — the Flash Crash stub quotes, JELLY, every blown-up grid bot — was an operations failure dressed as a math failure. The formulas in Chapter 6 take an afternoon to implement; the discipline in this chapter is the actual moat.

On this page

GitHubGitHub repository