Building a sports betting algorithm is no fun. It takes hours and hours of entering data, sorting spreadsheets, setting up databases, testing, and more testing. And all this is no guarantee that it’s going to start spitting out winners like an ATM. But if you love sports and sports betting, it can be an amazing thing to create.
Bookmakers have math geniuses with degrees up the wazoo from the finest schools in the world working day and night with every possible tool at their disposal in order to compose the odds/lines/spreads that the whole world is trying to beat. It’s going to take time and a boatload of effort to create an algorithm that can win, but if you feed the beast the right info, you can create a winning formula. So where do you start?
Data, Data, and More Data
Your model is going to need data and tons of it – the more you put in, the better your algorithm is going to turn out. It is just as important what data you put into the model. A deep knowledge of whatever sport you are building the algorithm for is of the utmost importance. Go through your mind thinking, “What are the important stats in determining the outcome of a game?” And then you can start importing them into your model.
Let’s look at football and the key stats that determine the outcome of a game: Win-lost record, points scored, points allowed, yards gained on the ground, yards gained passing, turnovers, penalties, home or road game, time of possession, kicking, punting, kick and punt returns, Red Zone efficiency for offense and defense, and third-down efficiency. There are probably a hundred more pieces of data that go into making the algorithm for football. Now comes the hard part – How do you weight that data so it all balances out? This takes time, trial, and error.
Before you start betting real money, run the algorithm against games in the past and determine its accuracy in those past games. You should keep tweaking and changing the weighting so that the results are more accurate with the past performance.
Where Does the Data Come From?
Many services out there can provide you with all the data you need to create your algorithm. Some of them are free, and some of the deeper dives can cost you an arm and a leg.
To save yourself money and the unholy hell that can be data entry in creating your model, I would strongly suggest investing in some data scraping software. This software will allow you to scrape data from websites directly into spreadsheet format. Learning how to do this (and it’s fairly simple these days with the great range of intuitive software available) will save you hours, if not days or weeks, in data collection as well as the subscription cost of paid services.
Other Models to Learn From
Before beginning the process, I would take a deep dive into some of the other, more popular data-driven algorithms that predict sports and football. One is the ESPN Football Power Index that aggregates stats and determines the probability of one team beating the other.
Analytics Powerhouse FiveThirtyEight runs scores of football predictions using their ELO method. It also runs an annual contest to see if people can defeat their algorithm. They even let you take a peek into their code, which can help serve as a template for your algorithmic adventure: NFL ELO GAME.
A third company, Accuscore, out of Sweden, runs Monte Carlo simulations on sporting events around the world. They play the game 10,000 times using their program and spit out the most likely result of the game. The company has information on its site that can also help out.
You’re going to have to love sports and sports betting to go through all the painstaking work it takes to create a sports betting algorithm. But if you can do the groundwork and stick to a game plan, I’m pretty sure you can create something that will bring you joy and maybe even a few extra dollars.