This Easter, I spoke with my girlfriend’s father and there were several football matches happening that weekend, he started talking about betting on some of those matches.
He carried on to explain me his betting routine, which consisted of:
- Checking the next fixtures for a specific competition: https://www.skysports.com/premier-league-fixtures
- Checking the last results of each of the team and “estimate” their momentum (e.g. https://www.skysports.com/football/wolverhampton-wanderers-vs-liverpool/stats/429116)
Then, iterate these 2 steps for all the fixtures happening, from Premier League, Championship, League One, and League Two.
Since I recently learned how to use Beautiful Soup to scrap data from web pages (see GamestonkTerminal), I thought that I could create an automated task that would do all of these steps with a simple double click executable. After checking that I could extract such data from SkySports, I let him know that by the next day I would have something working.
After dinner, I started working on the project, and before I went to sleep I had the first prototype working, which you can see in here.
On top of “his” automated task, I created a “momentum score” which tries to estimate the momentum score based on what my girlfriend’s father told me that he does. He looks into the last games of the team and see if they have a positive momentum by looking to see if they come from a winning series.
So, I thought it would be good to attribute a weight to each of the last matches where the most recent match would have the biggest weight, and last one from the 6 provided from SkySports stats would have the lowest weight. Together with this weight, I thought we could use the sum of the weight to the score in case of a win, subtract in case of loss, and don’t do anything in case of a draw.
So, in simple terms, if score is positive the team is likely to have been winning their last matches, if score is negative the team is likely to have loss their last matches.
But then, I thought: