Entry
- Estimate win rate W, average win A, average loss B from history
- Kelly fraction: f* = (W × A - (1-W) × B) / (A × B)
- Simplified (A=B): f* = 2W - 1
- As risk per trade: position size = f* × account equity / ATR (for trend strategies)
Exit
- N/A — Kelly is a sizing framework, not an exit signal
| Name | Typ. value | Description |
|---|---|---|
| kelly_fraction | 0.25-0.5 (Half-/Quarter-Kelly) | Fraction of full Kelly |
| estimation_window | 100+ Trades | For reliable W, A, B estimates |
Pros
- Mathematically optimal for log-wealth growth
- Self-scaling with account size
- Prevents over-betting when the edge is small
- Broadly academically validated for 70 years
Cons
- Full-Kelly drawdowns (50%+) are psychologically unbearable
- Sensitive to misestimation of W, A, B (estimation error is amplified)
- Dangerous in non-stationary markets (win rate changes)
- More complex for multi-asset/multi-signal systems
The formula
John Kelly (Bell Labs, 1956) showed mathematically that for repeated bets with positive expected value there exists a unique optimal fraction of capital that achieves the greatest long-term growth:
f* = W/L − (1−W)/G
where: - W = probability of winning - G = average win (as a fraction of the bet) - L = average loss (as a fraction of the bet)
For trading with R:R = 1:1 and win rate W this simplifies to:
f* = 2W − 1
E.g. a 60% win rate → Kelly = 20% of capital per trade. That is a lot.
Why nobody trades full Kelly
Kelly maximizes geometric growth, not comfort. The drawdowns are brutal:
- With full Kelly: ~50% drawdown with >50% probability at some point
- With half Kelly: ~25% drawdown, in exchange for ~75% of the growth
- With quarter Kelly: ~12% drawdown, ~44% of the growth
In practice, half Kelly is the institutional standard. For aggressive retail traders, quarter Kelly is more realistic.
The estimation-error problem
Kelly is only as good as the estimates of W, G, L. With 100 trades you have ±10% uncertainty on W — if you estimated 55% but the true value is only 45%, you go from full Kelly = 10% long to negative Kelly = don't trade at all.
Standard solutions: - Rolling estimation: continuously re-estimate over the last 100-300 trades - Haircut: full Kelly × 0.5 as a safety margin - Per-strategy tracking: each strategy has its own W/G/L estimate
For trend following
Trend following typically has a low win rate (35-40%) but a high G/L ratio (2-5:1). Kelly formula:
W = 0.38, G = 4, L = 1
f* = 0.38/1 − 0.62/4 = 0.38 − 0.155 = 22.5%
22.5% of the account per trade is gigantic. Half Kelly ~11% is realistic, quarter Kelly 5-6% is the industry standard.
Relevance for Botty
Botty currently uses a constant POSITION_SIZE_PCT. That is simple, but suboptimal:
- When a strategy performs well, size is not increased → missed compound returns
- When a strategy is in drawdown, size is not reduced → prolonged DD
Kelly upgrade: 1. Per strategy, compute rolling W, G, L over the last N trades 2. Compute the Kelly fraction, × 0.25-0.5 3. Position size = Kelly fraction × account / ATR 4. Cap on the upside (max 30% of account) and downside (min 0.5%, otherwise the strategy doesn't trade)
High-priority upgrade with measurable ROI.