Betfair Model

Betfair’s Golf Betting Prediction Model provides golf betting tips for the PGA and European tournaments. The data science tool rates every player’s probability for a particular course. It knows the strengths of each player, pulling data from PGA Tour Stats, and what courses they suit. As well as recent form and a variety of other metrics.

You get golf betting tips, and complementing copy, each week on the Betfair Hub. Plus you can see the model outputs for every player. Compare those with the odds on the Betfair Exchange and you’ll identify value betting opportunities. Both to Lay and to Back.

Betfair's API can be easily traversed in R. It allows you to retrieve market information, create/cancel bets and manage your account. Here's a collection of easy to follow API tutorials in R:

Betfair no deposit bonus
  • Betfair’s own Data Scientists have created a prediction model which produces ratings that you can use as Horse Racing Tips for nearly every thoroughbred meeting in Australia. The Model is built using Punting Form data. This includes Sectional Time data, benchmark ratings.
  • Betfair had the game priced up with Manchester United as 21/20 favourites to win the game, but the Infogol model, using expected goals, had Wolves the favourites to get the win (40%, around 6/4).
Betfair Model

Accessing the API using R¶

Set up R¶

Models Betfair has a team of Data Scientists, both in-house and external contractors, that build prediction models. They use dozens of quantitative variables, specific to each sport, that identify betting opportunities.

  • Download and install R – get the language set up on your computer
  • Download and install RStudio – you’ll need a program to develop in, and this one is custom-designed to work with R

Required Packages¶

Betfair’s Data Science team have created a new quantitative model that provides exclusive horse racing tips for every meeting, every day. The new predictive model uses stacked machine learning to predict the odds of each horse, relative to the field. These odds are then ranked from 1. The model has been copied but Betfair still dominates. The Betfair exchange includes one of the biggest range of sports in online gambling. Popular sports such as golf, horse racing, football, tennis and rugby union are displayed prominently on the sports navigation menu of the exchange homepage.

Two R packages are required:

The abettor package can be downloaded here. For an in-depth understanding of the package, have a read of the documentation. Instructions are also provided in the sample code.

Login to Betfair¶

To login to Betfair, replace the following dummy username, password and app key with your own.

If you don't have a live app key for the API yet take a look at this page.

Finding Event IDs¶

In order to find data for specific markets, you will first need to know the event ID. This is easily achieved with the abettor package.

Betfair Model

Betfair Nba Model

To find the event IDs of events in the next 60 days:

This will return a DataFrame of the following structure:

Finding Competition IDs¶

Once you have the event ID, the next logical step is to find the competition IDs for the event you want to get data for. For example, if you want to find the competition IDs for Australian Rules, you would use the following

Betfair Nrl Model

Betfair

This will return the following structured DataFrame:

Finding Specific Markets¶

The next logical step is to find the market that you are interested in. Furthering our example above, if you want the Match Odds for all Australian Rules games over the next 60 days, simply use the Competition ID from above in the following.

This returns a large DataFrame object with each market, participants and associated odds.

Get World Cup Odds Tutorial¶

This tutorial walks you through the process of retrieving exchange odds for all the matches from the 2018 FIFA World Cup 2018. This can be modified for other sports and uses.

You can run this script in R.

Betfair No Deposit Bonus

AFL Odds PulleR Tutorial¶

This tutorial walks you through the process of retrieving exchange odds for the the next round of Australian Rules.

Betfair Nfl Model

You can run this script in R.