Skip to content
All work

Machine learning · Quantitative research

Matchup DNA

A Python research system that rates every ATP and WTA player from their full match history and gives each upcoming match a win probability. Every forecast is stored before the match starts, and a Next.js site shows the forecasts, what drove them, and how they scored.

Role
Solo developer
Timeline
Oct 2026 – Present
Stack
  • Python
  • scikit-learn
  • LightGBM
  • SQLite
  • Next.js
  • NumPy
  • TypeScript
Matchup DNA home page asking who wins the next match and how sure we should be, over a photo of a clay-court rally

Slide 1 of 4

How the system fits together

  1. 01

    Match history

    361,571 ATP and WTA matches from audited sources

  2. 02

    Point-in-time features

    Built in date order, so nothing comes from after the match

  3. 03

    Frozen models

    Elo, then logistic regression with serve-return and round features

  4. 04

    Locked forecasts

    Append-only SQLite with a hash chain and a public Git ledger

  5. 05

    Website

    Next.js reads verified snapshots and never computes in the browser

The problem

Rankings and Elo tell you who is stronger, but not how likely an upset is, or whether a forecast deserves any trust. I wanted to build tennis forecasts the way a quant research team would: probabilities that mean what they say, tested only on matches the model had never seen, compared with the betting market, and recorded before every match so the track record can’t be edited afterwards.

01Data & point-in-time features

The history is 361,571 tour-level ATP and WTA matches from Jeff Sackmann’s archive, plus two newer sources that I audited against it match by match, and ESPN scoreboards for upcoming fixtures. Every feature is built by replaying matches in date order, so a forecast only ever uses information from before its match. Players are linked across sources by a tested identity crosswalk rather than by name, because the sources spell names differently.

02Models, one phase at a time

  • Elo and surface-adjusted Elo first, with their settings tuned on 1990–2009 and scored on later years.
  • A logistic regression that adds ranking, time away from the tour, and recent form. On 13,732 held-back matches from 2024 to May 2026 it beat recalibrated surface Elo by 0.0078 log loss per match, on both tours and in every year.
  • Opponent-adjusted serve and return estimates that shrink short records toward the tour average and give recent matches more weight.
  • A round-aware model that also uses the earlier rounds of the same tournament. It was the clearest gain, with an interval that excluded zero in every test period.
  • LightGBM was no better than the logistic model with the same inputs, so I kept the logistic model because it can be explained term by term.

03Testing without fooling myself

  • Chronological splits: training on 2010–2020, choosing models on 2021–2023, and scoring the final choice once on 2024 onward.
  • A keep rule fixed in advance for every new feature, and a frozen protocol, with hashes of the code and every input, written before each final test.
  • The pre-registered June–October 2026 test of the serve-return model gained 0.0040 log loss per match, but its interval just included zero (p = 0.055), so I report it as not proven.
  • After that test I found 65 matches counted twice when two sources were combined. I fixed it and published an erratum, and kept the original result as the official one.
  • Calibration is checked, not assumed: when the model gives a player about 75%, that player wins about 74% of the time.

04Against the betting market

  • Opening odds with the bookmaker’s margin removed, using a method chosen on 2021–2023 only.
  • The market beat the best model by 0.024 log loss per match on 13,846 matches. Blending the model into the price added nothing, and where the two disagreed, results followed the market.
  • A paper betting rule that backed the model’s value picks lost 8.9% per unit staked. That is a negative result, and the site reports it plainly.

05Live forecasting & the website

  • Both frozen models run twice a day and issue forecasts at least 30 minutes before each match starts.
  • Forecasts go into append-only SQLite tables with a hash chain, plus a public ledger committed to Git, so no forecast can be changed after its match.
  • A prospective record started on 9 November 2026 and gets its one final evaluation in July 2027.
  • The Next.js site on Vercel reads published snapshots, checks each file against a SHA-256 manifest, and never computes a probability in the browser. It has match forecasts with the inputs behind them, player profiles and head-to-heads, a Model Lab, and a forecast archive.

Benchmark results

Every forecast scored on the same 13,846 matches, January 2024 to October 2026. Lower log loss is better.
ForecastAccuracyLog loss
Betting market (opening)68.07%0.5896
Phase 4 modelmy best model65.42%0.6132
Phase 3 model65.27%0.6156
Surface Elo64.53%0.6266
Elo64.44%0.6267

Research paper

Do Players Choke in Big Matches? Evidence from 26 Years of Professional Tennis

A working paper that uses Matchup DNA’s calibrated Elo ratings to test whether players’ big-match records carry information the ratings miss. Across 130,460 matches they mostly look like chance, and past records did not improve out-of-sample forecasts of 7,476 later big matches, so the live model has no player-specific big-match adjustment.

Working paper v4.0 · Not peer reviewed · 19 pages

Read Research Paper