Two traders have the same edge — the same signal, the same win rate, the same expectancy. A year later one has compounded nicely and the other is broke. The difference was never the strategy. It was the size. Bet too little and you leave growth on the table; bet too much and an ordinary losing streak wipes you out, edge or no edge. There is exactly one bet size that maximizes long-run growth, and unlike most of trading folklore, it is not a matter of taste — it is arithmetic.
1. Why sizing has an optimum at all
Growth compounds multiplicatively, and multiplication is unforgiving of ruin: a −100% is permanent no matter how many +50% gains preceded it. So the quantity that actually governs long-run wealth is not the expected return but the expected logarithm of the growth factor — because logs turn the product of period returns into a sum, and it is that sum the law of large numbers pins down. Maximize expected log-growth and you maximize the rate at which capital compounds almost surely. That objective is concave in leverage: too little and you underuse the edge, too much and the penalty from the down-moves dominates. Somewhere in between sits a single peak.
2. The Kelly bet
John Kelly (1956) solved the peak for a simple wager, and Ed Thorp carried it from blackjack to Wall Street. For a bet that wins with probability p and pays b per unit risked, the growth-optimal fraction of bankroll is:
f* = p − (1 − p) / b
A coin that pays 2-to-1 and wins 60% of the time gives f* = 0.6 − 0.4/2 = 0.4 — stake 40% of the bankroll. If the formula returns a negative number, the bet has no edge and the optimal size is zero: don't play. That sign check alone saves more capital than most risk rules.
3. From a coin to a return stream
Trading is not a discrete coin; it is a stream of returns. Under a mean-variance (Gaussian) approximation the growth-optimal leverage has an equally clean form — the mean excess return over the variance:
λ* = μ / σ²
This is the number a systematic desk usually means by "Kelly leverage." It is an approximation, though, and on real returns — which are skewed and fat-tailed — it flatters you: the left tail quietly demands you lever less than μ/σ² suggests.
4. The exact optimum, read off the data
You don't have to trust the Gaussian shortcut. The exact growth-optimal leverage is simply the λ that maximizes the realized mean log-growth over your actual return series:
λ* = argmaxₖ (1/N) · Σ log(1 + λ·rᵗ)
It makes no distributional assumption — it finds the peak on the empirical curve directly. On real data that empirical optimum sits below the μ/σ² figure precisely because the fat left tail is in the data and the bell curve isn't. Our library computes it with a small dependency-free golden-section search, so there is no optimizer to install.
5. Why nobody bets full Kelly
Kelly is growth-optimal, but it is also famously wild: full-Kelly equity curves swing violently, and a small error in your estimated edge translates into a large error in size — always in the dangerous direction, because the penalty for over-betting is steeper than the reward for under-betting. So practitioners size at a fraction of Kelly — half-Kelly is the classic choice — which sacrifices a little growth for a large reduction in drawdown. The point past which more leverage makes you poorer rather than richer is real and computable; fractional Kelly just keeps a respectful distance from it.
6. Computing it
Our open-source orderflow-metrics library ships all three forms, dependency-free, in TypeScript and Python:
import { kellyFraction, kellyLeverage, growthOptimalLeverage } from "orderflow-metrics";
kellyFraction(0.6, 2.0); // 0.4 — stake for a 60% bet at 2:1 odds
// for a return stream:
const returns = [0.011,-0.006,0.009,-0.021,0.014,0.004,-0.010,0.017,-0.028,0.008,0.012,-0.007];
kellyLeverage(0.00025, 0.000193); // 1.293 — the Gaussian mean/variance leverage
growthOptimalLeverage(returns); // 1.277 — the exact empirical optimum, slightly lower
Notice the exact optimum (1.277) sits just below the Gaussian approximation (1.293): the fat left tail in the actual returns pulls the safe leverage down. The Python distribution exposes the same functions (kelly_fraction, kelly_leverage, growth_optimal_leverage). They sit beside the risk-adjusted performance ratios and Value-at-Risk tools in the wider market-microstructure toolkit — install from our open-source page (npm and PyPI, MIT-licensed).
7. Conclusion
An edge tells you whether to bet; the Kelly criterion tells you how much — the single size that compounds capital fastest over the long run, and the size past which more conviction only makes you poorer. Take a fraction of it for a calmer ride, but let the arithmetic, not the adrenaline, set the number. Explore the rest of the toolkit in our quantitative research library, or read the implementation in our open-source metrics.