Kelly began by analyzing games with a binary win-lose outcome. The key variables are:
- b: The odds define the amount won for a $1 bet. Odds = 5/1 implies a $5 gain if the bet wins, plus recovery of the $1 capital.
- p: The probability defines the likelihood of a favorable outcome.
- f: The share of the current capital to bet.
- V: The value of the capital as a result of betting.
The Kelly rule aims to maximize the value's growth rate, G, of infinitely-repeated bets:
When W and L are the numbers of wins and losses, then:
We can maximize the rate of growth G by maximizing G with respect to f, as illustrated using sympy as follows:
from sympy import symbols, solve, log, diff
share, odds, probability = symbols('share odds probability')
Value = probability * log(1 + odds * share) + (1 - probability) * log(1
- share)
solve(diff(Value, share), share)
[(odds*probability + probability - 1)/odds]
We arrive at the optimal share of capital to bet: