Skip to content

Repository files navigation

FIFA World Cup 2026 — Monte Carlo Simulation Engine

Python Machine Learning Simulations License

A simulation engine for modeling the 48-team FIFA World Cup 2026 tournament structure under modern football dynamics and escalating knockout unpredictability.


Executive Summary

Knockout tournament football is difficult to predict accurately. Conventional betting odds and linear models tend to overrate historical brand prestige while underestimating tactical adaptability, squad depth, travel fatigue, and the compounding volatility of knockout rounds.

This repository implements a full prediction pipeline for the FIFA World Cup 2026 (hosted across the USA, Canada, and Mexico). The system couples a Gradient Boosting classifier trained on modern international match data (2000–present) with a 5,000-run Monte Carlo simulation engine built to mirror the novel 48-team tournament structure.


World Cup 2026 Format & Modeling Challenges

The 2026 tournament introduces structural shifts that significantly increase match variance compared to prior 32-team editions:

  • Tri-Host Infrastructure: Multi-climate travel logistics and varying field surfaces across North America.
  • 48-Team Tournament Format:
    • 12 Groups of 4 Teams
    • Top 12 Group Winners qualify directly to knockout rounds.
    • Best 8 Runners-Up advance automatically.
    • Remaining 4 Runners-Up enter a preliminary Play-in Round.
    • 32-Team Knockout Tree leading to the Final.

This format exposes top-tier nations to additional knockout fixtures, amplifying upset probability in early rounds.


Repository Structure

wc26-sim/
├── assets/
│   ├── cover_image.jpg                # Report header visual asset
│   └── finalissima_poster.png         # Tactical feature matchup visual
├── data/
│   ├── raw/                           # Raw match results & FIFA ranking series
│   └── processed/                     # Cleaned feature tables & engineered metrics
├── models/
│   └── gradient_boosting_v1.pkl       # Serialized Gradient Boosting match model
├── notebooks/
│   ├── 01_raw_data_inspection.ipynb   # Exploratory data analysis & data sanity checks
│   ├── 02_feature_engineering.ipynb   # Signal extraction & feature vector construction
│   ├── 03_modeling.ipynb              # Model cross-validation, tuning & serialization
│   ├── 04_world_cup_2026_simulation.ipynb # 5,000-run Monte Carlo simulation engine
│   └── 05_results_and_insights.ipynb  # Statistical visualization & market comparison
├── simulation_results/
│   ├── top15_probabilities.png        # Bar plot of top 15 champion probabilities
│   ├── confederation_share.png        # Pie breakdown by football confederation
│   ├── model_vs_market_top10.png      # Divergence plot vs betting house odds
│   └── world_cup_2026_winner_probabilities.csv # Complete simulation output table
├── paper/
│   └── wc26-sim.pdf                   # Compiled Academic Paper
├── index.html                         # Interactive Web Dashboard
├── requirements.txt                   # Environment dependencies
├── DATA_SOURCES.md                    # Data attribution and sources
└── LICENSE                            # MIT License

Quickstart & Reproduction

1. Environment Setup

Ensure Python 3.10+ is installed:

# Clone repository
git clone https://github.com/BELYAGOUBIABDILLAH/wc26-sim.git
cd wc26-sim

# Initialize virtual environment
python -m venv venv

# Activate environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

2. Running the Pipeline

Execute the Jupyter notebooks in numerical sequence to inspect or re-train the models:

  1. notebooks/01_raw_data_inspection.ipynb — Loads and validates raw match logs. Open in nbviewer
  2. notebooks/02_feature_engineering.ipynb — Constructs FIFA delta vectors, form decay rates, and modern strength metrics. Open in nbviewer
  3. notebooks/03_modeling.ipynb — Fits the Gradient Boosting classifier. Open in nbviewer
  4. notebooks/04_world_cup_2026_simulation.ipynb — Executes 5,000 complete World Cup tournament runs. Open in nbviewer
  5. notebooks/05_results_and_insights.ipynb — Generates output metrics and visual plots. Open in nbviewer

Model Methodology

1. Match Outcome Classifier

Individual match probabilities are evaluated using a Gradient Boosting Classifier trained on post-2000 international matches. Key input features include:

  • Baseline FIFA Rating Differential: Normalized point distance between competing nations.
  • Smoothed Form Index: Weighted win/draw performance over the previous 5 international fixtures.
  • Head-to-Head History: Historical match score differentials.
  • Modern Football Strength Metric: A tactical index rewarding structural pressing, rotational quality, and post-2018 knockout consistency.
MODERN_TEAMS = {
    "Argentina": 6, "Spain": 6, "France": 6,
    "England": 5, "Morocco": 5, "Portugal": 5,
    "Germany": 4, "Brazil": 4, "Belgium": 4,
    "Netherlands": 4, "Croatia": 4, "Japan": 3,
    "Senegal": 3, "Uruguay": 3
}

2. Round-Dependent Knockout Variance

Knockout matches in major tournaments exhibit escalating unpredictability. To capture this, the simulation applies an expanding variance scaling parameter across tournament rounds:

ROUND_VARIANCE = {
    "group": 18,
    "play-in": 30,
    "round_of_16": 45,
    "quarterfinal": 55,
    "semifinal": 70,
    "final": 85
}

Key Simulation Findings (5,000 Runs)

Champion Probability Distribution (Top 15)

Rank Team Win Probability (%) Primary Strength Drivers
1 Argentina 16.10% Knockout stability, tournament maturity & high tactical adaptability
2 Spain 13.08% Elite positional structure & high midfield control efficiency
3 France 12.78% Deep rotational quality & elite transition speed
4 Portugal 8.52% High squad depth across all positions
5 England 8.42% Strong FIFA ranking & solid individual talent alignment
6 Croatia 5.24% Knockout resilience & extra-time performance retention
7 Germany 4.94% Rebuilding tactical structure & pressing metrics
8 Morocco 4.70% Defensive compactness & low-block efficiency
9 Belgium 4.14% FIFA ranking points & individual attack metrics
10 Brazil 2.92% High raw talent, penalized for tactical fragility in recent knockout rounds
11 Netherlands 2.52% Defensive structural stability
12 Senegal 1.92% Physical dominance & continental momentum
13 United States 1.86% Host venue advantage & athletic squad profile
14 Mexico 1.78% Host atmosphere & group stage qualification consistency
15 Japan 1.76% High tactical discipline & counter-pressing speed

Visualizations & Model vs. Market Analysis

Top 15 Team Probabilities

Top 15 Probabilities

Model Predictions vs. Betting Market Implied Odds

Model vs Market

Key Analytical Insight:

While commercial betting markets frequently price Spain as a slight favorite due to public volume and market sentiment, the 5,000-run Monte Carlo model identifies Argentina as the most resilient team across simulated tournament permutations. Argentina's combination of tournament adaptability and penalty-shootout consistency allows them to navigate late-round variance more effectively than possession-dominant teams.


Limitations & Edge Cases

  • Injuries & Squad Selections: Player-level injury news is not dynamically injected; strength is modeled at the national team system level.
  • Managerial Switches: Mid-cycle coaching adjustments are reflected only through recent form results.
  • Unpredictability Guarantee: Football contains intrinsic stochastic elements — refereeing decisions, early red cards, penalty shootouts — that no model can fully eliminate.

Data Attribution

This project uses publicly available international football data. See DATA_SOURCES.md for complete attribution and source information.


Author & Maintainer

Belyagoubi Abdelilah


License

This project is licensed under the MIT License — free to use, modify, and distribute with attribution.

About

Monte Carlo engine predicting World Cup 2026 winners via Gradient Boosting ML. 5,000-run simulations trained on 20+ years of football data with advanced knockout variance modeling and modern tactical analysis.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages