Quant techniques · position sizing

The Kelly criterion: how much to bet when you have an edge

You have a coin that lands heads 60% of the time, and someone will take even-money bets on it for as long as you like. Having an edge is the easy part. The hard part is deciding how much to bet. Bet too little and you leave money on the table. Bet too much and you go broke even though every bet is in your favour. The Kelly criterion picks the size that makes wealth grow fastest.

1Wn=W0∏i=1n(1+fRi)W_n = W_0 \prod_{i=1}^n (1 + f R_i) Betting a fixed fraction f each time makes wealth a product. Products are hard to reason about, so take logs.
2g(f)=E[log⁡(1+fR)]=plog⁡(1+bf)+qlog⁡(1−f)g(f) = E[\log(1 + fR)] = p\log(1+bf) + q\log(1-f) The growth per bet. By the law of large numbers, 1nlog⁡(Wn/W0)→g(f)\tfrac1n \log(W_n/W_0) \to g(f).
3f∗=bp−qb=edgeoddsf^* = \dfrac{bp - q}{b} = \dfrac{\text{edge}}{\text{odds}} Set g′(f) = 0. For an even-money 60/40 coin, f* = 20%.
4f∗=μ−rσ2g∗=r+S22f^* = \dfrac{\mu - r}{\sigma^2} \qquad g^* = r + \dfrac{S^2}{2} The continuous version for an asset with excess return μ − r, volatility σ and Sharpe ratio S.
Why logs

Maximising expected wealth is a trap

Bet a fraction f of your wealth on the 60/40 coin at even money. Each bet multiplies wealth by 1 + f with probability 0.6 or by 1 − f with probability 0.4. The expected wealth after one bet is 1+0.2f1 + 0.2f, which goes up with f. So the expected-value maximiser bets everything, every time. After n bets they have 2n2^n times their money with probability 0.6n0.6^n, and nothing otherwise. Almost surely, they are broke.

The expected value is dominated by a vanishingly rare winning streak. What happens to a typical path is set by the log. After n bets with kk wins,

1nlog⁡WnW0=knlog⁡(1+f)+n−knlog⁡(1−f)  ⟶  0.6log⁡(1+f)+0.4log⁡(1−f)=g(f)\frac1n \log\frac{W_n}{W_0} = \frac{k}{n}\log(1+f) + \frac{n-k}{n}\log(1-f) \;\longrightarrow\; 0.6\log(1+f) + 0.4\log(1-f) = g(f)

So wealth grows like en g(f)e^{n\,g(f)} for almost every path. Making the median outcome grow as fast as possible means maximising gg. Differentiating the general case, with payout b to 1 and q=1−pq = 1 - p:

g′(f)=pb1+bf−q1−f=0⟹f∗=p−qb=bp−qbg'(f) = \frac{pb}{1+bf} - \frac{q}{1-f} = 0 \quad\Longrightarrow\quad f^* = p - \frac{q}{b} = \frac{bp - q}{b}

The numerator bp−qbp - q is your expected profit per unit bet (the edge). Dividing by b (the odds) scales it down when the payoff is long-shot. No edge, no bet.

win prob ppayout b : 1

Growth per bet g(f) = E[log wealth ratio]

One run of 500 bets, same coin flips (log scale)

½ KellyKelly f*2 × Kelly

Move the sliders and watch three things. The curve is flat at the top, so being a little off Kelly costs very little. It drops much faster to the right of the peak than to the left. And around 2 × f* it crosses zero: a bettor at twice Kelly has the same edge on every bet and still goes nowhere.

The shape of g

Half Kelly keeps 75% of the growth

Expand g around zero for a small edge. With E[R]=mE[R] = m and E[R2]≈s2E[R^2] \approx s^2,

g(f)≈f m−12f2s2g(f) \approx f\,m - \tfrac12 f^2 s^2

This is a parabola. Its peak is at f∗=m/s2f^* = m/s^2 with height g∗=m2/(2s2)g^* = m^2/(2s^2). Plugging in a multiple cc of Kelly, f=c f∗f = c\,f^*:

g(cf∗)g∗=c (2−c)\frac{g(c f^*)}{g^*} = c\,(2 - c)
Bet sizeGrowth keptVolatility of log wealth
¼ Kelly44%25%
½ Kelly75%50%
Kelly100%100%
1.5 × Kelly75%150%
2 × Kelly0%200%

Half Kelly gives up a quarter of the growth for half the volatility. Betting 1.5 × Kelly gets the same growth as half Kelly with three times the risk. Overbetting is strictly worse than underbetting by the same factor, which matters a lot when you don’t know your edge exactly.

For the 60/40 coin the parabola is close but not exact: the true numbers are g(20%) = 2.01%, g(10%) = 1.50% (75% of the peak), and g(40%) = −0.24%.

Drawdowns

Full Kelly is a rough ride

Kelly maximises growth, not comfort. In the continuous model, the probability that wealth ever falls to a fraction x of its starting value, betting c × Kelly, is

P(wealth ever hits x W0)=x 2/c−1P(\text{wealth ever hits } x\,W_0) = x^{\,2/c - 1}

At full Kelly, c = 1, that is just x. There is a 50% chance of halving your money at some point, and a 10% chance of losing 90% of it. At half Kelly the exponent is 3, so the chance of ever halving drops to 0.53=12.5%0.5^3 = 12.5\%.

The derivation is short. Under GBM, log wealth drifts at ν=fμ−12f2σ2\nu = f\mu - \tfrac12 f^2\sigma^2 with volatility fσf\sigma. A Brownian motion with drift ν and volatility s ever falls to −a-a with probability e−2νa/s2e^{-2\nu a/s^2}. Put in f=c μ/σ2f = c\,\mu/\sigma^2 and a=−log⁡xa = -\log x, and the exponent simplifies to 2/c−12/c - 1.

import numpy as np
rng = np.random.default_rng(1)
wins = rng.random((10_000, 1_000)) < 0.6           # 10k bettors, 1000 even-money bets
for f in [0.1, 0.2, 0.4]:                           # half, full, double Kelly
    steps = np.where(wins, np.log1p(f), np.log1p(-f))
    path = np.cumsum(steps, axis=1)
    halved = (path.min(axis=1) < np.log(0.5)).mean()
    print(f, path[:, -1].mean() / 1000, halved)    # growth per bet, P(ever halved)
# 0.1  0.0150  0.11
# 0.2  0.0201  0.46
# 0.4 -0.0024  0.96
Continuous time

For a stock: f* = μ/σ², and growth is Sharpe²/2

Put a fraction f of wealth in an asset following GBM with drift μ and volatility σ, the rest in cash at rate r. By Itô, log wealth grows at

g(f)=r+f(μ−r)−12f2σ2⟹f∗=μ−rσ2,g∗=r+S22g(f) = r + f(\mu - r) - \tfrac12 f^2 \sigma^2 \quad\Longrightarrow\quad f^* = \frac{\mu - r}{\sigma^2}, \qquad g^* = r + \frac{S^2}{2}

where S=(μ−r)/σS = (\mu - r)/\sigma is the Sharpe ratio. Two consequences:

  • The Kelly growth rate depends only on the Sharpe ratio. A strategy with Sharpe 1 grows at most 50% a year above cash, if you could size it perfectly. Sharpe 2 gives 200%.
  • Kelly leverage is often huge. A stock index with 6% excess return and 16% volatility has f* = 0.06/0.0256 ≈ 2.3, so Kelly says run 2.3 × leverage. Few people do, because μ is very uncertain.

With many assets the rule becomes f∗=Σ−1(μ−r1)f^* = \Sigma^{-1}(\mu - r\mathbf 1), the same vector as the tangency portfolio from mean–variance optimisation, scaled so that it maximises log growth.

Why practitioners shrink it

You plug an estimate of the edge into the Kelly formula. If the true edge is half what you estimated, your “full Kelly” bet is 2 × the true Kelly and your growth is zero. Because g falls faster on the overbet side, the expected growth under uncertainty is maximised by betting less than the point-estimate Kelly. Fractional Kelly (¼ to ½) is the standard fix.

Where people slip in interviews

  • Maximising E[wealth] instead of E[log wealth]. That bets everything and goes broke almost surely.
  • Using the wrong odds convention. b is the net profit per unit staked. Decimal odds of 3.0 mean b = 2.
  • Forgetting it can be negative. If bp<qbp < q you have no edge, and f* < 0 means “take the other side”, or bet nothing if you can’t.
  • Thinking Kelly is safe. Full Kelly has a 50% chance of halving your wealth at some point.
  • Thinking more than Kelly is “aggressive but fine”. At 2 × Kelly the median investor goes nowhere, and beyond that they lose almost surely.
Practice

Try these before you open the answer

Warm-upA coin lands heads 55% of the time and you get even money. What fraction should Kelly bet?
Show answer
f∗=p−q=0.55−0.45=10%f^* = p - q = 0.55 - 0.45 = 10\%
OddsA bet pays 2 to 1 and wins 40% of the time. Kelly fraction?
Show answer
f∗=bp−qb=2(0.4)−0.62=10%f^* = \frac{bp - q}{b} = \frac{2(0.4) - 0.6}{2} = 10\%
OddsA bet pays 3 to 1 and wins 25% of the time. Kelly fraction?
Show answer

bp−q=0.75−0.75=0bp - q = 0.75 - 0.75 = 0. No edge, so bet nothing.

ContinuousA strategy has 10% excess return and 20% volatility. What leverage does Kelly use, and what is its growth rate above cash?
Show answer
f∗=0.100.04=2.5,g∗−r=S22=0.522=12.5%f^* = \frac{0.10}{0.04} = 2.5, \qquad g^* - r = \frac{S^2}{2} = \frac{0.5^2}{2} = 12.5\%
FractionalYou bet one third of Kelly. What fraction of the maximum growth rate do you keep?
Show answer
c(2−c)=13⋅53=59≈56%c(2 - c) = \tfrac13 \cdot \tfrac53 = \tfrac59 \approx 56\%
DrawdownBetting full Kelly in continuous time, what is the chance your wealth ever falls to 20% of where it started? At half Kelly?
Show answer
P=x2/c−1:full: 0.21=20%,half: 0.23=0.8%P = x^{2/c - 1}: \qquad \text{full: } 0.2^1 = 20\%, \qquad \text{half: } 0.2^3 = 0.8\%
BreakevenFor the 60/40 even-money coin, find the bet size above which the growth rate is negative.
Show answer

Solve 0.6log⁡(1+f)+0.4log⁡(1−f)=00.6\log(1+f) + 0.4\log(1-f) = 0 numerically: f ≈ 38.9%. The small-edge approximation says 2 × f* = 40%, which is close.

StretchTwo independent even-money coins, each winning with probability 0.6. You can bet on both at once. Is the right fraction 20% on each?
Show answer

No, slightly less. The bets are no longer each the whole story: with fractions f on each, g=0.36log⁡(1+2f)+0.48log⁡1+0.16log⁡(1−2f)g = 0.36\log(1+2f) + 0.48\log 1 + 0.16\log(1-2f). Setting g′=0g' = 0 gives 0.72/(1+2f)=0.32/(1−2f)0.72/(1+2f) = 0.32/(1-2f), so f=0.4/2.08≈19.2%f = 0.4/2.08 \approx 19.2\% each. In the continuous limit with independent bets, Kelly sizes each one on its own, Σ−1μ\Sigma^{-1}\mu with diagonal Σ\Sigma, but discrete bets that can both lose together pull it down a bit.

Every number on this page was checked with a simulation or a numerical solve. The figure computes g(f) exactly and simulates the paths in your browser.