In one sentence
Two prices are cointegrated when each wanders on its own but the gap between them stays anchored, so a pairs trade backs the cheap one and lays the dear one when the gap stretches, and closes when it snaps back.
How it works
Some Betfair markets are tied together by the football itself. If a match is expected to be high-scoring, Over 2.5 goals and Both Teams to Score (BTTS) both shorten; if it looks tight, both drift. The two prices move around, but the relationship between them is fairly stable.
In finance, cointegration means two series that individually drift can be combined into a spread that keeps returning to an average. On the exchange you estimate a hedge ratio (how much one price moves per unit move in the other), build a spread, and measure how far it currently sits from normal in standard deviations, called a z-score.
When the z-score is large, one leg has moved without the other following. Often it is because money has hit one market and not yet reached the linked one. The trade backs the relatively cheap leg, lays the relatively expensive one and waits for the gap to close.
The maths
- pᴬ and pᴮ: implied probabilities of the two linked selections (here Over 2.5 and BTTS Yes).
- β: the hedge ratio, estimated by regressing one on the other across many past matches.
- Sₜ: the spread between them.
- μ and σ with subscript S: the spread's usual average and standard deviation.
- zₜ: how many standard deviations the spread is from normal.
In plain English: work out how one price usually relates to the other, then trade when today's gap is unusually big.
Worked betting example
From past Premier League matches (illustrative figures) you estimate β = 1.05, a normal spread of −0.020 and a standard deviation of 0.012.
- Current prices. Over 2.5 at 1.96 (51.02%); BTTS Yes at 1.89 (52.91%).
- Spread. 0.5102 − 1.05 × 0.5291 = 0.5102 − 0.5556 ≈ −0.0454.
- z-score. (−0.0454 + 0.020) ÷ 0.012 ≈ −2.1. Over 2.5 looks cheap relative to BTTS.
- Position. Back Over 2.5 for £50 at 1.96 and lay BTTS Yes for £52.50 (50 × β) at 1.89.
- If the gap closes. Over 2.5 shortens to 1.89 while BTTS stays at 1.89; the z-score is back to about −0.5. Lay Over for £51.85 (50 × 1.96 ÷ 1.89) to lock +£1.85 in that market, about £1.81 after 2% commission. Back BTTS for £52.50 at 1.89 to close that leg for £0.
- Why you must close. Held to full time the legs do not cancel. Before commission, a 3-0 pays +£48.00 on Over and +£52.50 on BTTS, +£100.50. A 1-1 loses £50.00 on Over and £46.73 on BTTS, minus £96.73. The pairs trade is only low-risk while you trade out of it.
Where it's good
- Linked goal markets in one match: Over/Under, BTTS, correct score, total goals.
- Win and place markets on the same horse, where the place price usually follows the win price.
- Match odds against Asian handicap or draw-no-bet equivalents.
- Cases where one market leads and the other lags.
Limitations and pitfalls
- Betfair markets end. The relationship holds only until events happen: a goal or red card changes it instantly, and in-play the "normal" spread moves continuously.
- Formal cointegration tests assume long, open-ended series; within a single pre-match market you really have a relative-value model, not proven cointegration.
- The hedge ratio drifts between leagues, seasons and team styles. A ratio from the Premier League may be wrong for the Championship.
- Commission applies to each market's net winnings separately, so a small gain in one market does not offset a loss in another before commission.
- Large z-scores sometimes mean the lagging market knows something (team news affecting one type of bet), not that it is wrong.
- Held to settlement, the position can carry big two-way risk, as the example shows.
How to build it
- statsmodels OLS for the hedge ratio and coint or adfuller for testing on longer series; pandas for spreads and z-scores.
- Data: synchronised price snapshots for both markets across many matches, from Betfair historical data.
- Practical tip: estimate β and the spread's normal range by league and by time-to-kick-off, then test the rule on a later season before trusting it.
Related methods
- Mean reversion – the single-price version of the same idea.
- Arbitrage – the risk-free extreme, when linked prices cross outright.
- Back-lay hedging – the mechanics of closing each leg.
- Independence and correlation – why the two markets move together.
- Linear regression – how the hedge ratio is estimated.