↓ Skip to main content
All methods

stakepd.payout

Function → float or Series
Signature
spd.payout(stakes, odds, odds_type)

Calculate the payout of a bet, or of a Series of bets.

The payout is the total returned if the bet wins, including the original stake.

Parameters

stakes:float, int or pandas.Series
A stake, or a Series of stakes.
odds:float, int or pandas.Series
Odds in odds_type format. Must be a scalar if stakes is a scalar, or a Series of the same length if stakes is a Series.
odds_type:{'decimal', 'fractional', 'american', 'implied_probability'}
Format of odds.

Returns

float
The payout, if stakes and odds are scalars.
pandas.Series
Payouts, if stakes and odds are Series. Same length as the inputs.

See also

stakepd.profit
Payout minus stake.
stakepd.kelly_criterion
Calculate how much to stake on a positive-EV bet using the Kelly criterion.

Notes
#

With decimal odds, payout = stakes * odds. Other odds types are converted to decimal first.

Examples
#

import pandas as pd
import stakepd as spd

Scalar:

stakes = 100
odds = 2
payouts = spd.payout(stakes, odds, 'decimal')
print(payouts)
Output:
200

Series:

stakes = pd.Series([100, 50, 10])
odds = pd.Series([2.0, 3.0, 1.5])
payouts = spd.payout(stakes, odds, 'decimal')
print(payouts)
Output:
0    200.0
1    150.0
2     15.0
dtype: float64

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