Education

Kelly Criterion — Cheatsheet Derivation

Kelly Criterion — Cheatsheet Derivation


Step 1 One Period Expectancy

E = pB − q

where p = win probability, q = 1−p = loss probability, B = net odds (win B per unit staked, lose 1).

Why: Weighted average of outcomes. Win B with probability p, lose 1 with probability q.


Step 2 Per-Flip Wealth Multipliers

Bet fraction f of current wealth W:

  • Win: W₁ = W(1+Bf)
  • Lose: W₁ = W(1−f)

Why: You keep the unbet portion W(1−f) regardless. On a win you collect B times your stake Wf on top. On a loss your stake Wf is gone.


Step 3 Wealth After n Flips

After h wins and (n−h) losses:

Wₙ = W₀(1+Bf)h(1−f)n−h

Why: The flips compound — each one rescales whatever the previous left. That means multiply, not add. Order doesn’t matter, only h and n−h.


Step 4 Per-Flip Growth Rate G

Take the nth root of total growth to extract the per-period rate:

G = (Wₙ/W₀)1/n = (1+Bf)h/n · (1−f)(n−h)/n

As n → ∞, law of large numbers: h/n → p, (n−h)/n → q.

G = (1+Bf)p(1−f)q

Why nth root: Same logic as extracting r from (1+r)n = total growth. Geometric mean, not arithmetic, because the process is multiplicative.


Step 5 Take ln Before Differentiating

Define g = ln(G). Since ln is monotonically increasing, maximizing g gives the same f* as maximizing G.

Apply two log rules:

  • ln(AB) = ln(A) + ln(B)  →  product becomes sum
  • ln(Ap) = p·ln(A)  →  exponent drops to coefficient
g = p·ln(1+Bf) + q·ln(1−f)

Why: Differentiating a product of powers is a mess. A sum of logs is trivial. Valid because ln is monotone — same maximum, easier math.


Step 6 Differentiate and Set to Zero

Rule: ddx[ln(x)] = 1x. Chain rule: multiply by derivative of the inside.

  • ddf[p·ln(1+Bf)] = pB1+Bf  ← chain rule gives B from inside (1+Bf)
  • ddf[q·ln(1−f)] = −q1−f  ← chain rule gives −1 from inside (1−f)

Set dg/df = 0:

pB1+Bf − q1−f = 0

Step 7 Solve for f*

Cross-multiply:

pB(1−f) = q(1+Bf)

Expand:

pB − pBf = q + qBf

Collect f terms:

pB − q = pBf + qBf = Bf(p+q)

Since p+q = 1:

f* = pB−qB = p − qB

The Answer

f* = pB − qB

Read as: edge / odds

  • Numerator pB−q is your expected profit per unit bet
  • Denominator B scales it by the odds

Special case B=1 (even money): f* = p−q

Your optimal bet equals your raw edge.


Key Insights

What Why it matters
Multiplicative wealth function One bad bet can’t be offset by other bets — sizing matters
Geometric mean not arithmetic Compounding processes need per-period rates, not averages
ln transform Turns product into sum without moving the maximum
Chain rule on ln(1−f) The −1 derivative is what creates a finite optimum
p+q=1 The simplification that closes the algebra cleanly
editor

Recent Posts

“Conversational AI custom media eats traditional media” thesis

I’d let this thread seep into your cells before we continue. Ok, now you are…

1 day ago

if it feels good you’re too late

I was chatting with a friend this week who I’m so happy for it makes…

4 days ago

hacking hope

Jared Dillian has this great essay, The Reason We Do Everything, from earlier in the…

4 days ago

Moontower #334

In this issue: hacking hopeif it feels good you’re too latethe geometry of volatility scaling…

4 days ago

Using Geometry to See Why Volatility Scales With √t

I had Claude make me a custom chalkboard app for making math and investing tutorials…

1 week ago

Staring at an Option Quote

Taking a small punt on gold upside before the end of the year. You can…

2 weeks ago