5D Library › Regime-Switching Fractional Kelly, Maximum-Drawdown Constraints and Lifecycle Leverage Allocation · 中文
Chapter 4. Betting Under a Drawdown Limit: The Fraction of Kelly That Keeps a Promise
Turning a limit into a fraction
A common house rule is: “the maximum drawdown should exceed 20% with chance no more than 5%”. The rule needs a horizon, because over an unlimited horizon every drawdown size is reached eventually at any positive leverage. p07 uses ten years and searches the largest fraction of Kelly that meets it, in an i.i.d. market and in the two-regime market of Chapter 1 (Busseti et al. 2016).
Calculation
# Chapter 4. p07: The largest fraction k of Kelly whose maximum drawdown
# over ten years exceeds D with chance at most 0.05. Two markets,
# monthly, cash at 0.02 a year: (i) i.i.d. normal excess returns, 0.05
# a year with vol 0.16 (Kelly 1.953); (ii) the two-regime market of
# p02, started from its long-run mix (Kelly 1.46). The same 5,000
# paths are used for every k. Seed 98.
import random
from math import sqrt
R12 = sqrt(12)
REG = ((0.12 / 12, 0.13 / R12), (-0.25 / 12, 0.28 / R12))
STAY, RF = (0.98, 0.92), 0.02 / 12
KS = [i / 20 for i in range(1, 21)]
def paths(rng, world, n=5000, months=120):
out = []
for _ in range(n):
s = 0 if rng.random() < 0.8 else 1
xs = []
for _ in range(months):
if world == "iid":
xs.append(rng.gauss(0.05 / 12, 0.16 / R12))
else:
if rng.random() > STAY[s]:
s = 1 - s
xs.append(rng.gauss(*REG[s]))
out.append(xs)
return out
def max_dd(xs, lev):
w = peak = 1.0
dd = 0.0
for x in xs:
w = max(w * (1 + RF + lev * x), 1e-12)
if w > peak:
peak = w
elif 1 - w / peak > dd:
dd = 1 - w / peak
return dd
if __name__ == "__main__":
rng = random.Random(98)
table = {}
for world, kelly in (("iid", 1.953), ("regime", 1.46)):
ps = paths(rng, world)
if world == "regime":
ms = [x for xs in ps for x in xs]
ys = [sum(xs[j:j + 12]) for xs in ps for j in range(0, 120, 12)]
mm, my = sum(ms) / len(ms), sum(ys) / len(ys)
vm = sum((x - mm) ** 2 for x in ms) / len(ms)
vy = sum((y - my) ** 2 for y in ys) / len(ys)
ratio, k12 = vy / (12 * vm), my / vy
table[world] = [sorted(max_dd(xs, k * kelly) for xs in ps)
for k in KS]
print(" regime: variance of 12-month sums / (12 x monthly) = {:.2f}"
.format(ratio))
print(" regime: Kelly from 12-month data {:.2f}".format(k12))
print(" k of Kelly P(MDD>20%) iid regime P(MDD>30%) iid regime")
for i, k in enumerate(KS):
if i % 2 == 1 or k <= 0.4:
a = [sum(d > D for d in table[w][i]) / 5000
for D in (0.2, 0.3) for w in ("iid", "regime")]
print(" {:10.2f} {:14.3f} {:6.3f} {:14.3f} {:6.3f}"
.format(k, *a))
for D in (0.15, 0.2, 0.3):
best = []
for w in ("iid", "regime"):
ok = [k for i, k in enumerate(KS)
if sum(d > D for d in table[w][i]) / 5000 <= 0.05]
best.append(max(ok) if ok else 0.0)
print(" D = {:.2f}: largest k iid {:.2f} regime {:.2f}".format(
D, *best))
# regime: variance of 12-month sums / (12 x monthly) = 1.42
# regime: Kelly from 12-month data 1.09
# k of Kelly P(MDD>20%) iid regime P(MDD>30%) iid regime
# 0.05 0.000 0.000 0.000 0.000
# 0.10 0.000 0.008 0.000 0.000
# 0.15 0.005 0.081 0.000 0.011
# 0.20 0.046 0.210 0.003 0.058
# 0.25 0.167 0.341 0.018 0.132
# 0.30 0.344 0.451 0.061 0.218
# 0.35 0.521 0.543 0.142 0.302
# 0.40 0.670 0.618 0.251 0.386
# 0.50 0.875 0.718 0.480 0.514
# 0.60 0.961 0.798 0.679 0.617
# 0.70 0.990 0.855 0.824 0.687
# 0.80 0.996 0.905 0.910 0.746
# 0.90 0.999 0.936 0.959 0.795
# 1.00 1.000 0.959 0.984 0.836
# D = 0.15: largest k iid 0.15 regime 0.10
# D = 0.20: largest k iid 0.20 regime 0.10
# D = 0.30: largest k iid 0.25 regime 0.15In the i.i.d. market the largest fraction is 0.20 of Kelly for a 20% limit and 0.25 for a 30% limit; for a 15% limit it is 0.15. In the regime market it is only 0.10 for the 15% and 20% limits and 0.15 for 30%. The often-quoted band of 0.15 to 0.35 of Kelly is therefore about right for an i.i.d. market with a generous limit, but too high for a market with persistent bear regimes: at 0.25 of Kelly the regime market breaks the 20% limit with chance 0.341, and at 0.35 with chance 0.543.
The reason is in the first two lines of the output. Regimes make returns persistent: the variance of twelve-month sums is 1.42 times twelve monthly variances, so a Kelly computed from twelve-month data is 1.09 rather than 1.46. Part of the gap between the two markets is simply that the monthly variance understates the risk that matters for a drawdown lasting a year or more.
A floor instead of a fraction
A different way to keep a drawdown limit is to bet only the cushion above the floor. Grossman and Zhou showed that if wealth must never fall below of its running peak , the growth-optimal policy bets a constant multiple of the cushion (Grossman and Zhou 1993). In continuous time the floor cannot be broken; with monthly rebalancing a bad month can go through it. p08 tests multiples of 0.5, 1 and 2 times Kelly on the cushion against the constant 0.10 of Kelly found above.
Calculation
# Chapter 4. p08: A drawdown floor (Grossman and Zhou). Wealth may not
# fall below 0.8 of its running peak M, so only the cushion W - 0.8 M
# is bet: exposure = k * Kelly * (W - 0.8 M), Kelly 1.46, capped at 3
# times W. In continuous time the floor can never be broken; here the
# rebalancing is monthly, in the two-regime market of p02 started from
# its long-run mix, ten years, cash at 0.02 a year. Compared with a
# constant 0.10 of Kelly (the largest k meeting the 20% limit in p07).
# 5,000 paths, seed 98.
import random
from math import sqrt
R12 = sqrt(12)
REG = ((0.12 / 12, 0.13 / R12), (-0.25 / 12, 0.28 / R12))
STAY, RF, KELLY, FLOOR = (0.98, 0.92), 0.02 / 12, 1.46, 0.8
def run(rng, rules):
s = 0 if rng.random() < 0.8 else 1
st = [[1.0, 1.0, 0.0, 0.0] for _ in rules]
for _ in range(120):
if rng.random() > STAY[s]:
s = 1 - s
x = rng.gauss(*REG[s])
for (kind, k), v in zip(rules, st):
w, m = v[0], v[1]
if kind == "floor":
lev = min(k * KELLY * max(w - FLOOR * m, 0.0) / w, 3.0)
else:
lev = k * KELLY
v[3] += lev / 120
v[0] = max(w * (1 + RF + lev * x), 1e-12)
v[1] = max(m, v[0])
v[2] = max(v[2], 1 - v[0] / v[1])
return st
if __name__ == "__main__":
rules = (("const", 0.10), ("floor", 0.5), ("floor", 1.0),
("floor", 2.0))
rng = random.Random(98)
res = [run(rng, rules) for _ in range(5000)]
print(" rule avg lev P(MDD>20%) worst MDD median W 10th")
for i, (kind, k) in enumerate(rules):
w = sorted(r[i][0] for r in res)
dd = [r[i][2] for r in res]
lv = sum(r[i][3] for r in res) / 5000
fmt = (" {:<5} {:4.2f} x {:7.3f} {:10.3f} {:9.3f} {:8.2f}"
" {:4.2f}")
print(fmt.format(kind, k, lv, sum(d > 0.2 for d in dd) / 5000,
max(dd), w[2500], w[500]))
# rule avg lev P(MDD>20%) worst MDD median W 10th
# const 0.10 x 0.146 0.007 0.276 1.32 1.12
# floor 0.50 x 0.139 0.000 0.148 1.32 1.14
# floor 1.00 x 0.254 0.000 0.187 1.41 1.09
# floor 2.00 x 0.428 0.001 0.210 1.57 1.06The constant 0.10 of Kelly has an average leverage of 0.146, breaks the 20% limit on 0.007 of paths, and its worst path loses 0.276. The floor rule with twice Kelly on the cushion has an average leverage of 0.428, breaks the limit on only 0.001 of paths, with a worst drawdown of 0.210 (a monthly gap through the floor), and has the higher median wealth: 1.57 against 1.32. Its tenth percentile is slightly lower (1.06 against 1.12), because a path that sinks close to the floor bets almost nothing and stays there.
Hypothesis · not established
The author’s interpretation (not yet tested): for an individual investor with a stated drawdown limit, a cushion rule with a multiple of one to two times Kelly gives higher median ten-year wealth than the constant fraction that meets the same limit, in most historical equity markets. What would show it wrong: in long index histories of several countries, sampled over rolling ten-year windows with monthly rebalancing, the constant fraction meeting the limit has a higher median terminal wealth than the cushion rule in most countries.
Summary
A drawdown limit is a horizon-specific promise. In an i.i.d. market it allows 0.15 to 0.25 of Kelly; with persistent bear regimes about 0.10 to 0.15. Betting a multiple of the cushion above a floor meets the limit more reliably and grows faster, at the cost of sometimes getting stuck near the floor.
References
Fan, Y. (2026). Regime-Switching Fractional Kelly, Maximum-Drawdown Constraints and Lifecycle Leverage Allocation: Cyclical Drift Estimation Errors, Ruin-Bounded Bet Sizing and Human-Capital Amortization [体制转换分数凯利、最大回撤约束与生命周期杠杆配置] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090256 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).