Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FIFA World Cup Prediction Model

Monte Carlo simulation of FIFA tournament outcomes driven by Elo ratings with quantified uncertainty. 100,000 simulations of the full 48-team 2026 format: 12 groups → 32-team knockout → champion.

Quick Start

pip install numpy pandas
python sim.py

Output: data/wc2026_forecast_results.csv — 48 teams × 7 stage probabilities.

Model

μ = current Elo, σ = historical volatility.

  1. elo_forecast.py reads 2010–2025 yearly Elo snapshots from eloratings.net, fits a detrended linear model per team, and outputs pred_elo (= last Elo, optimal point prediction) and sigma (= residual std, the uncertainty).
  2. sim.py draws each team's Elo from N(pred_elo, sigma) every simulation, converts to expected goals via Poisson, and simulates group stage → knockout bracket with FIFA's official third-place assignment rules.
  3. Stage probabilities are frequency counts over 100,000 independent Monte Carlo runs.

Full algorithm: MODEL.md. Adapting to other tournaments: ADAPTATION.md.

Files

File Purpose
sim.py Monte Carlo simulator (100k iterations)
elo_forecast.py Per-team σ estimation from 2010–2025 history
data/elo_forecasts.csv Pre-computed (μ, σ) for 48 teams
data/eloratings/ Yearly Elo snapshots (2010–2025 + 2026_graph)
data/wc2026_forecast_results.csv Simulation output

Data Sources

  • Elo ratings: eloratings.net — public TSV files, no API key required
  • Tournament structure: FIFA World Cup 2026 regulations (12 groups, 32-team knockout)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages