Computes the Kelly stake fraction for a bet: the share of bankroll
that maximizes long-run log growth given your estimated win
probability and the quoted odds. Negative Kelly fractions (no edge)
are clamped to 0. Matches the semantics of ParlayAPI's keyless
/v1/calc/kelly endpoint.
Usage
pa_kelly(
prob,
odds,
odds_format = c("decimal", "american"),
fraction = 1,
bankroll = NULL
)Arguments
- prob
Numeric vector of estimated win probabilities in (0, 1).
- odds
Numeric vector of quoted odds for the bet.
- odds_format
"decimal"or"american".- fraction
Kelly multiplier, e.g.
1for full Kelly,0.5for half Kelly.- bankroll
Optional bankroll amount. When supplied, the return value is the recommended stake instead of the fraction.
Value
Numeric vector: the applied Kelly fraction of bankroll, or
the stake amount when bankroll is given.