Repository navigation
feat(ml): dixon-coles model and walk-forward backtest vs closing odds - #15
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Phase 1 (milestone M2):
models/dixon_coles.py): the Poisson attack/defence model plus the low-score correction (rho, fitted by maximum likelihood with the ratings) and exponential time decay.python -m subspot_ml.backtest): before each Tuesday-to-Monday matchweek, every model is refitted on the previous two years of matches played strictly before that week. Scores the Poisson baseline, Dixon-Coles, and de-margined Pinnacle closing odds by log loss and Brier score, per season and overall, plus a calibration table. The command downloads the CSVs into the gitignoredml/data/raw/and rewrites the marked block in the README.football-data.co.ukhost (thewww.host now redirects).Closes #1
Closes #2
Why
The Phase 1 roadmap item: a stronger classical baseline, and an honest, leak-free comparison against the sharpest public forecast. Later models (the PyTorch model in Phase 3) have to beat these numbers.
Design choices
Results
Dixon-Coles beats Poisson overall but loses narrowly in 2021-22 and 2023-24. The closing odds beat both models in every season. Brier scores and calibration are in the README.
How it was tested
ruff checkandruff format --checkclean