Sie sind auf Seite 1von 27




Fantasy Football League

• Fantasy football is a big part of the footballing community
• the chance to participate in leagues and use their expert knowledge
of players
• and their performance to outperform their peers, and even perhaps
win some money at the same time
• and of course win the pride that comes along with besting others at a
feat and be known as a football guru.
Analytical approach

Working of the game

• Each week, players earn points based on their performance in games
• To pick players whom you think will earn the most points in the season
• Constrained to a budget of £100.0 million
• Pick 15 players
1. 2 goalkeepers
2. 5 defenders
3. 5 midfielders
4. 3 strikers
• Only 11 players must be on the pitch (1 goalkeeper - 4 defenders - 4
midfielders - 2 strikers)
• 4 on the bench (1-1-1-1)
• Only pick up to 3 players from any given team
• Only the 11 players selected to play can earn points each week
• Each week it is possible to replace team members with the use of
transfers, with 1 free transfer available each week. Transfers get
added on to the next week if unused, with a maximum add on of 2
transfers a week. Additional transfers in a week lead to points
Literature Review
• Optimization of the NFL Fantasy football
• How our AI got top 10 in Fantasy Premier League using Data Science
• Premier League Fantasy Optimization
• Fantasy football – Linear Programming in Excel Solver
• Our typical methodological timeline is as follows:
• The process started by collecting all the literature related to
Optimization of fantasy football teams.
• All the software used were analyzed. E.g. Python, Lingo, R , Excel
Solver etc.
• Drawbacks in each model were noted and a problem statement was
• Problem was converted to a simple Linear Programming Problem
• The decision variables and the constraints and assumptions were
• The working algorithm was conceived.
• Simplex method was determined as the preferred solution algorithm.
• NumPy was selected as the language of choice.
• Global fantasy football real time database was downloaded and
• The algorithm was coded using NumPy platform using the Jupyter
• Errors were analyzed and corrected.
• Different team possibilities were tested.
Problem Statement
• Selecting the best 11 players possible with regards to cost and other
• Remaining 4 based on the cheapest players
• Optimize the number of points I can get (objective function)
• Make sure we had 15 players (constraint 1)
• Make sure we had 2 goalkeepers (constraint 2)
• Make sure we had 5 defenders (constraint 3)
• Make sure we had 5 midfielders (constraint 4)
• Make sure we had 3 strikers (constrain 5)
• Make sure we spent less than £100.0 million (constraint 6)
• Make sure we select between 0 and 3 players from any given team
• The following assumptions were made to the fantasy football model:
• The concept of transfers has been disabled. We assume a fixed team
of 15 players for the duration of the season.
• We assume that the top 11 players will play all the time and we
neglect injuries and suspensions.
• We only consider the players in the league who have played the
whole previous season and we do not consider new additions like
transfers from other leagues, outgoing players, etc.
Programming Analysis
• Player Data
Kernel Density Estimation
Linear Modelling
• Modelling the problem was started by selecting the best possible 11
• To model the problem in python, we will be using Pulp
Decision Variables
• Each of the available players were used as the decision variables
• Their values will be binary in that we will choose them (1) or we
won’t (0).
• Cash Constraint
1. £100.0million (1000 in code) to spend on the whole squad
2. Best 11 based on the available cash
3. Cheapest 4 benched players.
Player Constraints
• Goalkeeper Constraint:
• Defender Constraint
• Midfielder Constraint
• Forward Constraint:
• Team Constraint
Only up to 3 players from any given team are selected and not any

• We have put in all our decision variables, constraints and optimization

function to solve to the linear relationships .
• We build a pandas data frame of all the decisions made following the
optimization model and append it to the original dataset to see who
has been selected to be in the dream team.
The best 11 team players were selected with the specified constraints
which would offer the most points to a fantasy team
• Their corresponding performance was also determined as shown
• It was observed that the maximum number of points obtained was
1722 up to this week based on their past performances
• This team was selected as the best performing team up till now in the
Premier League.
• It was observed that our optimized team still trailed behind the leading
team by 400 points.
• The reason for this is that we had a lot more assumption when compared
to the actual points system, which added to the complexity of the problem.