5D Library › 体制转换分数凯利、最大回撤约束与生命周期杠杆配置 · English

第四章 在回撤界限下下注:能守住承诺的凯利比例

把界限换成比例

常见的内部规则是:「最大回撤超过 20% 的机会不超过 5%」。这条规则需要一个期限,因为在无限期限内,任何正杠杆最终都会到达任何大小的回撤。p07 取十年,在独立同分布市场和第一章的两体制市场中,分别寻找满足它的最大凯利比例 kk (Busseti et al. 2016)。

推导

# 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.15

在独立同分布市场中,回撤界限 20% 时最大比例是凯利的 0.20,30% 时是 0.25,15% 时是 0.15。在体制市场中,15% 与 20% 的界限都只有 0.10,30% 时是 0.15。所以常被引用的凯利 0.15 至 0.35 倍,对于界限宽松的独立同分布市场大致合适,对于熊市体制会持续的市场则太高:凯利 0.25 倍时,体制市场突破 20% 界限的机会是 0.341,0.35 倍时是 0.543。

原因就在输出的前两行。体制使收益具有持续性:十二个月累计收益的方差是十二个月方差之和的 1.42 倍,所以用十二个月数据算出的凯利是 1.09 而不是 1.46。两个市场之间的差距,有一部分只是因为月度方差低估了一年以上的回撤所面对的风险。

用地板代替比例

守住回撤界限的另一种办法,是只押地板之上的缓冲。Grossman 与 Zhou 证明:若财富永远不得低于其历史高点 MM 的 1−D1 – D 倍,增长最优的策略是押缓冲 W−(1−D)MW – (1-D)M 的固定倍数 (Grossman and Zhou 1993)。在连续时间中地板不会被击穿;按月再平衡时,一个坏月份可能穿过它。p08 以缓冲的凯利 0.5、1 与 2 倍检验,并与上面得到的固定凯利 0.10 倍比较。

推导

# 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.06

固定凯利 0.10 倍的平均杠杆是 0.146,在 0.007 的路径上突破 20% 界限,最差路径损失 0.276。对缓冲押两倍凯利的地板规则平均杠杆 0.428,只在 0.001 的路径上突破界限,最大回撤 0.210(一个月内跳空穿过地板),财富中位数也更高:1.57 对 1.32。它的第十百分位数略低(1.06 对 1.12),因为一条沉到地板附近的路径几乎不再下注,于是停在那里。

独立同分布市场与两体制市场中,按凯利比例分列的十年最大回撤超过 20% 的机会(p07)。

假说 · 尚未验证

作者的诠释(尚未验证): 对于设定了回撤界限的个人投资者,在多数历史股票市场中,对缓冲押一至两倍凯利的规则,其十年财富中位数高于满足同一界限的固定比例。什么会证明它错: 在多个国家的长期指数历史中,以滚动十年窗口、按月再平衡检验,多数国家里满足界限的固定比例的期末财富中位数高于缓冲规则。

小结

回撤界限是一个与期限相关的承诺。在独立同分布市场中,它允许凯利的 0.15 至 0.25 倍;熊市体制会持续时,约为 0.10 至 0.15 倍。押地板之上缓冲的倍数,能更可靠地守住界限并增长得更快,代价是有时会被困在地板附近。

参考文献

Busseti, Enzo, Ernest K. Ryu, and Stephen Boyd. 2016. “Risk-Constrained Kelly Gambling.” The Journal of Investing 25 (3): 118 to 134.
Grossman, Sanford J., and Zhongquan Zhou. 1993. “Optimal Investment Strategies for Controlling Drawdowns.” Mathematical Finance 3 (3): 241 to 276.

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).