Kelly Criterion and Optimal Betting Strategy

Ziyi Zhu / November 24, 2022
8 min read • ––– views
John L. Kelly Jr. is credited with developing the fundamental concept of using logarithmic utility in gambling and repeated investment scenarios, now widely known as the Kelly criterion. This mathematical framework has profound implications for investors and gamblers alike. Kelly's groundbreaking work demonstrated two critical insights: first, that logarithmic utility functions maximize long-term wealth growth rates, and second, that this approach is "myopic" in a beneficial way—meaning that period-by-period optimization based solely on current capital is optimal for long-term results. In practical terms, a sizing strategy that employs the Kelly fraction consistently outperforms other proportional betting schemes over time.
The Kelly Criterion: Mathematical Foundation
Let's examine a fundamental scenario using Bernoulli trials—a sequence of independent events where one either wins with probability or loses with probability . Kelly's analysis revealed that maximizing an investor's long-term fortune growth rate is mathematically equivalent to maximizing the expected value of the logarithm of each period's wealth.
If we define the payoff structure as gaining units for a win and losing unit for a loss, then:
- The edge is represented by (expected value per unit wagered)
- The odds are given by (units won per unit wagered)
- The expected capital growth can be expressed as:
In this equation, represents the fraction of total wealth wagered on each trial. Through calculus, we can derive the optimal wager fraction:
This elegant formula reveals a profound insight: the optimal betting size is the ratio of edge to odds. This approach doesn't maximize expected wealth, which could lead to dangerous betting patterns. Instead, it maximizes typical wealth, acknowledging that average values can be heavily skewed by extremely unlikely outcomes (like winning every single trade). By optimizing the logarithm of expected wealth, we effectively eliminate the possibility of bankruptcy—a crucial safeguard for any long-term investment or betting strategy.
The Philosophy Behind Logarithmic Utility
The adoption of logarithmic utility isn't arbitrary. It follows from the well-established economic principle of declining marginal utility of wealth. This concept suggests that the marginal utility of money should be proportional to one's current wealth. In simpler terms, both wealthy and less affluent individuals tend to be similarly concerned about a 10% decrease in their wealth, regardless of the absolute dollar amount.
Looking at this another way, the utility derived from spending 10% of one's wealth remains consistent across different wealth levels. Economists and decision theorists often refer to this phenomenon as risk aversion or concavity, concepts that form the cornerstone of modern decision theory and portfolio management.
The logarithmic utility function elegantly captures this risk-averse behavior while maintaining mathematical tractability, making it both theoretically sound and practically applicable.
Developing an Optimal Betting Strategy
Edward O. Thorp, a pioneer in quantitative finance, extensively discusses the general theory of optimal betting on favorable games or investments in his comprehensive work, The Kelly Capital Growth Investment Criterion.
We define favorable games as those with strategies satisfying:
Where represents the investor's capital after trials. This formula indicates that with the right strategy, the probability of maintaining positive capital approaches certainty as the number of trials increases.
One particularly fascinating application of Kelly's principles emerges in sports betting when bettors place wagers on multiple games simultaneously. This scenario also appears in blackjack when players bet on multiple hands or when several players pool their bankroll.
Multiple Simultaneous Bets
Consider placing simultaneous bets on two independent favorable events (like coin flips) with betting fractions and and with success probabilities and respectively. The expected growth rate becomes considerably more complex:
To identify the optimal betting fractions and , we need to solve the simultaneous equations and . While this becomes mathematically intensive, the principle remains consistent with Kelly's original insights.
In practical applications, simultaneous sports bets typically involve different games and are limited in number, making them approximately independent. In such cases, the optimal betting fractions are moderately less than what would be recommended for single bets considered in isolation. However, when betting on correlated markets within the same sporting event (like betting on both the winner and the total score), ignoring these correlations can lead to significant deviations from truly optimal betting fractions.
Exploiting Correlations through Hedging
An important extension of Kelly's framework is the concept of hedging—a technique that can be particularly powerful when extreme correlations exist between betting opportunities. A risk-averse investor can strategically acquire combinations of securities or place complementary bets where positive expectations add together while risks tend to cancel each other out.
It's worth noting that the Kelly formula may recommend very large betting fractions when the estimated edge is particularly high or when odds are low. This mathematical reality highlights the importance of accurate probability estimates and the potential dangers of overconfidence in one's edge.
Numerical Approaches to Kelly Optimization
For complex betting scenarios, we often need to resort to numerical methods. Consider the general case where represents the vector of outcomes across events with a joint probability distribution . The expected growth rate can be expressed as:
It's crucial to recognize that for precise solutions or accurate numerical approximations to simultaneous betting problems, merely knowing covariance or correlation information is insufficient. We need the complete joint probability distribution to properly construct the growth function .
Let's examine two simplified scenarios—one where outcomes are mutually exclusive (the joint probability of simultaneous events is zero) and another where outcomes are independent (joint probabilities equal the product of individual probabilities):
def expected_growth_rate_coeff(f, probs, odds, mode="exclusive"):
if mode == "independent":
outcomes = np.stack(list(itertools.product([0, 1], repeat=np.size(f))))
p = np.prod(np.where(outcomes, probs, 1 - probs), axis=-1)
elif mode == "exclusive":
outcomes = np.identity(np.size(f))
p = np.copy(probs)
return np.sum(p * np.log(1 + np.sum(f * (outcomes * odds - 1), axis=-1)))
With this function in place, we can employ numerical optimization methods to maximize the expected growth rate and determine optimal betting fractions:
def kelly_criterion(probs, odds, mode="exclusive", allow_short=False):
tol = 1e-6
bound = (-1 + tol, 1 - tol) if allow_short else (0, 1 - tol)
con = {'type': 'ineq', 'fun': lambda f: 1 - tol - np.sum(np.abs(f))}
res = minimize(
lambda f: -expected_growth_rate_coeff(f, probs, odds, mode),
np.zeros(np.size(probs)),
bounds=[bound] * np.size(probs),
constraints=con,
tol=1e-12
)
return np.array(res.x)
One fascinating insight from this numerical approach is that it automatically identifies and exploits arbitrage betting opportunities in mutually exclusive events. When a guaranteed profit is possible, the algorithm will allocate the maximum allowable fraction to such bets.
However, real-world arbitrage betting comes with practical challenges, including the risk of bet cancellation and odds fluctuations (slippage). These uncertainties can result in unmatched bets, potentially creating significant losses that would require numerous successful bets to recover from.
Comparing Kelly Strategies: Simulation Results
Monte Carlo simulation offers a powerful way to compare different betting strategies empirically. By repeatedly sampling from the same probability distribution of outcomes and tracking profit over time (plotted on a logarithmic scale), we can visualize the relative performance of various approaches.
These simulations reveal a critical insight: sequentially betting on individual events yields significantly worse performance than an optimal Kelly strategy that properly accounts for the joint probability distribution of outcomes. This highlights the importance of considering the interactions between different betting opportunities rather than treating each in isolation.
Practical Considerations: Managing Kelly Volatility
While theoretically optimal, Kelly sizing can lead to extremely volatile performance with substantial drawdowns. Additionally, any errors in edge estimation can compound this volatility. To address these challenges, experienced practitioners often adopt a fractional Kelly approach—deliberately betting a fixed percentage (like 50% or 25%) of the recommended Kelly fraction.
This conservative modification allows investors and bettors to fine-tune their risk exposure at the cost of somewhat reduced expected returns. Many professional gamblers and investors find this trade-off worthwhile, as it provides insurance against overestimation of edge while still capturing much of the growth potential from favorable betting opportunities.