A machine learning solution that uses historical international football match data (1872-2025) combined with live 2026 FIFA World Cup tournament results to predict the tournament winner.
- ELO Rating Engine - Processes 49,000+ historical international matches to compute strength ratings for every national team. Recent matches (post-2020) are weighted more heavily.
- Tournament Data - Embeds the full 2026 World Cup group stage standings, Round of 32 results, and Round of 16 results.
- Composite Strength Score - Blends historical ELO with tournament form (group points, knockout wins, goal-scoring record).
- Monte Carlo Simulation - Runs 10,000 simulations of the remaining knockout bracket (Quarterfinals through Final) to estimate each team's probability of winning the tournament.
Historical Data: International Football Results from 1872 to 2017
The football_data.csv file contains 49,000+ match results with columns:
date,home_team,away_team,home_score,away_score,tournament,city,country,neutral
2026 Tournament Data: Sourced from FIFA World Cup 2026 Match Data on Kaggle and embedded directly in the code.
- Data Collection & Cleanup: Sourced 49,000+ historical international matches and 2026 tournament results (group stages, Round of 32, Round of 16) from Kaggle. Cleaned up unused config and script files from the workspace.
- ELO Parameter Optimization: Performed backtesting validation (grid search) on the historical dataset to discover the most accurate ELO hyperparameters (
K_base=30,K_recent=32,Home_Advantage=80), maximizing predictive accuracy to 59.61%. - Composite Scoring: Combined historical ELO with tournament form (points, clean sheets, and knockout round wins) to generate a composite strength rating for each remaining team.
- Bracket Simulation: Programmed a Monte Carlo simulator executing 10,000 runs of the remaining knockout bracket (Quarterfinals, Semifinals, and Final) to output realistic win probabilities.
pip install -r requirements.txtpython app.pyThe model outputs:
- Group stage standings for all 12 groups
- Round of 32 and Round of 16 completed results
- Quarterfinal bracket
- ELO ratings for all 48 World Cup teams
- Composite strength scores for remaining contenders
- Monte Carlo simulation results with win probability percentages
Example:
==========================================================
PREDICTED WINNER: Spain
CONFIDENCE LEVEL: 39.0%
==========================================================
Top contenders:
1. Spain 39.0% ###################
2. France 24.9% ############
3. Argentina 21.9% ##########
4. England 7.0% ###
5. Morocco 3.2% #
In tournament football, even a dominant team like Spain is predicted with a ~37% confidence level rather than 90%+. This is because:
- Knockout Stage Volatility: To win the tournament, a team must win multiple matches in a row (Quarterfinals, Semifinals, and Final) against elite competition where one bad day means immediate elimination.
- Variance in Football: Single football matches involve high variance (e.g., penalty shootouts, red cards, referee decisions).
- Competing Elite Teams: The remaining bracket features other world-class contenders like France and Argentina, who also hold high probabilities (each around 25%).
A prediction of ~37% represents a highly favored team in such a competitive tournament.
world cup/
app.py # Main predictor script
football_data.csv # Historical match dataset (49K+ matches)
requirements.txt # Python dependencies
README.md # This file
update, 20th july 2026 - Spain won, and the predictions were correct!
MIT