implied_probabilities: Implied probabilities from bookmaker odds.

Description Usage Arguments Details Value References Examples

View source: R/implied_probabilities.R

Description

This function calculate the implied probabilties from bookmaker odds in decimal format, while accounting for overround in the odds.

Usage

1
2
3
4
5
6
7
implied_probabilities(
  odds,
  method = "basic",
  normalize = TRUE,
  grossmargin = 0,
  shin_method = "js"
)

Arguments

odds

A matrix or numeric of bookmaker odds. The odds must be in the decimal format.

method

A string giving the method to use. Valid methods are 'basic', 'shin', 'bb', 'wpo', 'or', 'power', 'additive', and 'jsd'.

normalize

Logical. Some of the methods will give small rounding errors. If TRUE (default) a final normalization is applied to make absoultely sure the probabilities sum to 1.

grossmargin

Numeric. Must be 0 or greater. See the details.

shin_method

Character. Either 'js' (defeault) or 'uniroot'. See the details.

Details

The method 'basic' is the simplest method, and computes the implied probabilities by dividing the inverted odds by the sum of the inverted odds.

The methods 'wpo' (Weights Proportional to the Odds), 'or' (Odds Ratio) and 'power' are form the Wisdom of the Crowds document (the updated version) by Joseph Buchdahl. The method 'or' is origianlly by Cheung (2015), and the method 'power' is there referred to as the logarithmic method.

The method 'shin' uses the method by Shin (1992, 1993). This model assumes that there is a fraction of insider trading, and that the bookmakers tries to maximize their profits. In addition to providing implied probabilties, the method also gives an estimate of the proportion if inside trade, denoted z. Two algorithms are implemented for finding the probabilities and z. Which algorithm to use is chosen via the shin_mehod argument. The default method (shin_method = 'js') is based on the algorithm in Jullien & Salanié (1994). The 'uniroot' method uses R's built in equation solver to find the probabilities. The uniroot approach is also used for the 'pwr' and 'or' methods. The two methods might give slightly different answers, especially when the bookamer margin (and z) is small.

The 'bb' (short for "balanced books") method is from Fingleton & Waldron (1999), and is a variant of Shin's method. It too assume a fraction of insiders, but instead of assuming that the bookmakers maximize their profits, they minimize their risk.

Both the 'shin' and 'bb' methods can be used together with the 'grossmargin' argument. This is also from the Fingleton & Waldron (1999) paper, and adds some further assumption to the calculations, related to opperating costs. grossmargin should be 0 (default) or greater, typical range is 0 to 0.05. For values other than 0, this might sometimes cause some probabilities to not be identifiable. A warning will be given if this happens.

The method 'jsd' was developed by Christopher D. Long, and described in a series of Twitter postings and a python implementation posted on GitHub.

Value

A named list. The first component is named 'probabilities' and contain a matrix of implied probabilities. The second is the bookmaker margins (aka the overround). The third depends on the method used to compute the probabilities:

The fourth compnent 'problematic' is a logical vector called indicating if any probabilites has fallen outside the 0-1 range, or if there were some other problem computing the probabilities.

References

Examples

1
2
3
4
5
6
7
8
9
# Two sets of odds for a three-outcome game.
my_odds <- rbind(c(4.20, 3.70, 1.95),
                c(2.45, 3.70, 2.90))

# Convert to probabilities using Shin's method.
converted_odds <- implied_probabilities(my_odds, method='shin')

# Look at the probabilities
converted_odds$probabilities

implied documentation built on July 14, 2021, 5:10 p.m.