All projects

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

Drawing of a basketball arcing toward a hoop, with a short bar beside a tall one
Overview

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.

System

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.

01 · In-sample effect

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.

How often underdogs won against what their price implied · by price, about 7.5 hours before tip-off · 615 games, late November 2025 – February 2026
Grouped bar chart by underdog price band comparing the chance implied by the price with how often the underdog actually won. At 10 to 20 cents: 16.0 percent implied, 20.8 percent won. At 20 to 30 cents: 25.7 against 30.9. At 30 to 40 cents: 35.8 against 41.5. At 40 to 50 cents the two are equal at about 45 percent.

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.

02 · Out-of-sample test

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.

All figures are backtests at the last traded price, with a 5% fee on each stake. “Compounded” uses the final bet-sizing rule from a $300 start. The last row is from a later follow-up study on the full season.
GamesPeriodTradesWonReturn on stakeCompounded
Games seen by the optimizersNov 25, 2025 – Feb 5, 202637035.9%+26.3%$300 → $10,103
The next three weeks, not seen by any searchFeb 6 – 28, 20269726.8%−13.1%$300 → $103
Broader underdog rule over the rest of the seasonMar 1 – season end28525.3%−20.0%–
Return on stake by month for the final rule · flat $100 stakes, 5% fee · backtest
Bar chart of return on stake by month for the final rule: plus 43.3 percent in November 2025 on 16 trades, plus 40.4 percent in December on 151 trades, plus 16.3 percent in January 2026 on 173 trades, and minus 8.9 percent in February on 127 trades.

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.

03 · Error analysis

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.