Case Study — Machine Learning · Sports Analytics
ATP & WTA Tennis Match Predictor
How well can you predict a tennis match before the first serve?
▶ Try the Live Demo0.716
AUC, ATP held-out test (2022+)
0.713
AUC, WTA held-out test (2022+)
30+ yrs
Tour-level match data, 1991–present
2
Baselines beaten: ranking & Elo
// The Question
Pre-match tennis prediction has a well-known ceiling — roughly 67–70% accuracy even for the best published models, because upsets are genuinely common. The goal here wasn't to beat physics: it was to build a leakage-free pipeline that reliably beats the standard baselines (pick the higher-ranked player; pick the higher-Elo player) on both the ATP and WTA tours.
// The Data
Jeff Sackmann's open ATP and WTA match datasets, 1991 to present, restricted to tour-level main-draw singles. Models train chronologically with a held-out test set of all matches from 2022 onward — the models are always predicting matches they have never seen, played after everything they trained on.
// The Approach
- A chronological Elo engine maintaining overall and surface-specific (hard/clay/grass) ratings per player
- Leakage-safe features: Elo snapshots are taken before each match updates the ratings; recent form, head-to-head, and rest-day features are built symmetrically so the model can't learn which column the winner is in
- Separate XGBoost models per tour, evaluated against higher-rank and Elo baselines
- Unit tests including explicit leakage guards, and an on-demand matchup predictor with fuzzy name matching that refuses to guess about players outside the dataset
// Results
All numbers on the held-out 2022+ test set:
| Tour | Higher-rank acc. | Elo acc. | XGBoost acc. | XGBoost AUC |
|---|---|---|---|---|
| ATP | 0.639 | 0.641 | 0.653 | 0.716 |
| WTA | 0.625 | 0.650 | 0.655 | 0.713 |
XGBoost beats both baselines on both tours. A ~0.65 accuracy is squarely in the expected range for pre-match tennis prediction — the value of the project is less the headline number and more the discipline behind it: time-ordered splits that are never shuffled, pre-update rating snapshots, and tested leakage guards, so the measured edge is real rather than an artifact.