Skip to main content

Module bet

Module bet 

Source
Expand description

Domain model representing a Bet used by betting-market integrations (e.g. prediction markets).

Structs§

Bet
A bet in a betting market.
BetPosition
A position comprising one or more bets.

Functions§

calc_bets_pnl
Calculates the combined profit and loss for a slice of bets.
check_probability_invertible
Checks that probability is invertible (not equal to 1.0).
check_probability_non_zero
Checks that probability is non-zero.
inverse_probability_to_bet
Converts a probability and volume into a Bet using the inverse probability.
probability_to_bet
Converts a probability and volume into a Bet.