← work

DEUCE Tennis Forecast

An ATP and WTA forecasting system that combines surface-aware Elo, point-level performance, player context, calibration, and Monte Carlo simulation.

Org
Personal
Role
Designed & built solo
Period
2026
Status
live
Stack
Python · XGBoost · Elo · Markov models · Monte Carlo · FastAPI · React · Firebase
88,275*1
matches in walk-forward evaluation
45,762 ATP and 42,513 WTA matches, evaluated chronologically
0.1947*2
ATP Brier score
seed-bagged, Platt-calibrated XGBoost combiner
318*3
automated tests
222 pytest and 96 Vitest tests across data, model, API, and interface layers
01/ CONTEXT

The problem

A tennis forecast needs to answer more than who ranks higher. Surface, serve and return quality, recent workload, opponent style, and draw structure all change the probability of an outcome. Most public tools expose a rating or a pick; they do not show how the evidence combines or how uncertainty propagates through an entire tournament.

DEUCE turns those signals into calibrated match probabilities, tournament simulations, rankings, and player-level explanations for both ATP and WTA tours.

02/ CONSTRAINT

The constraints

  • Tennis data arrives from several sources with different identifiers, schemas, and refresh schedules
  • The same player can perform very differently across hard, clay, and grass courts
  • Match history is chronological, so random train/test splits would leak future form into the past
  • A useful probability must be calibrated, not merely rank the likely winner correctly
  • Live forecasts need dependable refreshes, stale-data detection, and graceful fallbacks when a source fails
03/ APPROACH

From signals to a probability

The forecast is an ensemble of complementary views of a match:

  1. Surface-aware Elo tracks player strength by court type, with cross-surface transfer when evidence is sparse
  2. Serve and return modeling estimates point-winning probabilities after adjusting for opponent quality
  3. A point-to-match Markov model converts point probabilities into games, sets, and match outcomes
  4. Context and style features add rest, fatigue, head-to-head history, home advantage, and matchup tendencies
  5. Seed-bagged XGBoost combines the signals, followed by Platt calibration so a 70% forecast behaves like one over time

The interface shows the resulting probability alongside the factors that moved it, rather than presenting a black-box pick.

Match evidencecalibrated probability
01Surface Elostrength by court
02Serve / returnopponent adjusted
03Match contextrest · fatigue · home
04Style matchuppace · patterns · H2H
EnsembleXGBoostseed-bagged · Platt calibrated
63.4%match win probability
Markov conversion

point → game → set → match

Monte Carlo draw

round and title probabilities

The forecast stack: distinct tennis signals are combined, calibrated, and then simulated through a draw.
04/ SYSTEM

The product

A scheduled pipeline refreshes match data hourly and retrains daily. Source-freshness sentinels catch silent upstream failures before they become confident-looking forecasts. The product spans 14 views across both tours: upcoming matches, tournament draws, rankings, player profiles, form, style, and model diagnostics.

Monte Carlo simulation carries match probabilities through a tournament bracket, producing round-by-round advancement and title odds rather than a collection of disconnected picks.

ForecastsLive
DEUCE match forecast dashboard
RankingsLive
DEUCE ATP and WTA model rankings
Player styleLive
DEUCE player style analysis
Three views from the live product: current forecasts, model rankings, and player-style analysis.
05/ EVIDENCE

Evidence

The evaluation is walk-forward: every prediction is generated using only information available before that match. It covers 45,762 ATP and 42,513 WTA matches.

  • The calibrated combiner reaches a 0.1947 ATP Brier score and 0.2015 WTA Brier score
  • A published bookmaker benchmark is roughly 0.196; on DEUCE's own odds-matched subset, the closing line still leads 0.201 to 0.203 — an important boundary on the claim
  • 318 automated tests cover ingestion, modeling, API behavior, and the interface
  • Model pages expose calibration and evaluation rather than reducing quality to win rate alone
06/ IMPACT

What shipped

  • One public product for ATP and WTA forecasts, rankings, player analysis, and tournament simulation
  • A reproducible modeling pipeline with chronological evaluation and explicit calibration
  • Hourly data refreshes, daily retraining, and freshness monitoring
  • Transparent comparisons that show where the model is strong and where the market remains stronger

Questions about this project? Press ⌘K — the chat answers from these case studies and cites them.