Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World Cup 2026 Winner Predictor

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.

How It Works

  1. 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.
  2. Tournament Data - Embeds the full 2026 World Cup group stage standings, Round of 32 results, and Round of 16 results.
  3. Composite Strength Score - Blends historical ELO with tournament form (group points, knockout wins, goal-scoring record).
  4. 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.

Dataset

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.

Steps Performed

  1. 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.
  2. 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%.
  3. 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.
  4. 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.

Installation

pip install -r requirements.txt

Usage

python app.py

Output

The 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%  #

Why is the Win % / Confidence Level "Low"?

In tournament football, even a dominant team like Spain is predicted with a ~37% confidence level rather than 90%+. This is because:

  1. 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.
  2. Variance in Football: Single football matches involve high variance (e.g., penalty shootouts, red cards, referee decisions).
  3. 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.

Project Structure

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!

License

MIT

About

This particular model predicts who will win the FiFa World Cup '26

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages