NFL Nostradamus

An NFL prediction system that uses 20 seasons of play-by-play data to pick game winners at 63.7% accuracy and predict point spreads. Tracks predictions and performance on an interactive dashboard with automated weekly updates during the season.

NFL Nostradamus

Nostradamus is a personal project built around a simple question: can a machine learning model predict NFL game outcomes better than common-sense baselines? The answer is yes, but not by as much as you might hope.

The system ingests 20 seasons of NFL play-by-play data (2005 through 2024) and engineers 17 game-level features. These include rolling offensive and defensive efficiency, turnover trends, point differentials, and situational factors like rest days and divisional rivalry. All features are built with strict temporal boundaries to prevent data leakage, meaning the model only knows what was knowable before each game was played.

Two XGBoost models power the predictions. The Pick-Em model predicts game winners at 63.7% accuracy on out-of-sample data, beating both the "always pick the home team" baseline (55.5%) and the "always pick the team with the better record" baseline (58.2%). The Spread model predicts point margins with a mean absolute error of about 10 points. Both models were developed through a structured experiment loop: training candidates, evaluating against baselines, and only keeping models that showed meaningful improvement.

The interactive dashboard shows weekly predictions before games are played, then tracks how those predictions held up once results come in. The Accuracy page breaks down model performance by week and compares how often the two models agree or disagree on winners. The History page gives you a game-by-game record with color-coded spread accuracy, green when the prediction landed within a field goal and red when it missed badly.

Behind the scenes, an automated pipeline refreshes data and generates new predictions each week during the NFL season. Candidate models are staged for manual review before going live. That's a deliberate choice to keep a human in the loop before predictions get published.

The project is fully open source and deployed at nostradamus.silverreyes.net.