Skip to content

About

Goal prediction for League One and League Two football matches.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goal Prediction

This repository presents the development and evaluation of Poisson-based models for predicting total goals in League One and League Two matches. It focuses on probabilistic modelling, calibration analysis, and walk-forward backtesting within a structured and reproducible framework. The project separates core modelling logic, backtesting, feature engineering, and iterative model evaluation.

Repository Structure and Key Components

The table below summarises the primary components of the project and their roles within the modelling pipeline.

Component Location Description
Modelling Framework src/model/ Implementation of Poisson model specifications, calibration assessment, and supporting functions (e.g., data splitting).
Backtesting Framework src/backtest/ Walk-forward backtesting pipeline generating season-by-season predictions.
Data Preprocessing & Feature Engineering notebooks/01_data_preprocessing_and_features.ipynb Construction and transformation of features used in model estimation.
Model Development & Evaluation notebooks/02_modelling_and_evaluation.ipynb Iterative model specification, comparison, and calibration analysis.

 Future Development

1. Feature Expansion & Additional Data Opportunities

i.e. What additional data could meaningfully improve the model beyond more of the same data from different leagues?

The guiding principle for feature expansion is that new covariates should increase predictive signal without materially increasing parameter variance or overfitting risk. Additional information should improve out-of-sample performance while preserving model stability. Two areas appear particularly promising: (i) compressed player-level strength signals, and (ii) measures of structural team change across seasons.

Player-Level Strength Signals

Team-level models implicitly assume squad continuity within a season, yet line-up composition can materially affect expected goals. The absence of a high-impact attacker (e.g. Erling Haaland for Man City) would reasonably reduce expected goals scored, while missing key defenders could increase expected goals conceded. Incorporating player availability therefore offers clear signal potential. The challenge is dimensionality. A naïve approach, say, adding one covariate per player, could introduce ~10 additional features per team, inflating parameter variance and increasing instability. During model development, multicollinearity emerged when expanding covariates (see Section IV.A), reinforcing that complexity must be introduced carefully.

Two structured approaches to preserve signal while limiting dimensionality might be:

  • Latent Line-Up Strength Factors: Use dimensionality reduction (e.g., PCA) on player performance metrics to extract a small number of latent strength factors, aggregated at the starting XI level.

  • Interpretable Net Strength Metrics: Aggregate player metrics into compact, interpretable team-level signals (e.g., potential summary metrics such as a “net attacking strength delta” or a “defensive performance index”).

Pre-Season Investment & Structural Team Change

A key limitation of the current framework is that team strength is learned only from historical match data. At season boundaries, however, squad composition can change materially due to transfers. Consider two promoted teams: one invests heavily, the other minimally. All else equal, the higher-investment team would be expected to perform closer to league averages. Yet the current model(s) treat both similarly until new-season data accumulates. A simple enhancement would be a pre-season “investment delta” feature (e.g., "net transfer spend", or "change in squad market value"), allowing the model to adjust prior strength estimates entering a new season without adding significant complexity.


2. Model Evaluation & Limitations

i.e. How are the models evaluated, and what might be particular weaknesses?

Models were mainly evaluated using three methods. Log loss was the primary metric used for model comparison to directly assess the quality of predicted probabilities. In addition, distributional analysis and event-level calibration were examined to better understand model behaviour and how the model would perform in a practical betting context, where event-probability calibration is critical.

Evaluation Methods:

  • Log Loss: Log loss was used to assess probabilistic accuracy and compare competing model specifications. As a proper scoring rule, it penalises overconfident incorrect predictions and rewards well-calibrated probabilities.

  • Actual vs Predicted Goal Distributions: Predicted total goals distributions were compared to empirical distributions to identify structural biases (e.g., systematic overestimation or underestimation of certain goal counts).

  • Calibration Analysis for Over/Under Events: Event-level calibration was examined to assess whether predicted probabilities aligned with observed frequencies; for example, whether an event predicted with 70% probability actually occurred approximately 70% of the time.

Key Limitations:

  • Independence Assumption: All models considered in this report were independent Poisson specifications. The assumption that home and away goals are independent is strong and potentially restrictive. Bivariate Poisson models, for example, which relax this assumption and explicitly capture goal correlation effects1, have been shown to improve predictive performance in football data.

  • Event-Level Miscalibration: Some miscalibration was observed at the event level, particularly in the moderate-to-high probability range (see Section IV.A). This suggests our models are slightly overconfident in certain regions of the probability space, which is an important consideration in betting applications.

  • Limited Model Class Exploration: This work focused on structured statistical models rather than broader machine learning approaches. Methods such as gradient boosting or neural networks may capture nonlinear interactions and higher-order effects that a parametric Poisson framework cannot. However, such approaches typically trade interpretability for performance and require careful regularisation and validation to avoid overfitting. Future work could explore these approaches to see whether they provide meaningful improvements in predictive performance.


3. Cross-League Generalisation & Scalability

i.e. How could the framework be extended if multi-league data were available?

From a practical standpoint, the framework is already structured to accommodate multiple leagues. League-level intercept terms can be introduced via the model configuration (see Section III.A), allowing each league to have its own baseline goal intensity. These intercepts capture systematic differences in average scoring patterns across competitions. However, extending the dataset to additional leagues introduces broader conceptual considerations beyond simply adding more data. Structural characteristics may differ meaningfully between leagues. For example:

  • The magnitude of home advantage may vary.
  • The degree of goal correlation between teams may differ.
  • Covariates may not be directly comparable across leagues (e.g., a player-strength metric may require normalisation before being transferred across competitions).

A sensible approach would therefore involve exploratory analysis of each new league to identify structural differences before imposing a shared modelling framework. Depending on the findings, this could justify league-specific home advantage parameters, alternative correlation structures, or normalising covariates to ensure comparability across leagues. In summary, while the framework scales cleanly from an implementation perspective, careful statistical validation would be required to ensure robust generalisation across leagues.


4. Practical Deployment Considerations

i.e. How confident would we be in using this model in a live betting context?

Price vs Probability:

Confidence in live deployment would depend less on raw predictive accuracy and more on whether the model can consistently identify pricing discrepancies in the market. This would involve comparing model-implied probabilities with bookmaker odds (adjusted for the bookmaker's margin) to detect situations where the model assigns a meaningfully higher probability than the market.

A backtest against historical bookmaker odds would be very useful before placing live bets. This would assess return on investment over time, how often identified "value" bets actually win, and whether performance is consistent across different bet types. Importantly, results would need to be evaluated over a sufficiently large sample to avoid confusing short-term variance with genuine edge.

Risk & Market Selection:

Market selection would also matter. Some betting markets are likely to be highly efficient, while others may offer more opportunity due to lower analytical coverage. Understanding where the model performs strongest would be a key part of deployment. Lastly, disciplined bankroll management would be critical. Even a model with a statistical advantage can experience extended losing streaks, so clear staking limits and exposure controls would be necessary to manage downside risk.

In summary, while the model(s) in this work demonstrate reasonable calibration, real-world use would require careful comparison against market prices, robust historical testing, and disciplined bankroll management.

Footnotes

  1. Karlis and Ntzoufras (2003). Analysis of sports data by using bivariate Poisson models. ↩

About

Goal prediction for League One and League Two football matches.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages