pandas.DataFrame.vig(odds_type='implied_probability')
Calculate the vigourish (vig or juice) values of a DataFrame of odds.
Parameters:
odds_type(str, optional): Type of odds provided. Supported values are'decimal','fractional','american', and'implied_probability'. Default is'implied_probability'.
Returns:
pandas.Series: Series of vigourish values corresponding to the row indexes of the input DataFrame.
Example:
import pandas as pd
import stakepd as spd
implied_probs = pd.DataFrame({"A": [0.8, 0.5], "B": [0.3, 0.7]})
vig_values = implied_probs.vig()
print(vig_values)
0 0.090909
1 0.166667
dtype: float64