22 / Ventures & FinancePrediction Market
NBA Underdog Pricing Backtest
A test of whether NBA underdogs are underpriced on a prediction market: a backtest, an optimizer and an out-of-sample check
- 930NBA games of trade data collected and turned into one-minute candles
- 2,045Bayesian-optimization evaluations across three searches
- +26.3%Return on stake on the games the optimizer saw
- −13.1%Return on the next three weeks, which it had not seen
Underdog pricing hypothesis
On Kalshi, a regulated US prediction exchange, each NBA game has a contract on the winner whose price is the crowd’s probability. The rule I tested: several hours before tip-off, buy whichever team is the underdog if its price falls in a set range, and hold until the game ends.
The starting rule was someone else’s idea, which I set out to replicate and then improve. I built the data pipeline, two backtest engines, a set of dashboards and an optimizer around it.
The optimized rule turned $300 into $10,000 in the backtest. On three weeks of new games, the same rule lost money. The edge had been one short stretch of the season, found by repeatedly searching the same data. This page documents the work and the errors in it.
Backtests only. The split between seen and unseen games, and the check that reproduced my optimizer results to the cent, come from a later review of the project’s saved files.
Backtesting tools
- Data
Full trade tape for 930 games
A downloader that paged through every public trade in NBA game-winner markets from October 2025 to February 2026 and resampled them into one-minute price candles.
- Backtesting
Two reconciled backtest engines
Two independently written backtesters, compared trade by trade until every difference was explained: date filters, time tolerance and how the payout was taken.
- Dashboards
13 interactive dashboards
Streamlit and Plotly tools for exploring price bands, entry time, profit-taking and five bet-sizing schemes, each with sliders and live charts.
- Optimization
Bayesian search and Monte Carlo
Three Bayesian-optimization searches (2,045 evaluations) over the rule and its sizing, with every evaluation logged, then shuffle Monte Carlo to stress the bet sizes.
Underdog calibration by price band
The hypothesis had support in the data. About seven and a half hours before tip-off, underdogs priced between 10 and 40 cents won about five percentage points more often than their price implied. That is enough to beat the exchange’s fee, and it passes a test against pure chance. Almost all of it came from away teams: away underdogs won 36.1% of the time against an implied 29.6%, while home underdogs were priced about right.
Including the first weeks of the season, which a minimum-games filter had excluded, the gap shrinks to about two or three points. The filter had selected the strongest stretch.
Out-of-sample results
At the end of the project I downloaded three more weeks of games. No optimizer had seen them. Applying the final rule to them unchanged is the closest thing this project has to an out-of-sample test.
| Games | Period | Trades | Won | Return on stake | Compounded |
|---|---|---|---|---|---|
| Games seen by the optimizers | Nov 25, 2025 – Feb 5, 2026 | 370 | 35.9% | +26.3% | $300 → $10,103 |
| The next three weeks, not seen by any search | Feb 6 – 28, 2026 | 97 | 26.8% | −13.1% | $300 → $103 |
| Broader underdog rule over the rest of the season | Mar 1 – season end | 285 | 25.3% | −20.0% | – |
The return had been falling every month. In February underdogs won at almost exactly their price (26.8% against an average price of 27.2¢), so the fee alone made the rule unprofitable. Three weeks is a small sample, and on its own it would not prove the edge was gone. A follow-up study on the rest of the season pointed the same way.
Methodology errors
- No hold-out
Tuning on the full data set
More than 2,000 optimizer evaluations, plus manual searching with sliders, all on the same ten weeks of games. Nothing was set aside to check the result.
- Units bug
Price-band unit mismatch
The searches read the away-team price band in one unit and the dashboards in another. The optimizer’s best “away underdog” trades were away favourites at 55 to 89¢, so the final rule was never optimized as it was used.
- Monte Carlo
Shuffle Monte Carlo limitation
Reordering the same realized trades reported a 0% chance of ruin. Shuffling only tests the order of the wins, not whether the win rate itself was luck. The rule lost money the following month.
- Sizing
Leverage on an unvalidated edge
Kelly fractions, stake divisors and circuit breakers multiplied an edge that had not been validated. The Kelly multiplier ended pinned at the top of its allowed range, which is a warning sign.
Conclusion. There is no reliable evidence of an edge. A real but short-lived mispricing, selected by an in-sample search and then multiplied by aggressive bet sizing, explains both the backtest result and the loss that followed. Some things held up: the two engines agreed, the fee assumption matched the exchange’s real formula at these prices, and the logged optimizer runs were what made the units bug findable.
Every figure is a backtest on historical prices. Past performance does not predict future results. Nothing here is investment advice.