Building the ultimate NBA team
July 10, 2014
In our previous installment, we showed how the distributions of salaries and win shares across the league are both exponential distributions, allowing us to create a simple metric to convert win shares into expected salaries. Although very simple, this conversion is extremely powerful and has done a masterful job of predicting the free agency signings this offseason. How masterful? Four recent free agent signings as of this writing are Steve Blake for $2.1mm a year (we estimated his value at $2.8mm), Spencer Hawes for $5.8mm a year (we estimated his value at $7mm), and Greivis Vasquez for $6.5mm a year (we estimated his value at $5.5mm).
But we’ll hold off on a more in-depth analysis of our mastery until after the free-agency period is over.
Figuring out the value of a player is important but it is only a means to an end of ultimately winning an NBA championship. Our goal should to assemble pieces that maximize talent while staying within the limits of the salary cap. In other words, given the 2014-15 salary cap of $63.065mm, what players can we assemble on a team that maximize a chance of winning.
To accomplish this task, we’ll use a handy linear programming library for python called PuLP. In this type of problem, we want to maximize a given metric while restraining other key variables. Similar to solver for those that are excel inclined.
When building a team in the NBA, our first and most obvious restraint is the amount of money we would like to spend. In addition to our total dollar spend, we also want to set the number of players at each position. Also, since we typically don’t start a team from scratch, we want to have the ability to enter current players on the team and then find additional players to maximize our metric. Finally, acquiring players under contract is not that easy, so we can also restrict our search to only pick free agents.
So who would be on the ultimate team? By plugging in 2 players at each position and setting our max salary for 2014-15 to $63mm, we would assemble the following squad:
Not too shabby!! Take a spin and have some fun building your ultimate team: nba.datasco.pe.