I have played Fantasy Football since my Freshman year at the University of Connecticut. I love watching the NFL and making projections about how many points my team will score. Over time, I joined more leagues and spent more times making projections. At this point I'm in 4 leagues and don't have enough time to plan strategies and make projections for all of them. My biggest emphasis was always on drafting players because it's the most significant moment that will make or break the season. Unfortunately, ESPN always had low expectations for the teams I drafted. Interestingly enough, I'm usually able to restock my teams via Free Agency over the course of the season to the point where it's fairly uncommon for me to miss the playoffs. However, I wondered what I could do to improve my drafts. The following project aims to maximize the returns of every Snake draft for any size league for any scoring format for any year. If you're unfamiliar with Fantasy Football, check it out here.
Fantasy Football Drafts are the primary opportunity to put your team in a position to win your league. At the beginning of the season you start with an empty team and it's up to you to decide which player to take at each round of the draft. Everyone has their own strategy that may or may not work out. Most of the decision-making is based on the position of the player and the projected points for the season. ESPN provides projections for total Fantasy Points and in general the number of players per position is obvious. However, given the players available, how do you decide the most valuable combination of position and projected points? The following project uses Monte Carlo Simulations to determine the best pick at each round of the draft and integrates those predictions with ESPN to make drafting simple.
I am far from the first person to describe Fantasy Football. A comprehensive overview of the rules can be found here. My leagues are generally 12-person, Snake Draft, .75 PPR and 16 player teams (1 QB, 2RB, 2WR, 1TE, 1Flex, 1D/ST, 1K, 7Bench).
Prior to every draft, ESPN allows you to view/edit the predraft rankings. The rankings are a goldmine for drafting data because it easily outlines every player's team, position, and projected fantasy points. ESPN projects each player's fantasy points for you and constantly updates them based on what's happening in the NFL. To collect this data, you simply need to scrape it off the website.
The Monte Carlo Method is a technique that use simulations of a scenario to determine the possible outcomes. For example in a draft setting, Monte Carlo Simulations can find all the possible picks by each team. Based on all the possible picks, it can determine the best pick based on the current conditions of the draft. Obviously this can be very useful in a Fantasy Football draft setting. Fortunately, I was able to find this post by Yvo Keuter. Yvo built a pipeline that will draft via Monte Carlo for every team in the league.
Yvo wrote code that was in excellent condition for me apply to any ESPN draft. I only had to adjust it pull data from the ESPN pre-draft rankings, adjust the to only use Monte Carlo Simulations for one team, and monitor the picks from other teams. I managed to connect to EXPN using Selenium and BeautifulSoup in Python. This solution was ideal because I didn't have to constantly connect to ESPN with an API and Selenium would open a browser for me to interact with in real-time. The final code has been posted to my Github here.
I connected to several ESPN Mock Drafts to test out the effectiveness of the draft choices. Check out the Youtube video below that demos one of those Mock drafts. As you can see at the end of the video, my team had the highest projected fantasy points. https://www.youtube.com/embed/q53NkWhQLT8?si=58otnRtFJUiPTlzD
As shown in the video, the implementation is very smooth and concise. The recommendations from the algorithm are determined automatically and they can help you pick a team that has above average projected Fantasy points. The remaining question is whether high projected fantasy point totals actually help you win.
Let's see how this season goes!
Yvo Keuter: Post
GitHub: fantasyfootballdraft