Fundamentals 11 min read

Master the Kelly Criterion: Optimize Betting and Investment Returns

This article explains the Kelly Criterion, its mathematical formula, practical application with a biased‑coin example, detailed derivation, Python simulation code, and a balanced evaluation of its strengths and limitations for gambling and investment strategies.

Model Perspective
Model Perspective
Model Perspective
Master the Kelly Criterion: Optimize Betting and Investment Returns

The piece, sparked by the movie "孤注一掷," introduces the Kelly Criterion—a mathematical method for determining the optimal fraction of capital to wager in gambling or investing to maximize long‑term growth while controlling risk.

What is the Kelly Formula?

The Kelly Formula calculates the optimal betting proportion f* as:

<code>f* = (b * p - q) / b</code>

where b is the odds (win payout per unit bet), p is the probability of winning, and q = 1 - p is the probability of losing.

f*: optimal betting fraction of total capital.

b: odds (win amount divided by loss amount).

p: probability of a win.

q: probability of a loss (equal to 1‑p).

How to Apply

Using a simple biased‑coin game (60% heads, 40% tails) with an initial capital of 1000 units, the Kelly Criterion suggests betting 20% of the current bankroll each round. Betting too much (e.g., 50%) risks rapid ruin, while betting too little (e.g., 5%) leaves potential gains untapped.

Mathematical Derivation

Assume a player starts with capital C₀ , faces a game with win probability p , loss probability q , and odds b . If the player wagers a fraction f of the capital, the expected logarithmic utility after one round is maximized when f satisfies the Kelly formula above. This derivation relies on maximizing the expected log of wealth, a common utility function in finance.

Simulation Verification

A Python simulation compares the Kelly‑optimal fraction with other betting fractions (10%, 30%, 50%, 90%). The code below computes the optimal fraction and runs 50 betting rounds for each strategy, plotting capital trajectories.

<code>import numpy as np
import matplotlib.pyplot as plt

# Initial capital
initial_capital = 1000

# Number of bets
num_bets = 50

# Game parameters
p_game = 0.6   # winning probability
q_game = 0.4   # losing probability
b_game = 1     # odds

# Optimal Kelly fraction
f_optimal = (b_game * p_game - q_game) / b_game
f_optimal_percentage = f_optimal * 100
print(f_optimal_percentage)

# Betting fractions to compare
betting_fractions = [0.10, f_optimal, 0.30, 0.50, 0.90]

def simulate_bets(betting_fraction, p, num_bets, initial_capital):
    capital = initial_capital
    capital_history = [capital]
    for _ in range(num_bets):
        bet_amount = betting_fraction * capital
        win = np.random.rand() < p
        capital += bet_amount if win else -bet_amount
        capital_history.append(capital)
    return capital_history

plt.figure(figsize=(12, 6))
for fraction in betting_fractions:
    capital_history = simulate_bets(fraction, p_game, num_bets, initial_capital)
    plt.plot(capital_history, label=f'Betting fraction: {fraction*100:.2f}%')

plt.title('Capital Evolution for Different Betting Fractions')
plt.xlabel('Number of Bets')
plt.ylabel('Capital (units)')
plt.grid(axis='y')
plt.legend()
plt.show()
</code>

The chart shows that the Kelly‑recommended 20% fraction yields the highest long‑term growth, while lower fractions grow slowly and higher fractions cause volatile or losing outcomes.

Repeated simulations illustrate that results vary due to randomness, betting fraction choice, short‑term volatility, and the number of simulation runs.

Evaluation

Long‑term growth: maximizes capital growth over many bets.

Risk management: avoids ruin by limiting bet size.

Broad applicability: useful in finance, gambling, and risk‑management contexts.

Requires accurate probability and odds estimates; errors can degrade performance.

Ignores psychological factors; some may find the recommended stakes uncomfortable.

Short‑term volatility: performance can fluctuate widely before long‑term benefits appear.

Safest Gambling Strategy

Because accurate odds are often unavailable and gambling carries inherent uncertainty, the most reliable strategy is simply not to gamble. Responsible, law‑abiding behavior is emphasized.

Risk ManagementsimulationPythonprobabilityBetting StrategyInvestmentKelly Criterion
Model Perspective
Written by

Model Perspective

Insights, knowledge, and enjoyment from a mathematical modeling researcher and educator. Hosted by Haihua Wang, a modeling instructor and author of "Clever Use of Chat for Mathematical Modeling", "Modeling: The Mathematics of Thinking", "Mathematical Modeling Practice: A Hands‑On Guide to Competitions", and co‑author of "Mathematical Modeling: Teaching Design and Cases".

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.