Build an NFL Elo Forecasting Model From Scratch
Learn how modern sports rating systems are built, improved and evaluated through a complete Python modelling series. Starting with a simple Elo rating system, we progressively add home advantage, margin of victory, seasonal carryover, probability forecasting and model evaluation.
Use the Finished Model
Not everyone wants to write Python code. If you are mainly interested in exploring the finished model outputs, you can use the SharpModels NFL ratings, matchup pages and team pages directly.
Explore current NFL Elo-style ratings and compare team strength across the league.
NFL Matchups Explore upcoming game forecastsSee modelled win probabilities and matchup views for upcoming NFL games.
Team Pages Follow teams through timeView team-level ratings, historical trends and model outputs for individual franchises.
What This Series Teaches
This series is for readers who want to understand how sports forecasting models are built from first principles. It does not assume previous knowledge of Elo, probability modelling or machine learning.
The focus is not simply on copying code. Each article explains the modelling decision being made, why that decision matters, and how it affects the behaviour of the rating system.
```"The goal is not just to build an Elo model. The goal is to understand how forecasting models are built."
What You Will Build
By the end of the series, you will have built a complete NFL Elo forecasting framework in Python.
- A baseline Elo rating system built from historical results.
- Team rating histories and visual validation charts.
- Home advantage, margin of victory and seasonal carryover adjustments.
- Win probabilities generated from Elo rating differences.
- Forecast evaluation using log loss, Brier score, accuracy and calibration.
The Roadmap
Install the required Python libraries and download the NFL data files.
Article 1 Building A Clean NFL Elo Rating Model From ResultsBuild the simplest possible Elo model and learn how ratings update after every game.
Article 2 Visualising NFL Elo Ratings Through TimeValidate the baseline model by inspecting long-term team rating histories.
Article 3 Adding Home Advantage To NFL Elo RatingsMeasure and incorporate the effect of playing at home.
Article 4 Adding Margin Of Victory To NFL Elo RatingsUse score margin as additional evidence without making the model unstable.
Article 5 Adding Seasonal Carryover To NFL Elo RatingsReduce confidence in older evidence as teams change between seasons.
Article 6 Interpreting NFL Elo Rating DifferencesUnderstand what rating gaps mean by comparing them with historical outcomes.
Article 7 Turning NFL Elo Ratings Into Win ProbabilitiesConvert Elo differences into practical pre-game win probabilities.
Article 8 Evaluating NFL Elo Win ProbabilitiesEvaluate the completed forecasting model using proper probability metrics.
Who This Series Is For
Learn how ratings evolve and why modelled team strength can differ from league tables or records.
Follow practical Python examples using Polars and Matplotlib, with every modelling step explained.
Explore probability modelling, calibration, evaluation metrics and interpretable model design.
Before You Start
- No previous Elo knowledge is required.
- Basic Python experience is helpful.
- No machine learning libraries are required.
- Every modelling decision is explained before it is implemented.
If you want to run the code locally, begin with the setup guide. If you only want to understand the modelling ideas, you can start directly with Article 1.