Calibrating000
Ameya Mhatre
All work

NBA Contract Analyzer

A model that values NBA contracts against on-court performance, read through the real mechanics of the 2023 collective bargaining agreement.

Measures
Pay against play
Reading
101 players, across 30 teams
Stack
Python, Pandas, Ridge regression, Web scraping
NBA Contract Analyzer showing the 2025-26 cap sheet: salary cap, tax line and two aprons, and a table of players with surplus and grade.
The 2025-26 cap sheet. Cap, tax and both aprons drawn as lines a payroll crosses.1200 × 750 px

Context

Raw salary says little about whether a contract is good. A rookie-scale deal and a supermax follow different rules, and since 2023 the two aprons change what a front office is even allowed to do.

The idea

Model the rules first, then the market. The pipeline encodes rookie scale, max tiers, supermax, Bird rights and the apron system, and a ridge regression over player-season stats estimates what each player would earn on the open market.

Details

  • Surplus and deficit are expressed as a share of the salary cap, so a number means the same thing across seasons.
  • Ridge regression keeps correlated box-score stats from swinging the estimate.
  • Every player gets a plain grade (fair value, slight overpay and so on) next to the number behind it.
  • Small samples are flagged in the table instead of silently trusted.

What shipped

Published as a static site on GitHub Pages: 101 players across 30 teams, searchable by player, team and grade. Try it.