Rasmus Suonio

A prediction-market lab: fast prices, little edge after fees

A simulated exchange, market maker and arbitrage engine, plus a working paper on 29,703 resolved Kalshi and Polymarket markets and a 13.9-hour live capture.

Done Nov 2026
Resolved markets studied
20,000 Kalshi, 9,703 Polymarket
Spot move priced within the minute
96% (Kalshi 15-minute crypto)
Replayed strategies on real data
All lose 5–6¢ a contract
Simulated market maker
+$167 an hour, 27 of 32 seeds
  • Python
  • NumPy
  • SciPy
  • JavaScript
Reliability diagrams for Kalshi and Polymarket 24 hours before close, with realised frequencies close to the market probabilities in every bin.

Prediction markets trade contracts that pay $1 if an event happens, so their prices read as probabilities. This project asks how good those probabilities are once real costs are counted, using a simulated exchange where the true probability is known and market data from Kalshi and Polymarket. It ends in a working paper on five questions: speed, calibration, short-term predictability, arbitrage and liquidity.

How it works #

  • A simulated exchange with one-cent ticks, Kalshi’s published fee formula, latency on every order, price-time queue priority and fully collateralised accounts. Each event’s true probability is known exactly, and every experimental arm faces the same information path.
  • A market maker that learns fair value only from public quotes and trades, through a Kalman filter in log-odds, and quotes around it with an Avellaneda–Stoikov rule.
  • An arbitrage engine that solves a linear program across related contracts (outcome sets, strike ladders, conjunctions) for the best worst-case profit after fees.
  • Real data, read-only. 20,000 resolved Kalshi markets, 9,703 resolved Polymarket markets and a 13.9-hour live capture of both venues on 13 November 2026, including 4.73 million Kalshi trades. Only public market-data endpoints were used, under conservative rate limits, and no order was ever placed.

What I found #

Question Answer
Speed In Kalshi’s 15-minute bitcoin and ether markets, about 65% of a large spot move shows up in the same second and 96% within the minute
Calibration 24 hours before close, Kalshi is mildly compressed towards 50% (slope 1.07, s.e. 0.04) and Polymarket mildly too extreme (0.93, s.e. 0.03)
Longshots Kalshi contracts under 5¢, bought at the ask, lose 72% after fees (95% CI 52% to 88%)
Predictability Order flow predicts the next 30 seconds (out-of-sample R² 1.5%), but the predictable move, 0.9¢, is smaller than the 1.6¢ cost of acting on it
Arbitrage On complete Kalshi outcome sets, after-fee arbitrage appears in under 1% of snapshots and is gone in about 14 seconds

None of this is tradable. Recalibration rules fitted on the earlier half of markets do not profit on the later half, and three strategies replayed through the live capture’s 15-minute crypto markets all lose 5–6¢ a contract.

Mean return to buying YES by price bucket, 24 hours before close, on Kalshi and Polymarket, with 95% intervals
Mean return to buying YES by price bucket, 24 hours before close, on Kalshi and Polymarket, with 95% intervals

The simulator suggests why the real markets look this clean. With nobody arbitraging, executable arbitrage exists in 99% of scans; a single linear-programming arbitrageur cuts that to 70% and the pricing error against the truth by 30%. Removing the automated market makers raises pricing error by 55%. In the model, market makers and arbitrageurs keep prices coherent.

Market-maker design (32 paired seeds). The default maker earns $167 per simulated hour (95% CI ±$59; profitable in 27 of 32 seeds). Its fair-value model is what earns it: swapping it for the external mid costs $135 an hour. Inventory skew and spread width change risk, not mean profit. A cross-market portfolio skew cost $245 an hour, so it is off by default.

Limits #

  • The tick-level evidence is one 13.9-hour recording, dominated by crypto and sports markets.
  • The speed study uses Coinbase spot, polled once a second, as a proxy, so sub-second lead-lag cannot be resolved.
  • Simulated agents are stylised, so the experiments speak to mechanisms, not to real-world profit levels. Most use eight seeds: enough for pricing error, not for P&L. At eight seeds the market-maker ablations suggested effects that 32 seeds did not confirm.
  • The market maker’s default parameters come from an informal sweep that is not part of the reproducible pipeline.

How it’s built #

A Python package with an order book, a discrete-event simulator, pricing, strategy, risk and backtest layers, and a local dashboard. Every simulation run is reproducible from its configuration and seed and writes a manifest with a code hash; the 32-seed suite reproduced the earlier suite’s 16 shared runs exactly. 25 tests cover matching, accounting conservation, pricing and replay. The raw data (about 2.8 GB) is not in the repository: the collectors rebuild the resolved-market datasets, but the live capture was a one-time recording.