Prediction system for the 2026 FIFA World Cup (48 teams). Built in Python/Jupyter. Computes ELO ratings from 150+ years of match history, scrapes squad market values from Transfermarkt, trains an XGBoost classifier, and runs 1000 Monte Carlo tournament simulations.
fetch_matches.ipynb → data/train.csv (downloaded 40k+ historical results)
fetch_elo.ipynb → data/eloratings.csv (compute ELO ratings)
scrape_team_worth.ipynb → data/squad_values.csv (Transfermarkt squad values)
process.ipynb → data/wc2026_model.pkl (XGBoost model + Monte Carlo tournament run)
predict_wc2026.ipynb → figures/ (individual predictions + charts)
| Category | Features |
|---|---|
| ELO | Current rating, 365-day rolling max/avg, momentum |
| Form | Last-5 win rate, goals scored/conceded, goal diff (exponential decay) |
| H2H | Historical win rate |
| Context | Neutral venue, WC-related tournament flag, confederation |
| Squad value | attack/defence and full squad values (from Transfermarkt 2005–2025) |
Model: XGBClassifier (3-class: Home/Draw/Away).Chronological train/test split at 2022-01-01. Test log-loss ≈ 0.88, accuracy ≈ 60%.
Simulation: Each of 1000 runs simulates the full 48-team bracket. Draws in knockout rounds are resolved by ELO-weighted coin flip.
Implements ELO system as in World Football ELO.
WorldCup-Predictor/
├── data/ # CSVs and model pickle
├── figures/ # Generated charts
├── notebooks/ # Jupyter notebooks (run in order)
└── src/
├── config.py # All constants (ELO params, model params, N_SIMULATIONS)
└── team_data.py # Name maps, confederation lookup, groups, fixtures



