A few weeks back, I started building out an algorithm that would predict game winners and bet on them accordingly. The system notched over 60% accuracy across 20 years of data. However, I found that just betting on the game winners alone wouldn't be sustainable after accounting for sportsbook fees, so I made some tweaks and these were the results:

None

You can read more about how the system, prediction, and odds work here: My Sports Betting Algorithm Might Be Bringing In Serious Dollars.

But today, I'll be going over an experimental change to the system where we take a much more active approach.

Background

This new system will be simple:

  1. Before the match starts, predict the game winner using the already built model and assign a probability.
  2. As the match begins, check every minute for changes in odds (probabilities) offered by sportsbooks.
  3. If within the first hour, there is a significant change in sportsbook odds that imply that your prediction is wrong, bet your original prediction at the new, better price.

Let's go over an example:

On a given date, the New York Yankees face the Boston Red Sox. Our algorithm estimates that the Red Sox will win with a 70% probability. The sportsbook agrees and offers odds of -250 (~70% probability). This means that we must bet $250 to make a $100 profit. If no later than an hour into the match, the Red Sox are losing 0–3 and the probability of them winning drops to 50% (odds of -100), then we will enter into the bet.

We use a 1-hour limit because in a 3-hour MLB game, if our team starts losing 2 and a half hours into the game, then they'll probably lose as there isn't much time for a comeback. Not only that, but most sportsbooks stop accepting new bets in the final few minutes of a game.

Let's visualize what this mid-game change in odds might look like:

None

We take this active approach so that we can negate the effect of paying the sportsbook's "vig". Paying $250 and only making $100 means that it only takes 1 loss to wipe out 2 games worth of profit. In sports betting, a wrong bet means an entire loss of the bet amount. Paying that kind of "vig" might be fine if you're betting a game once in a while, but in the long-run, it leads to ruin.

That changes drastically when we start paying "better" prices. If an outcome has a 70% probability of happening, but the price you pay for the bet implies a 50% probability, then this is a positive EV bet, and in the long-run, you'll actually be sustainably profitable. And that's what we're going for.

Results

This backtest follows the same ruleset as described above and will bet with fixed betting sizes of $100 each time. The data used will be from the 2022 MLB season from April to October. Here are the results:

None

Unfortunately, it looks like this approach doesn't work out that well. This poor performance is likely due to the sharpness of the sportsbooks. Even when the probability of the predicted team winning decreases, the books don't decrease the odds so drastically. So what happens is; usually a change would happen mid-game and the odds would go from -150 to -125 which is better, but still not great. The ultimate goal is to pay positive prices (e.g. +110, +150, etc.), so that on each trade (bet) we profit more than what we put in.

You may also notice that the prediction accuracy is much lower (compared to 60%), this is another testament of the book's accuracy. It shows that when they start to price-in that the original predicted team will now lose, they're generally right.

All-in, this approach results in a negative long-term Expected Value. You can calculate this by:

(amount won * percent of times won) + (amount lost * percent of times lost)

In our case, the math is:

(86.96 * .44) + (-100 * .56) = -17.74 (86.96 refers to the profit on winning bets at odds of -115 and bets of $100)

As long as the result of that formula is negative, the system is invalid in the long-run.

Final Thoughts

This example served as the baseline for an introduction to active, automated sports betting systems. As you can likely already see, there is quite a bit of overlap with stock trading.

Just like with trading, it's best for the strategy to feature an assortment of stocks (bet types), as opposed to just one. The next and future iteration of this system will feature a multi-asset (multiple bet types) approach whereby the system returns the most optimal assortment of bets for that day.

To get an idea of how that might look, visualize running our original process, but for totals (bets on total amount of points scored), spreads (how many points a team wins by), and game-winners, then having the program return the most confident bet of each.

If you'd like to follow along with the development, or if this just happened to pique your interest, head over to The Quant's Playbook where I do deep-dives on actionable and profitable activities just like this!

Happy trading! :)