Building prediction market models
- Published
- Updated
- Topic
- Prediction Markets
- Reading time
- 6 min read
Prediction-market models: reading prices as probabilities, starting from base rates, checking calibration and sizing an edge after fees.
Prediction markets let people trade contracts on whether an event will happen: an election result, an economic figure, the outcome of a match. A contract typically pays 1 if the event happens and 0 if it does not, so its price can be read as the market's probability.
Building a model that can sometimes disagree with that probability, and be right, is a very different task from forecasting prices. This guide walks through the process: reading prices correctly, choosing what to model, measuring calibration and deciding whether an apparent edge survives costs.
Prices are probabilities, roughly
A contract trading at 0.62 implies a probability of about 62%. Several things make the reading less exact:
- The spread. If the bid is 0.60 and the ask is 0.64, buying costs 0.64. Your model has to beat the price you can actually trade, not the mid.
- Fees. Trading and settlement fees vary by venue and must be added to the cost of every trade.
- Overround. The prices of all outcomes in a market can add up to slightly more than 1, which builds in a margin for the other side.
- Favourite–longshot bias. In betting markets, unlikely outcomes have historically been overpriced and likely ones slightly underpriced. Similar patterns have been reported in prediction markets. A 0.03 contract may imply a 3% chance when the true chance is lower.
- Time value. Capital tied up in a contract that resolves in a year earns nothing in the meantime, so long-dated prices can drift away from pure probabilities.
Start with the question
Most failed prediction models fail on definition, not on mathematics. Before collecting any data:
- Read the resolution rules exactly. "Will X win?" may resolve on a specific source, a specific date or an official certification. Edge cases in the rules cause more surprises than model errors.
- Find the base rate. How often have events like this happened historically? Incumbents winning, a central bank holding rates, a home team winning. The base rate is a strong starting point, and many models barely beat it.
- List the information the market already has. If a variable is widely known and reported, the price probably reflects it. Edge more often comes from combining public information better, or updating faster, than from information nobody else has.
Choose a model the data can support
Event data is usually small: dozens of elections, a few thousand matches. Simple models with sensible structure usually beat complex ones.
- Logistic regression is a strong default for binary outcomes, and its coefficients are easy to inspect.
- Rating systems such as Elo work well for repeated contests between teams or players.
- Poll aggregation for elections weights polls by sample size, recency and each pollster's historical accuracy, then adds uncertainty for the systematic polling error that affects all polls together.
- Gradient-boosted trees can help when there is enough data, but they overfit small samples easily.
Whatever the model, keep a strict time order: train only on events that resolved before the ones you test on. The overfitting checklist applies here too.
Calibration matters more than accuracy
A forecaster who says 70% should be right about 70% of the time across all their 70% forecasts. This is calibration, and for trading it matters more than raw accuracy, because a mis-calibrated model will find "edge" everywhere.
Two standard scores measure probabilistic forecasts:
import numpy as np
def brier_score(p, outcome):
"""Mean squared error of probabilities against 0/1 outcomes. Lower is better; 0.25 is a coin flip at 50%."""
p, outcome = np.asarray(p), np.asarray(outcome)
return np.mean((p - outcome) ** 2)
def log_loss(p, outcome, eps=1e-12):
"""Penalises confident wrong forecasts heavily. Lower is better."""
p = np.clip(np.asarray(p), eps, 1 - eps)
outcome = np.asarray(outcome)
return -np.mean(outcome * np.log(p) + (1 - outcome) * np.log(1 - p))
To check calibration, group forecasts into bins (0–10%, 10–20% and so on) and compare the average forecast in each bin with the share of events that actually happened. Plotted, this is a reliability diagram: a well-calibrated model sits close to the diagonal.
def calibration_table(p, outcome, bins=10):
p, outcome = np.asarray(p), np.asarray(outcome)
edges = np.linspace(0, 1, bins + 1)
idx = np.clip(np.digitize(p, edges) - 1, 0, bins - 1)
return [(edges[i], edges[i + 1], p[idx == i].mean(), outcome[idx == i].mean(), (idx == i).sum())
for i in range(bins) if (idx == i).any()]
The most useful benchmark is the market itself. Score the market's own prices on the same historical events. If your model's Brier score is not clearly better than the market's, it has no demonstrated edge, however reasonable it looks.
From probability to a trade
Suppose your model says an event has a 70% chance and the contract's ask is 0.62. The expected profit per contract is 0.70 − 0.62 = 0.08 before fees. Whether that is worth acting on depends on:
- Fees and spread. Subtract them first.
- Model uncertainty. If your calibration analysis shows errors of ±5 points in this range, an 8-point gap is thin.
- Correlation. Several contracts on one election, or one team's games, are not independent bets.
For sizing, the Kelly fraction for buying a contract at price c that you believe has probability p is:
f* = (p − c) / (1 − c)
For p = 0.70 and c = 0.62, that is 0.08 / 0.38 ≈ 21% of capital. That is a very large position on a single estimate, which is why fractional Kelly and position caps are essential here. Our guide to Kelly sizing explains why overestimating your edge is far more costly than underestimating it.
Keep the model honest after launch
- Log every forecast with its timestamp before the outcome is known, and score it after resolution. This is the only track record that cannot be accidentally rewritten.
- Recalibrate on a schedule as new events resolve, and watch whether calibration drifts.
- Compare against the closing price. If your forecasts are consistently closer to the final market price than the price was when you traded, you are probably moving ahead of the market. If not, the market may be learning faster than your model.
Legal and practical notes
Prediction markets are regulated very differently around the world. Some venues are licensed exchanges in particular countries, others restrict users by location, and in some places trading event contracts is not permitted at all. Check that a venue is legal where you live before using it, and read its rules on fees, limits and how disputed outcomes are resolved.
Summary
A prediction-market model starts with an exact reading of the question and its resolution rules, builds from base rates, uses models that small datasets can support and is judged on calibration against the market's own prices. Only an edge that survives spread, fees, uncertainty and correlation is worth trading, and it should be sized with a fraction of Kelly.
This article is for education only and is not investment or betting advice.