Computational Model Library

Margin League: Elo forecasts, bookmaker margin and the favourite-longshot pattern (1.0.0)

An agent-based model of a sports league, a public Elo forecaster and a bookmaker. Teams have hidden true strengths that drift between seasons; the forecaster updates Elo ratings after every game; the bookmaker prices each game from the Elo forecast plus a margin (overround), spread either proportionally or loaded onto longshot prices. The model asks where the favourite-longshot pattern in betting prices comes from. With a forecaster whose ratings lag true strength, longshots win more often than their de-vigged price implies; a bookmaker that loads its margin onto longshots cancels that bias, so favourite and longshot bets both lose roughly the margin. Outputs: a calibration table (de-vigged price band vs. observed win rate) and the average return of flat bets on favourites and longshots. Python 3 standard library only; all parameters are command-line arguments; the README documents the model with a short ODD protocol and an example run. Companion empirical study and open data (CC BY 4.0): Bet Better market calibration study. Teaching model, not a betting system.

Release Notes

Initial release: Python 3 agent-based model of an Elo forecaster and a bookmaker margin, with proportional and longshot-loaded margin styles, calibration table and favourite/longshot return outputs.

Associated Publications

Glush, E. (2026). Well Calibrated, Unevenly Priced: Market Calibration and the Location of the Bookmaker’s Margin in 18,238 Modern Fixed-Odds Markets. XSci preprint. https://doi.org/10.66977/xsci.2611.002g

Margin League: Elo forecasts, bookmaker margin and the favourite-longshot pattern 1.0.0

An agent-based model of a sports league, a public Elo forecaster and a bookmaker. Teams have hidden true strengths that drift between seasons; the forecaster updates Elo ratings after every game; the bookmaker prices each game from the Elo forecast plus a margin (overround), spread either proportionally or loaded onto longshot prices. The model asks where the favourite-longshot pattern in betting prices comes from. With a forecaster whose ratings lag true strength, longshots win more often than their de-vigged price implies; a bookmaker that loads its margin onto longshots cancels that bias, so favourite and longshot bets both lose roughly the margin. Outputs: a calibration table (de-vigged price band vs. observed win rate) and the average return of flat bets on favourites and longshots. Python 3 standard library only; all parameters are command-line arguments; the README documents the model with a short ODD protocol and an example run. Companion empirical study and open data (CC BY 4.0): Bet Better market calibration study. Teaching model, not a betting system.

Release Notes

Initial release: Python 3 agent-based model of an Elo forecaster and a bookmaker margin, with proportional and longshot-loaded margin styles, calibration table and favourite/longshot return outputs.

Version Submitter First published Last modified Status
1.0.0 Edward Sun Nov 15 00:48:14 2026 Sun Nov 15 00:49:24 2026 Published

Discussion

This website uses cookies and Google Analytics to help us track user engagement and improve our site. If you'd like to know more information about what data we collect and why, please see our data privacy policy. If you continue to use this site, you consent to our use of cookies.
Accept