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

第二章 腰斩及更糟:凯利下注者的首达概率

凯利财富多常腰斩

凯利下注者有一个广为人知的性质:它并不避免深度下跌,只避免破产。在连续的对数正态模型中,下注 cc 倍凯利时,财富曾经跌到起始值的 xx 倍的机会,在 c<2c < 2 时是 x2/c−1x^{2/c – 1},在 c≥2c \ge 2 时是 1 (Thorp 2006; MacLean et al. 2011)。在有限期限内,反射原理给出精确的机会。p03 使用第一章的夏普比率 0.3125。

推导

# Chapter 2. p03: First passage of a Kelly bettor's wealth to a fraction
# x of its starting value, in continuous time (log-normal model, the
# Sharpe ratio S = 0.3125 of p01). Betting c times Kelly, log wealth has
# drift S^2 (c - c^2 / 2) and volatility c S. Ever reaching x has
# chance x^(2 / c - 1) while c < 2, and 1 when c >= 2. Within T years
# the reflection formula gives the chance exactly.
from math import exp, log, sqrt
from statistics import NormalDist

S = 0.05 / 0.16
PHI = NormalDist().cdf

def ever(x, c):
    return 1.0 if c >= 2 else x ** (2 / c - 1)

def within(x, c, t):
    nu, s, a = S * S * (c - c * c / 2), c * S, -log(x)
    st = s * sqrt(t)
    return PHI((-a - nu * t) / st) + exp(-2 * nu * a / (s * s)) * PHI(
        (-a + nu * t) / st)

if __name__ == "__main__":
    print("   multiple   ever: half  ever: 20%   10 yrs: half  10 yrs: 20%")
    for c in (0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0, 4.0):
        print("   {:8.2f}   {:10.3f}  {:9.3f}   {:12.3f}  {:11.3f}".format(
            c, ever(0.5, c), ever(0.2, c), within(0.5, c, 10),
            within(0.2, c, 10)))
#    multiple   ever: half  ever: 20%   10 yrs: half  10 yrs: 20%
#        0.25        0.008      0.000          0.000        0.000
#        0.50        0.125      0.008          0.048        0.000
#        0.75        0.315      0.068          0.178        0.007
#        1.00        0.500      0.200          0.325        0.043
#        1.50        0.794      0.585          0.565        0.209
#        2.00        1.000      1.000          0.726        0.415
#        3.00        1.000      1.000          0.897        0.737
#        4.00        1.000      1.000          0.965        0.902

全凯利时,财富某一时刻腰斩的机会是 0.500,跌到五分之一的机会是 0.200;十年之内则分别是 0.325 和 0.043。半凯利一生中腰斩的机会只有 0.125,四分之一凯利只有 0.008。从两倍凯利起,财富最终必然到达任何低点;十年之内,两倍凯利腰斩的机会是 0.726,三倍凯利是 0.897。

所以「在乐观漂移下全凯利几乎必然腰斩」这句话需要限定:当实际倍数 cc 达到 2 或以上时才成立,而这恰恰是长牛市中取得的估计常常给出的结果(第一章);在真实凯利下,曾经腰斩的机会是二分之一,而不是一。

在会切换体制的市场里过十年

对数正态模型里没有内建的坏年份。p04 让第一章的两体制市场从一个牛市月份开始运行十年,杠杆分别取全历史凯利的一半、全值、两倍,以及 7.10,即只用牛市月份算出的全凯利。

推导

# Chapter 2. p04: Ten years in the two-regime market of p02, starting
# in a bull month, rebalanced monthly; cash and borrowing earn 0.02 a
# year. Leverage 0.73 (half the whole-history Kelly 1.46), 1.46, 2.92,
# and 7.10, the full Kelly an investor computes from bull months only
# (0.12 / 0.13^2). Maximum drawdown is measured from the running peak;
# wealth at or below zero is ruin. 10,000 paths, seed 98.
import random
from math import sqrt

BULL, BEAR = (0.12 / 12, 0.13 / sqrt(12)), (-0.25 / 12, 0.28 / sqrt(12))
STAY, RF = (0.98, 0.92), 0.02 / 12
LEVS = (0.73, 1.46, 2.92, 7.10)

def run(rng, months=120):
    s = 0
    w = [1.0] * len(LEVS)
    peak = [1.0] * len(LEVS)
    dd = [0.0] * len(LEVS)
    for _ in range(months):
        if rng.random() > STAY[s]:
            s = 1 - s
        m, sd = BULL if s == 0 else BEAR
        x = rng.gauss(m, sd)
        for k, lev in enumerate(LEVS):
            if w[k] > 0:
                w[k] = max(w[k] * (1 + RF + lev * x), 0.0)
                peak[k] = max(peak[k], w[k])
                dd[k] = max(dd[k], 1 - w[k] / peak[k])
    return w, dd

if __name__ == "__main__":
    rng = random.Random(98)
    res = [run(rng) for _ in range(10000)]
    print("   leverage  DD>=50%  DD>=80%   ruin  median wealth  10th pct")
    for k, lev in enumerate(LEVS):
        dd = [r[1][k] for r in res]
        w = sorted(r[0][k] for r in res)
        print("   {:8.2f}  {:7.3f}  {:7.3f}  {:5.3f}  {:13.2f}  {:8.2f}"
              .format(lev, sum(d >= 0.5 for d in dd) / 1e4,
                      sum(d >= 0.8 for d in dd) / 1e4,
                      sum(x <= 0 for x in w) / 1e4, w[5000], w[1000]))
#    leverage  DD>=50%  DD>=80%   ruin  median wealth  10th pct
#        0.73    0.181    0.009  0.000           1.77      0.77
#        1.46    0.564    0.173  0.000           2.21      0.38
#        2.92    0.878    0.584  0.001           2.05      0.03
#        7.10    1.000    0.956  0.640           0.00      0.00

以历史高点为基准衡量,半凯利出现腰斩以上回撤的机会是 0.181,80% 以上是 0.009。全历史凯利腰斩的机会是 0.564,80% 以上是 0.173;两倍凯利分别是 0.878 和 0.584。只用牛市月份算出的凯利 7.10 在全部 10,000 条路径上都出现腰斩以上的回撤,0.956 的路径回撤 80% 以上,0.640 的路径归零:十年后的财富中位数是 0.00。两倍凯利的财富中位数(2.05)低于全凯利(2.21),第十百分位数则是 0.03 对 0.38。

两体制市场中,按杠杆分列的十年内出现腰斩以上回撤、以及 80% 以上回撤的机会(p04)。

假说 · 尚未验证

作者的诠释(尚未验证): 带杠杆的个人账户所遭受的深度回撤,大多来自设在长期凯利估计两倍以上的杠杆,而不是来自中等杠杆下的坏运气。什么会证明它错: 在账户层面的数据中,杠杆不高于长期凯利估计的账户,在腰斩以上回撤中所占的比例与杠杆高于该估计两倍的账户一样大。

小结

凯利下注者某一时刻腰斩的机会是二分之一;超过两倍凯利,任何低点最终都会到达。在有熊市体制的市场里,只用牛市月份算出的全凯利(约为财富的七倍)十年内在每条路径上都出现腰斩以上的回撤,0.640 的路径破产。

参考文献

MacLean, Leonard C., Edward O. Thorp, and William T. Ziemba, eds. 2011. The Kelly Capital Growth Investment Criterion: Theory and Practice. World Scientific.
Thorp, Edward O. 2006. “The Kelly Criterion in Blackjack, Sports Betting, and the Stock Market.” In Handbook of Asset and Liability Management, Volume 1, edited by Stavros A. Zenios and William T. Ziemba. North-Holland.

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