Position Sizing & Leverage: Kelly Criterion Strategy › The Kelly Criterion

Michael BrenndoerferJanuary 23, 202616 min read
Quantitative FinanceAll chapters
Part 14 of 15Strategy Development and Backtesting
Chapter 75Position Sizing & Leverage: Kelly Criterion Strategy › The Kelly Criterion
Reading section 2 of 9 · The Kelly Criterion · 16 minSection 2 of 9 · 16 min

Book contents

Section 2 of 9 · 16 min read

Position Sizing & Leverage: Kelly Criterion Strategy › The Kelly CriterionOne section · Sections in this chapter2 / 9 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The Kelly Criterion, developed by John L. Kelly Jr. at Bell Labs in 1956, answers a simple question: Given an edge in a repeated game, what fraction of capital should be wagered to maximize long-term wealth growth? The same growth-rate logic, originally applied to information transmission over noisy channels, applies to repeated trading and investment decisions. The criterion emerges from a fundamental tension in betting: bet too small and you fail to exploit your edge, but bet too large and you risk catastrophic losses that compound negatively over time. Kelly's mathematical framework resolves this tension by identifying the unique betting fraction that maximizes the expected geometric growth rate of capital.

The Single-Bet Case

Consider a simple gambling scenario where you repeatedly face a bet with the following characteristics:

  • Win probability: pp
  • Loss probability: q=1−pq = 1 - p
  • Win payoff: bb (for every dollar wagered, you receive bb dollars profit)
  • Loss payoff: −1-1 (you lose your entire wager)

To understand why position sizing matters so critically, consider what happens when you repeatedly face this bet. If you bet fraction ff of your current capital on each round, the multiplicative nature of returns creates a fundamentally different dynamic than additive returns. After a win, your capital multiplies by (1+bf)(1 + bf), and after a loss it multiplies by (1−f)(1 - f). This multiplicative structure means that the sequence of wins and losses matters far less than you might expect: what matters is the geometric growth rate.

After nn trials with ww wins and l=n−wl = n - w losses, your final wealth WnW_n starting from initial wealth W0W_0 is:

Wn=W0(1+bf)w(1−f)lW_n = W_0 (1 + bf)^w (1 - f)^l

where:

  • WnW_n: final wealth after nn trials
  • W0W_0: initial wealth
  • nn: number of trials
  • bb: win payoff (profit per dollar wagered)
  • ff: fraction of capital wagered per trial
  • ww: number of wins
  • ll: number of losses

This formula captures the essence of compounding. Notice that wealth is a product of factors, not a sum. This multiplicative structure means that a single devastating loss can overwhelm many small gains. If you bet your entire capital (f=1f = 1) and lose even once, you're wiped out regardless of how many wins preceded or follow that loss.

Taking logarithms turns the multiplicative relationship into an additive one, which proves essential for analysis. The logarithm of wealth growth becomes:

log⁡(WnW0)=wlog⁡(1+bf)+llog⁡(1−f)\log\left(\frac{W_n}{W_0}\right) = w \log(1 + bf) + l \log(1 - f)

where:

  • WnW_n: final wealth
  • W0W_0: initial wealth
  • ww: number of wins
  • ll: number of losses
  • bb: win payoff
  • ff: fraction of capital wagered

This transformation reveals why logarithmic returns are natural for analyzing betting and investment: they turn compound growth into a sum of independent contributions from each trial.

The expected log growth per trial, which we call the geometric growth rate, captures the long-run behavior of the strategy. By the law of large numbers, over many trials the actual growth rate converges to this expected value. The geometric growth rate is:

G(f)=E[1nlog⁡(WnW0)]=plog⁡(1+bf)+qlog⁡(1−f)G(f) = \mathbb{E}\left[\frac{1}{n}\log\left(\frac{W_n}{W_0}\right)\right] = p \log(1 + bf) + q \log(1 - f)

where:

  • G(f)G(f): expected geometric growth rate per trial
  • pp: probability of winning
  • qq: probability of losing (1−p1-p)
  • bb: win payoff
  • ff: fraction of capital wagered

This function G(f)G(f) is the central object of Kelly's analysis. It is concave in ff, meaning it rises to a unique maximum and then falls. Betting nothing (f=0f = 0) yields zero growth, but betting everything (f=1f = 1) also yields negative expected growth for any realistic bet because the logarithm of zero (which you face after a loss with f=1f = 1) is negative infinity.

To find the optimal fraction f∗f^* that maximizes G(f)G(f), we apply standard calculus, differentiating with respect to ff and setting the derivative to zero:

dGdf=ddf(plog⁡(1+bf)+qlog⁡(1−f))=pb1+bf−q1−f\begin{aligned} \frac{dG}{df} &= \frac{d}{df}\left(p \log(1 + bf) + q \log(1 - f)\right) \\ &= \frac{pb}{1 + bf} - \frac{q}{1 - f} \end{aligned}

The first term represents the marginal benefit of increased betting: with probability pp, you win, and increasing your bet increases your logarithmic gain. The second term represents the marginal cost: with probability qq, you lose, and increased betting amplifies your logarithmic loss. At the optimal point, these marginal effects balance perfectly.

Setting the derivative to zero gives us the first-order condition:

pb1+bf−q1−f=0\frac{pb}{1 + bf} - \frac{q}{1 - f} = 0

where:

  • GG: expected growth rate
  • ff: fraction of capital wagered
  • pp: win probability
  • qq: loss probability
  • bb: win payoff

Solving for ff requires straightforward algebraic manipulation. We rearrange to isolate f∗f^*:

pb1+bf∗=q1−f∗  ⟹  pb(1−f∗)=q(1+bf∗)(cross-multiply)  ⟹  pb−pbf∗=q+qbf∗(expand terms)  ⟹  pb−q=pbf∗+qbf∗(group constants and variables)  ⟹  pb−q=bf∗(p+q)(factor out bf∗)  ⟹  pb−q=bf∗(since p+q=1)\begin{aligned} \frac{pb}{1 + bf^*} &= \frac{q}{1 - f^*} \\ \implies pb(1 - f^*) &= q(1 + bf^*) && \text{(cross-multiply)} \\ \implies pb - pbf^* &= q + qbf^* && \text{(expand terms)} \\ \implies pb - q &= pbf^* + qbf^* && \text{(group constants and variables)} \\ \implies pb - q &= bf^*(p + q) && \text{(factor out } bf^* \text{)} \\ \implies pb - q &= bf^* && \text{(since } p + q = 1 \text{)} \end{aligned}

The final step uses the fundamental probability constraint that win and loss probabilities must sum to one. This yields the celebrated Kelly formula:

f∗=pb−qb=p(b+1)−1bf^* = \frac{pb - q}{b} = \frac{p(b + 1) - 1}{b}

where:

  • f∗f^*: optimal fraction of capital to wager
  • pp: win probability
  • qq: loss probability
  • bb: win payoff (odds)

This result admits a clear interpretation. The numerator pb−qpb - q represents the expected profit per dollar wagered, often called the "edge." The denominator bb represents the odds. The optimal bet fraction is simply the edge divided by the odds. When the odds are generous (large bb), you can afford to bet more conservatively. When the odds are stingy (small bb), you must bet more aggressively to exploit a given edge.

This is the Kelly Criterion for a simple bet. For the special case of even odds (b=1b = 1), the formula simplifies even further:

f∗=2p−1=p−qf^* = 2p - 1 = p - q

where:

  • f∗f^*: optimal fraction for even odds
  • pp: win probability
  • qq: loss probability

The result is intuitive: bet a fraction equal to the edge (win probability minus loss probability). If you have a 60% chance of winning an even-money bet, you should wager 20% of your capital. This provides a concrete, actionable rule that balances the benefit of exploiting your edge against the risk of overbetting.

Out[2]:
Visualization
Curve of expected log growth per bet versus capital wagered. The peak at 10% is marked in teal, while a coral threshold and shaded region show where growth becomes negative beyond about 20%.
Expected geometric growth as a function of bet size for a wager with 55% win probability and 1:1 odds. Growth peaks at the 10% Kelly fraction and turns negative beyond roughly 20%, illustrating the sharp cost of over-betting.
Kelly Criterion

The Kelly Criterion states that to maximize the long-term geometric growth rate of capital, bet a fraction f∗=pb−qbf^* = \frac{pb - q}{b} of your capital on each wager, where pp is the win probability, q=1−pq = 1-p is the loss probability, and bb is the odds (profit per dollar wagered on a win).

Continuous Returns: Kelly for Trading

Real trading doesn't involve discrete binary outcomes. Instead, returns are continuous and approximately normally distributed over short horizons. We can derive a continuous version of the Kelly formula that applies directly to realistic trading scenarios where positions may gain or lose varying amounts.

Suppose a strategy has expected return μ\mu and volatility σ\sigma per period. If you apply leverage ℓ\ell (meaning you bet ℓ\ell times your capital), your leveraged return is rℓ=ℓ⋅rr_\ell = \ell \cdot r where r∼N(μ,σ2)r \sim N(\mu, \sigma^2). Leverage scales both the expected return and the volatility. The expected leveraged return is E[rℓ]=ℓμ\mathbb{E}[r_\ell] = \ell\mu and the variance is Var(rℓ)=ℓ2σ2\text{Var}(r_\ell) = \ell^2\sigma^2. Notice that variance scales with the square of leverage, which foreshadows the extreme danger of high leverage.

For small returns, which is a reasonable approximation for daily or weekly trading, the expected log return, which determines geometric growth, is approximately:

E[log⁡(1+rℓ)]≈E[rℓ]−12Var(rℓ)=ℓμ−12ℓ2σ2\begin{aligned} \mathbb{E}[\log(1 + r_\ell)] &\approx \mathbb{E}[r_\ell] - \frac{1}{2}\text{Var}(r_\ell) \\ &= \ell\mu - \frac{1}{2}\ell^2\sigma^2 \end{aligned}

where:

  • rℓr_\ell: leveraged return
  • ℓ\ell: leverage ratio
  • μ\mu: expected return of the strategy
  • σ2\sigma^2: variance of the strategy

This approximation uses the Taylor expansion log⁡(1+x)≈x−x22\log(1 + x) \approx x - \frac{x^2}{2} for small xx. The formula separates expected return from the cost of variance: the first term ℓμ\ell\mu is the expected arithmetic return, which increases linearly with leverage. The second term 12ℓ2σ2\frac{1}{2}\ell^2\sigma^2 is the variance penalty, sometimes called "volatility drag," which increases quadratically with leverage. This quadratic penalty is why unlimited leverage is disastrous: at high enough leverage, the variance penalty overwhelms any expected return.

To maximize this geometric growth rate, we differentiate with respect to ℓ\ell:

ddℓ(ℓμ−12ℓ2σ2)=ddℓ(ℓμ)−12σ2ddℓ(ℓ2)=μ−12σ2(2ℓ)=μ−ℓσ2\begin{aligned} \frac{d}{d\ell}\left(\ell\mu - \frac{1}{2}\ell^2\sigma^2\right) &= \frac{d}{d\ell}(\ell\mu) - \frac{1}{2}\sigma^2 \frac{d}{d\ell}(\ell^2) \\ &= \mu - \frac{1}{2}\sigma^2(2\ell) \\ &= \mu - \ell\sigma^2 \end{aligned}

The derivative has two terms: μ\mu represents the marginal benefit of increased leverage (more expected return), while ℓσ2\ell\sigma^2 represents the marginal cost (more variance penalty). Setting the derivative to zero identifies where these opposing forces balance:

μ−ℓσ2=0\mu - \ell\sigma^2 = 0

where:

  • ℓ\ell: leverage ratio
  • μ\mu: expected return
  • σ2\sigma^2: return variance

Solving this simple equation yields the continuous Kelly leverage formula:

ℓ∗=μσ2\ell^* = \frac{\mu}{\sigma^2}

where:

  • ℓ∗\ell^*: optimal leverage ratio
  • μ\mu: expected return
  • σ2\sigma^2: return variance

This formula is intuitive. Optimal leverage increases with expected return, as you should bet more aggressively when the edge is larger. Optimal leverage decreases with variance, as you should bet more conservatively when uncertainty is higher. The formula can be rewritten using the Sharpe ratio S=μ/σS = \mu/\sigma:

ℓ∗=μσ2=Sσ\ell^* = \frac{\mu}{\sigma^2} = \frac{S}{\sigma}

where:

  • ℓ∗\ell^*: optimal leverage ratio
  • μ\mu: expected return
  • SS: Sharpe ratio (μ/σ\mu/\sigma)
  • σ\sigma: return volatility

This alternative form reveals that optimal leverage is the Sharpe ratio divided by volatility. A strategy with higher Sharpe ratio warrants more aggressive position sizing because the edge relative to risk is larger. A strategy with lower volatility also warrants higher leverage because the same proportional bet involves less absolute risk. This formula provides the foundational insight for sizing trading positions optimally.

Properties of Kelly Betting

Kelly betting has several important mathematical properties that make it theoretically attractive:

  • Maximizes geometric growth rate: No other fixed-fraction strategy achieves higher long-term wealth growth. This optimality is exact under the model assumptions.
  • Never goes bankrupt: Since you only bet a fraction of capital, you always have something left, though it can become arbitrarily small. This contrasts with fixed-dollar betting, which can lead to complete ruin.
  • Variance increases with leverage: At Kelly leverage, the variance of log returns equals the squared Sharpe ratio: Var(log⁡W)=S2\text{Var}(\log W) = S^2 per unit time. This provides a direct link between strategy quality and wealth volatility.

However, Kelly betting also has significant drawbacks that limit its practical applicability:

  • Extreme drawdowns: Full Kelly can produce drawdowns of 50% or more with high probability, even for profitable strategies. These drawdowns are mathematically expected, not rare events, and they create severe psychological challenges for you.
  • Parameter sensitivity: The optimal fraction depends critically on μ\mu and σ\sigma, which must be estimated. Overestimating μ\mu or underestimating σ\sigma leads to overbetting, which can be catastrophic because overbetting beyond Kelly has worse expected growth than underbetting by the same proportional amount.
  • Assumes ergodicity: Kelly assumes you face the same bet repeatedly forever with unchanging parameters. Finite horizons or changing conditions violate this assumption, and the infinite-horizon optimal strategy may perform poorly over realistic investment horizons.

Fractional Kelly

Given the practical dangers of full Kelly betting, most practitioners use fractional Kelly, betting a fraction (typically 0.25 to 0.5) of the Kelly-optimal amount. This sacrifices some expected growth for substantially reduced variance and drawdown risk. The rationale is that we never know the true parameters μ\mu and σ\sigma, so using full Kelly based on estimates is almost certainly betting too aggressively.

If we denote the Kelly fraction multiplier as κ∈(0,1]\kappa \in (0, 1], the leveraged position becomes ℓ=κ⋅ℓ∗=κμσ2\ell = \kappa \cdot \ell^* = \kappa \frac{\mu}{\sigma^2}. The multiplier κ\kappa represents our conservatism: κ=1\kappa = 1 is full Kelly, κ=0.5\kappa = 0.5 is half-Kelly, and κ=0.25\kappa = 0.25 is quarter-Kelly.

The expected geometric growth rate at fractional Kelly follows from substituting the scaled leverage into our growth rate formula:

G(κ)=κℓ∗μ−12(κℓ∗)2σ2=κμ2σ2−12κ2μ2σ2(substitute ℓ∗=μ/σ2)=μ2σ2(κ−κ22)(factor out μ2/σ2)\begin{aligned} G(\kappa) &= \kappa \ell^* \mu - \frac{1}{2}(\kappa \ell^*)^2 \sigma^2 \\ &= \kappa \frac{\mu^2}{\sigma^2} - \frac{1}{2}\kappa^2 \frac{\mu^2}{\sigma^2} && \text{(substitute } \ell^* = \mu/\sigma^2 \text{)} \\ &= \frac{\mu^2}{\sigma^2}\left(\kappa - \frac{\kappa^2}{2}\right) && \text{(factor out } \mu^2/\sigma^2 \text{)} \end{aligned}

where:

  • G(κ)G(\kappa): expected geometric growth rate with fractional Kelly
  • κ\kappa: Kelly fraction multiplier (κ∈(0,1]\kappa \in (0, 1])
  • ℓ∗\ell^*: optimal full Kelly leverage
  • μ\mu: expected return
  • σ\sigma: volatility

This formula reveals the fundamental tradeoff in fractional Kelly. The term κ\kappa in the parentheses represents growth that increases linearly with aggressiveness, while the term κ2/2\kappa^2/2 represents the variance penalty that increases quadratically. As κ\kappa increases from zero, growth initially increases faster than the penalty, but eventually the penalty dominates.

At full Kelly (κ=1\kappa = 1), the growth rate is G(1)=μ22σ2G(1) = \frac{\mu^2}{2\sigma^2}. At half-Kelly (κ=0.5\kappa = 0.5), the growth rate is:

G(0.5)=μ2σ2(0.5−0.522)=μ2σ2(0.5−0.125)=0.375μ2σ2=0.75(μ22σ2)=0.75G(1)\begin{aligned} G(0.5) &= \frac{\mu^2}{\sigma^2}\left(0.5 - \frac{0.5^2}{2}\right) \\ &= \frac{\mu^2}{\sigma^2}(0.5 - 0.125) \\ &= 0.375 \frac{\mu^2}{\sigma^2} \\ &= 0.75 \left( \frac{\mu^2}{2\sigma^2} \right) \\ &= 0.75 G(1) \end{aligned}

where:

  • G(0.5)G(0.5): expected geometric growth rate at half-Kelly
  • G(1)G(1): expected geometric growth rate at full Kelly
  • μ\mu: expected return
  • σ\sigma: volatility

This calculation shows the efficiency of half-Kelly: it achieves 75% of the growth rate but with only 25% of the variance, since variance scales as κ2\kappa^2. This tradeoff is highly attractive for risk-averse investors who value smoother wealth paths over maximum expected growth. The insight that you can sacrifice only 25% of growth while eliminating 75% of variance explains why fractional Kelly dominates practical applications.

In[3]:
Code
import numpy as np

# Analyze fractional Kelly tradeoffs
kappa = np.linspace(0.01, 2, 200)  # Kelly fraction from 0 to 2x

# Normalized growth rate (as fraction of maximum Kelly growth)
# G(kappa) / G(1) = 2*kappa - kappa^2
growth_rate = 2 * kappa - kappa**2

# Variance (as fraction of full Kelly variance)
variance = kappa**2

# Growth-to-variance ratio (efficiency)
efficiency = growth_rate / variance
efficiency[variance < 0.01] = np.nan  # Avoid division issues
Out[4]:
Visualization
Concave curve of normalized geometric growth versus Kelly fraction, with teal and coral markers at Half Kelly and Full Kelly.
Normalized geometric growth versus Kelly fraction. Half Kelly captures 75% of maximum growth, Full Kelly reaches the maximum, and growth falls to zero at twice Kelly.
Convex curve of normalized variance versus Kelly fraction, with teal and coral markers showing 25% variance at Half Kelly and 100% at Full Kelly.
Normalized variance versus Kelly fraction. Variance rises quadratically, so Full Kelly has four times the variance of Half Kelly.
Declining curve of growth-to-variance efficiency from 0.1 to 1.5 times Kelly, with Half Kelly and Full Kelly marked.
Growth per unit of variance versus Kelly fraction. Capital efficiency is highest at low fractions and decreases steadily as leverage increases.

The efficiency plot shows that smaller Kelly fractions provide better return per unit of risk taken. As the fraction increases toward full Kelly and beyond, efficiency deteriorates rapidly. This mathematical relationship explains why experienced practitioners almost universally advocate for conservative position sizing.