Due to popular request, here's an updated version of a blog I wrote around this time last year where I used mathematical optimisation to select the best fantasy football team possible.
The team the linear solver selected using the latest Premier League data is shown in the table below – this is the squad with the highest possible number of points that can be achieved using the constraints we are working within (e.g max three players from one team, can only spend £100 million etc).
Position | Team | Points | Name | Cost(£) |
---|---|---|---|---|
Goalkeeper | Swansea | 151 | Fabianski | 5.00 |
Goalkeeper | Liverpool | 149 | Mignolet | 5.00 |
Defender | Chelsea | 179 | Ivanovic | 7.00 |
Defender | Chelsea | 177 | Terry | 7.00 |
Defender | Everton | 142 | Jagielka | 5.50 |
Defender | Liverpool | 142 | Clyne | 5.50 |
Defender | Southampton | 140 | Bertrand | 5.50 |
Midfielder | Chelsea | 233 | Hazard | 11.50 |
Midfielder | Liverpool | 162 | Henderson | 7.00 |
Midfielder | Spurs | 160 | Chadli | 7.00 |
Midfielder | Crystal Palace | 132 | Bolasie | 6.50 |
Midfielder | Swansea | 129 | Ki Sung-yueng | 5.50 |
Forward | Spurs | 191 | Kane | 9.50 |
Forward | West Brom | 148 | Berahino | 6.50 |
Forward | Leicester | 130 | Ulloa | 6.00 |
I'm going to point out the obvious limitations here before I get an inbox filled with grumpy messages. First of all, the new football season hasn't started so I’m using the points totals from last season. This means all the players at the promoted teams and any new signings to the Premier League will have zero points and so will not get selected. I’ll be running this script each week throughout the season for my own use, so as these players gain points they will start to get selected by the linear solver if they perform well enough.
Also, this method doesn't account for injuries, suspensions, strength of the opposition, captains, substitutions, etc. However, it's worth noting that last season I finished in the top 1.5% of all players in the Premier League's competition using this idea to help inform my decisions. I didn't follow its recommendations rigidly but the data certainly guided my transfers and helped me finish as high up as I did.
Finally, as I noted last year, it still seems that spending your money evenly across the squad works better than splashing a heap of money on a couple of star players and then making up the numbers with a load of budget players. Apart from the Chelsea players, it's a fairly run-of-the-mill squad that doesn't look too impressive at first glance but it's actually the highest scoring squad you could have purchased.
Good luck!
All code is available on GitHub
Submit your comments below, and feel free to format them using MarkDown if you want. Comments typically take upto 24 hours to appear on the site and be answered so please be patient.
Thanks!