NHL Moneyline Betting Model

Introduction

Calculating the expected winner in hockey is particularly difficult as there is a large amount of randomness involved in the sport. In this model, we will be predicting each team's PROBABILITY of winning using statistical or machine learning models. The goal of this model is to be profitable in NHL MONEYLINE betting.


Probabilities & Moneylines

Moneylines can be converted to probabilities and probabilities can be converted to moneylines. Betting the moneyline is betting that a team will win, straight-up. This is different from betting the spread where you either get free points or give up points when betting on a team.

The Long Game: Probabilistic Betting

We don't have to predict a team to win when Vegas is expecting them to lose, we simply need our model to be closer to the probability of them winning than Vegas is giving them.

For example:
If Vegas is giving Team A a 30% chance of winning, but they really have a 40% chance of winning, then we have potential to make money in the long run. If this game plays out 100 times, Team A will still lose 60% of the time, both we and Vegas can predict them to lose the matchup because that is most probable. However, the moneyline is priced to win 3 out of 10 games, but in reality they will win 4 out of 10 and that 1 extra win puts us in a profitable position.

Why does this work?

At a very simple high level, Vegas does not make money by setting their lines based on each team's probability of winning. They make the most money by having an equal amount of money bet on either team. So they need to set their lines based on what they think people will bet, not solely based on what they think the outcome of the game will be.


The Data

We use game data collected by Moneypuck and the closing lines of various online sportsbooks.

The game data is used to calculate each team's opponent adjusted strength in the different aspects below. You can read more about the method used to obtain opponent adjusted strength here where we did something similar for NCAA Football.

How to win a hockey game

We calculate the team strength for each side of the puck (e.g. offense & defense) and for home ice advantage.

Control the puck
- On offense: Giveaways
- On defense: Takeaways
- Physically: Hits
- Man advantage: Penalty Minutes

Put the puck in the other team's net
- Take shots: Shot Attempts
- Take good shots: Expected Goals
- Be accurate with shots: Difference between actual goals and expected goals

Don't let the puck in your net
- Block shots: Blocked Shot Attempts
- Have a good goalie: Difference between actual goals and expected goals


The Model

A simple logistic regression model is the most profitable so far. Other models tested include:

  • Support Vector Machine
  • XGBoost
  • Neural Net
The above models did not perform as well even though they are more complex. In this situation, we do not benefit from the higher variance that can be achieved with the more complex models.

Feature Importance

1. Expected Goal Difference
The most important feature is the opponent adjusted expected goal difference. This feature shows us whether a team is scoring more goals than expected or fewer goals than expected based on the shots taken. The model expects each team to regress to the mean. In other words, if a team is scoring fewer goals than what should be expected based on their shots taken, then we know the team is creating good opportunities, unfortunately those good opportunities aren't panning out as goals. However, we would expect some of those shots to start finding the back of the net in coming games.

Wager Method

After testing multiple betting methods, the Kelly Criterion has emerged as the most profitable method of placing wagers. To decide how much to wager, this formula takes into account the difference between the implied win probability of the sportsbooks and the win probability predicted by our model.

Kelly Criterion Calculator

Results

The below results assume a constant bankroll size of 100u for the Kelly wagering method.


Code

Notebook demonstrating how the model works for the 2022 season.

View Notebook