RRebetiAll guides

How to Backtest a Prediction Market Strategy

Updated

Backtesting replays a trading rule against historical prices to see how it would have performed. For prediction markets on Kalshi and Polymarket, it's the fastest and cheapest way to throw away bad ideas before they cost real money — and, done carelessly, the fastest way to fall in love with a strategy that only worked by luck.

This guide walks through what a prediction market backtest needs, how to run one step by step, which metrics to read (and in what order), and the traps that make a backtest lie. Every chart below is a real Rebeti backtest component, fed with an illustrative sample run.

Why prediction markets are well suited to backtesting

Prediction market contracts have a property most assets don't: they settle to exactly $1 or $0. There's no ambiguity about the final value, and the price itself reads as a probability. That makes two things easy to measure that are hard elsewhere:

  • Whether you won — every trade has a clean binary outcome.
  • Whether the price was wrong — if contracts you bought at 20¢ won 28% of the time, the market underpriced them by 8 points.

The catch is data. Many markets are short-lived and thinly traded, so you need price history at a fine resolution (minutes, not days) and you need to know whether anyone was actually selling at the price your rule wanted.

What you need before you start

Data

  • —Price history at minute-level resolution
  • —Bid/ask, not just last trade, where possible
  • —Event start and market close times
  • —Settlement outcome for every market

Rule

  • —Exact entry condition (band, dip, filter)
  • —Timing window relative to start or close
  • —Sizing and allocation caps
  • —The same code your live trader runs

Costs

  • —Exchange fees (e.g. Kalshi taker fee)
  • —Spread you pay crossing the book
  • —Stale-price and no-fill handling
  • —Starting bankroll and loss limits

One engine for replay and live

A backtest that uses different logic from your live bot tells you about a strategy you aren't running. Rebeti replays history through the same pipeline as the live auto-trader, so the trades you see in a backtest are the trades the rule would actually place.

How to backtest a prediction market strategy, step by step

  1. 1

    Write the hypothesis in one sentence

    "ATP underdogs priced 10¢–25¢ within 12 hours of the match win more often than their price implies." If you can't say it in a sentence, you can't test it cleanly.

  2. 2

    Pick a category and venue

    Scope the test to one league, tour, election type or weather city on one venue. Mixing categories averages away the pattern you're looking for.

  3. 3

    Define the entry exactly

    Price band or dip size, which side (YES or NO), and the timing window. Decide this before you look at results.

  4. 4

    Set realistic costs

    Include exchange fees, require a fresh price at entry, and size orders so they'd plausibly fill in that market's book.

  5. 5

    Choose the period

    30 days is a sensible first window; 90+ days is better when data allows. Hold back the most recent stretch to re-test on later.

  6. 6

    Run it, then read the metrics in order

    Sample size first, then win rate vs. break-even, then profit factor and drawdown, then calibration by price bucket.

Reading the results

Here's the headline summary of a sample 30-day backtest of an ATP underdog band rule:

Sample backtest · 30 days · ATP underdog bandsample data
96
Trades
35.4%
Win rate
35.0%
Break-even win rate
+10.9%
Return
1.17
Profit factor
34¢
Avg entry
18.8%
Max drawdown
$45
Fees paid
Headline metrics from an illustrative 30-day replay: 96 trades at $10 each from a $1,000 paper bankroll, Kalshi taker fees included.

Read these in a specific order, because each one only matters if the one before it holds up.

1. Trade count

A handful of trades proves nothing. Underdog rules in particular have high variance — a strategy that wins 20% of the time can easily lose 15 in a row. As a rough guide, treat anything under 30 settled trades as anecdote, and want 100+ before you trust a thin edge.

2. Win rate vs. break-even win rate

This is the single most important comparison in prediction market backtesting. If you buy at 40¢, you need to win more than 40% of the time just to break even — more once fees are included. The gap between your win rate and that break-even line is your real edge. Try it:

Try it — break-even win rate calculatorsample data
Entry price30¢
Backtest win rate34%
31.5%
Break-even
+2.5 pts
Edge
+$8.04
EV per $100
Break-even win rate = entry price + fee per contract. Your backtest's win rate has to clear this line, by a margin the sample size can support.

Fees hit hardest near 50¢

Kalshi's taker fee scales with p × (1 − p), so it's largest for contracts near 50¢ and smallest near the extremes. A two-point edge on 50¢ contracts can be mostly eaten by fees; the same edge on 15¢ contracts survives. Compare venues in Kalshi vs. Polymarket fees.

3. Profit factor and drawdown

Profit factor is gross profit divided by gross loss — how many dollars you win per dollar you lose. Above 1.0 is profitable; 1.2–1.5 is a solid result for a realistic rule; anything above 3 on a small sample usually means luck or a bug.

Max drawdown is the deepest fall from a running peak. It tells you how much pain you'd sit through to earn the return, and it's the number that decides your size scale.

Backtest charts from the Rebeti appsample data

Equity curve

Cash balance over simulated time. Dashed line is the starting bankroll ($1000); the balance drops when stake and fee leave the account and rises again at settlement.

Drawdown

How far below its running peak the balance sat, in percent. Deepest point: 18.8% ($211.79).

Equity and drawdown for the same sample run. Cash dips when a stake leaves the account and returns at settlement, so even a profitable rule spends time underwater.

4. Calibration by entry price

A calibration chart splits trades by entry price and compares the realized win rate in each bucket with the win rate the price implied. Buckets where the bar clears the line are where the edge lives. Buckets where it doesn't are candidates to cut from your band.

Backtest charts from the Rebeti appsample data

Calibration by entry price

Realized win rate against the win rate the entry price implied. Bars above the line mean the market underpriced the side we bought — that is where the edge would come from.

Where the edge lives: in the cheaper buckets, realized win rate beats the rate the entry price implied. In the 30–40¢ bucket it doesn't — a candidate to cut from the band.

5. Shape of the returns

Finally, look at how the strategy makes money. A cheap-underdog rule loses small and often and wins big and rarely — most trades are −100%, and the profit comes from the long right tail. That's fine, but it means a few missing winners would flip the result, so it needs a bigger sample than a favourite rule.

Backtest charts from the Rebeti appsample data

Per-trade return distribution

How many settled trades fell into each return-on-stake band. A profit built on one huge outlier looks very different here from a profit built on many small wins.

Daily P&L and cumulative P&L

Bars are settled P&L booked on each UTC day; the line is the running total. Green bars are profitable days.

Underdog rules lose small and often and win big and rarely. Most trades land in the −100% bar; the profit comes from the long right tail and lumpy winning days.

Is the edge real, or just luck?

Here's the uncomfortable part. Below are eight backtests of exactly the same rule with exactly the same true edge — win probability set three points above the entry price. The only thing that changes between them is the random sequence of outcomes:

Try it — same edge, eight different monthssample data

Equity curve

Cash balance over simulated time. Dashed line is the starting bankroll ($1000); the balance drops when stake and fee leave the account and rises again at settlement.

Every run uses the identical rule and the identical true edge (win probability 3 points above the price). Only the coin flips differ. Click a run to see its equity curve.

Same strategy, returns from strongly negative to strongly positive. Over 96 trades, a real but thin edge loses money in a large share of months. That's why one good backtest is never enough:

  • Test across multiple periods, not one window you happened to pick.
  • Look at the t-stat or confidence interval on per-trade return. Rebeti's backtest report shows both; a t-stat under 2, or an interval that straddles zero, means you can't tell the result from noise.
  • Prefer simple rules. A band with two numbers is far less likely to be overfit than a rule with eight tuned thresholds.

Common backtesting traps

Look-ahead bias

  • —Using information not available at entry time
  • —e.g. filtering on final volume, or a lineup announced later
  • —Fix: only use data timestamped before the entry tick

Ignoring liquidity

  • —A fill at 12¢ means nothing if nobody sold at 12¢
  • —Last-trade prices hide wide spreads
  • —Fix: require a fresh quote; size small vs. depth

Overfitting

  • —Tuning a rule until last month looks perfect
  • —More parameters = more ways to fit noise
  • —Fix: fix the rule first, then test out of sample

Two more worth knowing: survivorship bias (testing only markets that still exist or that settled cleanly, ignoring voided ones) and ignoring time-of-day effects (a rule that fires at 3 a.m. into an empty book will fill very differently live than in a replay).

From backtest to live

A backtest is a filter, not a green light. A sensible pipeline is:

  1. Backtest across 90+ days and more than one period. Discard anything that doesn't clear break-even with a reasonable sample.
  2. Paper trade the survivors on live prices for a few weeks. Compare paper fills and win rate against the backtest — big gaps usually mean liquidity or timing assumptions were wrong.
  3. Go live small, with a daily loss limit and kill switch set, and scale up only as the live sample agrees with paper.

Backtesting with Rebeti

Rebeti lets you backtest any strategy you can build in its no-code strategy builder — tennis, NBA, NFL, esports, elections or weather — against stored historical prices, with venue fees, stale-price checks, allocation caps and loss limits included. The report shows every metric on this page, plus a parity check comparing replayed trades against what the live prediction market trading bot actually did.

Try a backtest →

Frequently asked questions

How do you backtest a prediction market strategy?

+

Collect minute-level historical prices and settlement outcomes for the markets in scope, define the entry rule exactly (price band or dip, contract side, timing window), include fees and realistic fills, replay the rule over a period of at least 30–90 days, then compare the win rate with the break-even win rate implied by your average entry price.

What is a break-even win rate in prediction markets?

+

It's the share of trades you need to win to not lose money. For a binary contract it equals the entry price plus fees per contract — buying at 40¢ with a 1.7¢ fee means you need to win about 41.7% of trades to break even.

How many trades do I need for a reliable backtest?

+

Fewer than 30 settled trades is anecdotal. For a thin edge, aim for 100 or more and test more than one time period. Cheap-underdog strategies need larger samples than favourite strategies because their results are driven by a small number of big wins.

Can I backtest Kalshi and Polymarket strategies without coding?

+

Yes. Tools like Rebeti let you build a rule from menus and replay it against stored Kalshi and Polymarket price history, with fees and risk limits included, without writing any code.

What is look-ahead bias in backtesting?

+

Look-ahead bias is using information in a backtest that wasn't available at the moment the trade would have been placed — for example, filtering markets by their final trading volume. It makes results look better than anything achievable live.

Is backtesting enough before trading live?

+

No. A backtest shows how a rule would have performed historically. Paper trading the rule on live prices for a few weeks checks whether liquidity, fills and the edge still hold today before any real money is at risk.