Forecast evaluation · Python
On a synthetic sample of 48 contracts, model and market score within noise of each other
kalshibot turns Fed Funds futures into a probability for each Kalshi Fed-rate contract. This page scores those probabilities against the market mid at least 7 days before each contract settled, then follows the paper trades.
Synthetic sample (seed 7), not real results48 settled contracts, 2025-01-29 to 2025-12-10Scored ≥ 7 days before settlementPaper trading only
Both 95 % intervals cross zero
Model − market · lower favors the model · n = 48 contracts
Is each forecaster calibrated?
With 48 contracts, the calibration diagram is mostly noise
In 9 of 10 bins across both forecasters, the mean forecast falls inside the 95 % interval of what happened. The intervals are too wide to rank the two forecasters; the score differences above are the better test.
Observed YES rate per forecast bin
5 equal-width bins · n per bin shown as model / market · 95 % Wilson CI
Small n. Each bin holds 1–18 contracts, so its 95 % interval is 0.24–0.79 wide. Read differences between bins as noise.
Does the strategy make money after fees?
Paper trading made $78.70 after fees over 102 fills on the synthetic sample
Fees took $22.53 of the $101.23 earned before fees. The worst fall from a peak was $73.86, reached at the 2025-06-18 settlement.
Cumulative P&L after and before fees
USD · 102 fills over 8 settlement dates
Synthetic sample (seed 7), not real results. make_sample.py adds noise to a known true probability and logs a fill only when the model's edge passes a threshold, so this P&L is set by the generator. It shows the accounting works, not that the strategy makes money.
Do bigger edges earn more?
Realized returns are too noisy at this sample size to confirm the edge
Mean edge after fees was 7.4 ¢ per contract; mean realized P&L was 4.9 ¢ over 102 fills. Each contract pays 100 ¢ or 0, so single fills swing widely and only bin means carry signal.
Mean realized P&L by model edge bin
Cents per contract · 102 fills · 95 % CI of the bin mean
Where did the model and market disagree?
The model sat 4.9 ¢ from the market mid on average across 48 contracts
Pick a contract to see where the two split and how it settled.
Model and market mid over the logged cycles
Probability of YES · band shows bid to ask
Methodology
How this was scored
Each settled contract is scored once, on the last logged cycle that has both a model price and an order book and falls at least 7 days before settlement. Scoring the final cycle would reward whoever is closest to certain minutes before the decision.
The market's forecast is the mid of the best bid and ask at that cycle. Paper fills pay 100 ¢ per contract on YES and nothing on NO, minus the price and Kalshi's taker fee.
- Brier score
- Mean squared error of the probability; 0 is perfect.
- Log loss
- Mean negative log-likelihood of the outcome; punishes confident misses hardest.
- Bootstrap interval
- 2,000 resamples of contracts with replacement, seed 1; 2.5th to 97.5th percentile.
- Wilson interval
- 95 % binomial interval for the YES rate in a bin.
What this shows
- The pipeline logs prices, scores model and market on the same contracts, and accounts for fees end to end.
- On these 48 contracts, how far apart the two forecasters' scores are, with uncertainty.
What it doesn't show
- Real performance: every price and outcome here is synthetic.
- An edge: the P&L depends on how the fills were generated, and the bins are too small to confirm the model's edge.
- Calibration at this n: bins hold too few contracts to judge.
Reproduce
Run it yourself
git clone https://github.com/allenwang0/kalshibot.git && cd kalshibot
uv sync
uv run python scripts/make_sample.py --db sample.db --seed 7
uv run python scripts/evaluate.py --db sample.db --html docs/report/index.html| Field | Value |
|---|---|
| Data | Synthetic sample (seed 7), not real results |
| Settled contracts | 48, 2025-01-29 to 2025-12-10 |
| Cycles logged | 4,032 |
| Scoring horizon | ≥ 7 days before settlement |
| Bootstrap | 2,000 resamples, seed 1 |
| Python | 3.12.16 |
| Commit | 388c188 |