All projects

World Cup 2026 model

How do my 2026 World Cup probabilities compare with the bookmakers'?

Why I built it

A question I could test: do my probabilities for the 2026 World Cup hold up against the bookmakers’? Once matches are played, the dashboard scores itself.

What it does

A Streamlit dashboard that stacks Elo ratings, a Poisson goals model and a gradient-boosted classifier, blends them with bookmaker odds, and simulates the whole tournament by Monte Carlo. Once matches are played it scores itself with accuracy, Brier score and log-loss.

Worth a look

  • Group stage with the best-third-placed rule, then a round-of-32 bracket.
  • 67 pytest tests in GitHub Actions.

Under the hood

  1. Local data

    FBref statistics (goals, xG, xA, line-ups) and optional bookmaker odds, all in DuckDB. Keys are optional: without them the app still runs.

  2. Three models stacked

    Elo ratings, a Poisson model of goals (which also gives a score matrix) and a gradient-boosted classifier on match context.

  3. Blend with the market

    The final probability is a 50/50 blend of the stack and the bookmakers’ implied odds.

  4. Tournament Monte Carlo

    800 runs over the 12 groups, including the best-third-placed rule, then a round-of-32 bracket with each team’s chance of reaching every round.

  5. Calibration

    Accuracy, Brier score and log-loss against the real results. 67 pytest tests run in GitHub Actions.