The business goal
The business goal of this project was to build a tool that could create the best possible lineup of fantasy sport players given their projected fantasy points for the next game. The lineups were built for several sports like NBA, NFL and MLB and several daily fantasy sports (DFS) websites like Fanduel and DraftKings.
The tool can build a list of optimal lineups based on the same set of players and their projected fantasy points. Among other options it is possible to build the best lineups with one or more players already present (locked) in the lineup. It is also possible to constrain each player’s exposure in the list of optimal lineups, min and max number of players from each team in the lineup, as well as other options.
From the technical point of view, the project implemented mixed integer linear programming models which was solved by a GNU Linear Programming Kit (GLPK) solver through a Python interface library Pyomo.
The tool was implemented as a web service. Model parameters were populated dynamically with JSON data through a REST-like API interface by the end user and the best lineups were also sent to the user as JSON data. The linear programming model actually consisted of six models, one for each sport type (NBA, NFL, MLB) and DFS website (Fanduel, DraftKings).
As a result of the project, our client was able to provide additional functionality for the software tool and implement new pricing plans with higher prices.