Wager Mage
Photo by cottonbro studio Pexels Logo Photo: cottonbro studio

Can soccer be predicted?

Indeed, the bookmakers are very accurate at predicting soccer outcomes. If we plot the implied probabilities of odds versus the probability of actual match outcomes, we get a pretty straight line, implying high positive correlation.

How often should you flop a set?
How often should you flop a set?

On the flop, there's about an 11.8% chance you'll flop at least a set (that includes full houses and quads, too). That means for set miners like...

Read More »
Can you write off bovada losses?
Can you write off bovada losses?

You Can Deduct Losses if You Itemize Gambling losses can be deducted up to the amount of gambling winnings. For example, if you had $10,000 in...

Read More »

What I’ve Learnt Predicting Soccer Matches with Machine Learning

I’ve always been fascinated by the markets. Maybe it started in my teens when my mate told me this “sure-win” betting strategy that involved betting on football matches being a draw and doubling my bet until I won — technically, he wasn’t wrong, but technically, I also did not have an infinite bankroll, so thanks a lot ZJ. When I first heard of machine learning, I thought it was so much better than modelling football using traditional statistics, partly because of the restricting assumptions of those models and partly because I was pretty lazy to learn R at the time. That was 1.5 years ago, and since then I’ve picked up Python (so much easier than R!) and read/applied everything about machine learning that I could find and finally created a model that’s slightly better than a martingale strategy. There is still a lot more to do, but this essay aims to consolidate what I’ve learnt so far and to share with anyone who’s starting out. 1. The bookmakers are really good at their job, i.e. markets are quite efficient “I’d compare stock pickers to astrologers but I don’t want to bad mouth astrologers” — Eugene Fama In Steven Levitt’s paper on betting markets, he argued that market makers in betting markets operate very differently from financial markets because they are better at predicting matches than the crowd. Hence they can set the prices (odds) and not need to match buyers to sellers. Indeed, the bookmakers are very accurate at predicting soccer outcomes. If we plot the implied probabilities of odds versus the probability of actual match outcomes, we get a pretty straight line, implying high positive correlation. Funnily, you can even beat them using their own odds[2] but it only works in a limited way(essentially arbitraging across different bookies). So if the market is efficient, why bother trying? Well, it’s because like the efficient market hypothesis in finance, it isn’t always true. Right before the match starts, the implied probability from the odds reflect the outcome probability. But days and hours before the match and after it begins, emotions finds its way into the crowd and that may swing the odds in our favour if we can capture it fast and act on the true probability. This is where using machine learning can (hopefully) give us the edge over non-computational bettors.

2. Ensembles are really good algorithms to start and end with

Do gambling sites report to IRS?
Do gambling sites report to IRS?

If you win money betting on sports from sites like DraftKings, FanDuel, or Bovada, it is also taxable income. Those sites should also send both you...

Read More »
What does negative moneyline mean?
What does negative moneyline mean?

The negative number shows how much has to be risked to win a $100 payout. Thus, if the money line for the team that you picked was -400, it means...

Read More »

I wish I could say that I used sexy deep neural nets to predict soccer matches, but the truth is, the most effective model was a carefully-tuned random forest classifier that I first experimented with for its simplicity. I tried almost every algorithm in sklearn, xgboost and also neural nets, but random forest was still the most stable of them all.

3. Removing features can help improve predictability

“The more you know, the less you need.” ― Yvon Chouinard

When I first started the project, I just threw everything on the wall and see what stuck, and then kept dreaming up more features to improve my results. But as I went through fastai’s Machine Learning course, I learnt that removing redundant features actually improved my accuracy, mostly because they were noise that made my model’s job harder. And given that we are able to see what features are driving our predictions, machine learning really isn’t a mysterious black box that can’t be trusted.

4. Test everything, especially your baked-in assumptions

“Everything that can be tested must be tested” — Victor Niederhoffer

There are so many things that can be tweaked in feature engineering and modelling, and I try to test everything that can be tested to predict and generalise better. Given a buffet of features/metrics to choose from, sometimes it can be tempting to try other features when something works good enough. I remember trying out average goals in past n games as a metric and got decent results. I was all ready to move on, but then I saw a similar metric, exponentially weighted mean. In my head, I thought the improvement in predictability, if any, was going to be marginal, so I wanted to try something more exciting. But being paranoid, I decided to test it quickly, and what’d ya know, it was actually a much stronger predictor than the average indicator. You never know what will work until you try it.

5. Prediction is only part of the equation.

After you predict the outcome, the job is not done. The point is to outsmart the bookies, which means we must actually make money in the long run. Because the aim is to make money, using standard evaluation metrics like accuracy/validation loss is not a good measure of whether our goal is met. Hence, I multiplied bookmaker odds by the predicted probability of each correct outcome to see how profitable the model was.

Which option is the best in football betting?
Which option is the best in football betting?

Best Soccer Betting Strategies Betting on corners. If you want to remain successful in soccer betting, you have to be open-minded. ... Betting on...

Read More »
Is quads better than a full house?
Is quads better than a full house?

Four of a kind, also known as quads, is a hand that contains four cards of one rank and one card of another rank (the kicker), such as 9♣ 9♠ 9♦ 9♥...

Read More »

6. Jupyter notebooks are a game changer

After I learnt Python/Machine Learning and started applying what little I knew about, I continued using a recommended text editor to write all my code and then running the code in terminal. Text editors are great and I still use it for school and for reading scripts I download. But Jupyter changed the way I experimented. Instead of waiting to run the entire python script to see what my edit produced, I could run changes in the cell itself interactively. It took a while to get used to the workflow and keyboard shortcuts, but once I did, my iteration cycles shortened immensely and I’ve never looked back.

7. It never ends.

This is a 10 year journey that I decided for myself in 2018, and will continue to chip away at it for the years to come and apply what I’ve learnt in other markets. As new metrics/research come up, it’s a continuous journey to keep learning and testing — good thing I love the process.

References

[1] How do markets function? An empirical analysis of gambling on the national football league, Steven D. Levitt [2] Beating the bookies with their own numbers — and how the online sports betting market is rigged, Lisandro Kaunitz, Shenjun Zhong, Javier Kreiner

Which online casinos allow VPN?
Which online casinos allow VPN?

Casinos that allow VPN gambling Stake.com. Stake.com, founded in 2017, is a safe and reliable site for gambling that also allows VPN gambling. ......

Read More »
Is a job worth your mental health?
Is a job worth your mental health?

A healthy work life enhances your personal life. Employees who love their jobs have a greater sense of well-being. When work depletes your energy...

Read More »
Who is the most successful football tipster?
Who is the most successful football tipster?

1. JK Diego's Draw Betting System. So the moment you have all been waiting for…the number one position in our Best Football Tipster rankings…is the...

Read More »
Does anyone make a living off of sports betting?
Does anyone make a living off of sports betting?

Sports betting can be profitable, but the majority of bettors lose money, which is why sportsbooks exist. Sports betting is not always profitable...

Read More »