⚽Evaluating Soccer Betting Strategies with Real Odds

My brother Alexander Zilke is a professional statistician, and he once shared an intriguing statistical phenomenon he discovered: under certain circumstances, soccer sports bets could be profitable in the long run. What is typically believed to be a profit-exclusive domain for sports betting providers appeared to be achievable for us as well.

Alexander conducted several samples and even placed real bets, yielding profits after accounting for all associated costs. To ensure that these results weren’t merely due to a lucky streak, we realized we needed more data to prove his strategy was statistically significant and consistently profitable.

Combining Alexanders’s statistical expertise with my passion for automation, we launched a project to collect soccer betting odds over time and analyze the performance of various strategies using real-world data.

Project Overview

To support this project, we developed the OddMentor application with two primary objectives:

Below is a simplified overview:

system-context.svg

Since November 2022, OddMentor has been continuously fetching odds for all scheduled and live soccer games, updating every few seconds. Over the span of two years, the application has collected data on over 80.000 soccer games and more than 10 million odds—and it’s still going strong! This extensive dataset allows us to thoroughly evaluate various betting strategies and analyze their performance over time.

Each strategy implementation begins by retrieving all relevant information about a soccer event. It then processes the odds one by one, incorporating details such as the current score, minutes played, and more. For each changing odd, the strategy can choose to place a bet on a Team, predict a draw or opt not to bet at all. This approach simulates real-world betting scenarios, using only the information that would have been available at that moment in time. Once the simulation is complete, we can calculate the profit for each strategy across all soccer games in our database.

Outcome

Let’s start by testing a very simple strategy: placing a single bet of 1€ on the home team for every game. As you might have guessed, this strategy is not profitable at all. If you had bet 1€ on the home team for over 80.000 events in the past two years, you would have incurred a total loss of 12.160,76€. The graph below provides a visual representation of the results over time:

home-team.png

Now, let’s explore a more conservative strategy: betting on the team that is leading by at least 2 goals in the second half of the game. It’s important to note that the odds in these situations are typically quite low. Additionally, the simulation accounts for a 5% sports betting tax, meaning only odds of 1.06:1 or higher have the potential to yield a profit. This strategy will disregard lower odds. The results of the simulation are as follows: If you had bet 1€ on the leading team in these scenarios across approximately 8.500 games, you would have ended up with a total loss of 452,51€:

2-goals-ahead.png

Alright, we now understand that the sports betting provider is typically the one who profits in the long run. But how does Alexander’s strategy perform? Over the course of two years, Alexander’s strategy placed bets on more than 2,200 soccer events. If the strategy had wagered 1€ on each event, the maximum profit of 202,73€ would have been achieved within just a few months. Ultimately, the total profit would amount to 47,52€:

Alex-strategy.png

This diagram illustrates that Alexander’s strategy has the potential to generate profit, but with some limitations. In this simulation, the strategy is only profitable at the end due to a significant upswing at the beginning. The results indicate that the profits from this strategy are not consistent enough to justify betting real money. However, we are not stopping here. We will continue our investigation, and perhaps one day, the strategy will prove to be profitable in a more reliable manner.

Key Technologies and Tools

OddMentor is a Java-based application using Spring Boot and MongoDB. Java is my primary programming language, and Spring Boot provides several essential features, such as scheduled tasks for fetching odds and Spring Data for seamless database integration.

I chose MongoDB over a traditional relational database to accommodate the flexible storage of event-related information. This choice allows us to easily add new attributes without modifying the database schema. Additionally, the Java MongoDB Driver’s support for reactive streams is particularly beneficial. It efficiently handles millions of odds, greatly enhancing our ability to simulate and evaluate betting strategies.

Learnings

The implementation of OddMentor was particularly interesting because it is relatively easy to understand at the domain level and involved straightforward steps, such as fetching and storing odds. The challenging aspect was creating a performant implementation for the simulation. Thanks to reactive streams and a Domain-Driven-Design, I was able to achieve a clean and efficient solution.

For me, it was crucial to have the ability to add more strategies and simulate them to evaluate their performance. This resulted in a well-structured abstraction for strategies.