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.
pip install numpy pandas
python sim.pyOutput: data/wc2026_forecast_results.csv — 48 teams × 7 stage probabilities.
μ = current Elo, σ = historical volatility.
elo_forecast.pyreads 2010–2025 yearly Elo snapshots from eloratings.net, fits a detrended linear model per team, and outputspred_elo(= last Elo, optimal point prediction) andsigma(= residual std, the uncertainty).sim.pydraws 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.- Stage probabilities are frequency counts over 100,000 independent Monte Carlo runs.
Full algorithm: MODEL.md. Adapting to other tournaments: ADAPTATION.md.
| 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 |
- Elo ratings: eloratings.net — public TSV files, no API key required
- Tournament structure: FIFA World Cup 2026 regulations (12 groups, 32-team knockout)
MIT