↓ Skip to main content
All methods

pandas.DataFrame.overround

DataFrame method → Series
Signature
DataFrame.overround(odds_type='implied_probability')

Calculate the overround of each row of a DataFrame of odds.

Each row should hold one price for every outcome of a single market.

Parameters

odds_type:{'decimal', 'fractional', 'american', 'implied_probability'}, default 'implied_probability'
Format of the odds in the DataFrame.

Returns

pandas.Series
Overrounds as decimals, with the same index as the input DataFrame.

See also

pandas.Series.overround
Calculate the overround of a Series of odds.
pandas.DataFrame.vig
Calculate the vigorish (juice) of each row of a DataFrame of odds.
pandas.DataFrame.devig
Remove the vig from each row of a DataFrame of implied probabilities.

See Series.overround for how the overround relates to the vig and to devigged probabilities.

Examples
#

import pandas as pd
import stakepd as spd   # importing stakepd adds these methods to pandas objects

Example:

implied_odds = pd.DataFrame({"A": [0.8, 0.5], "B": [0.3, 0.7]})
overround_value = implied_odds.overround(odds_type = 'implied_probability')
print(overround_value)
Output:
0    0.1
1    0.2

This method is also covered, alongside the rest of the module, in the overview guide.