5D Library › 非遍历性财富动力学、凯利准则与波动率税 · English
第三章 凯利准则与分数凯利
从电话线到赌桌
1956 年,贝尔实验室的约翰·凯利发表了一篇论文,标题是《信息率的一种新解释》。他设想一个赌徒能通过一条有噪声的私人电话线,提前得知赛马结果的部分信息;问题是:每一场应该下注财富的多少?凯利证明,在赔率公平的情形下,按最优比例下注时财富的最大长期增长率恰好等于这条信道的信息传输率 (Kelly 1956)。布雷曼随后证明,在相当一般的条件下,这种策略长期来看几乎必然胜过任何与它有本质不同的策略,并且在目标很大时使达到某个财富目标的期望时间渐近最短 (Breiman 1961)。
凯利准则的核心就是第一章的结论:在乘性的重复下注中,应该最大化的是对数财富的期望增长率,而不是期望财富。
公式
一次下注,赢的概率为 p,赢时得到赌注的 b 倍,输的概率为 q = 1 − p,输时失去赌注。每次押上财富的比例 f,长期增长率为:
对 f 求导令其为零,得到凯利比例:
分子 bp − q 是每单位赌注的期望收益(「优势」),分母 b 是赔率。没有优势时 f* = 0:不下注。对连续时间的投资(第二章),同样的推导给出 f* = (μ − r)/σ2,也就是第二章抛物线的顶点。
推导
一个赔率 1:1、胜率 55% 的下注。比较不同下注比例的增长率,以及 2,000 组、每组 1,000 次下注的模拟。
# The Kelly criterion for a simple bet: win b times the stake with probability p, lose
# the stake with probability q = 1 - p. Staking a fraction f of wealth each time gives
# the long-run growth rate G(f) = p ln(1 + b f) + q ln(1 - f),
# maximised at f* = (b p - q) / b.
import math, random, statistics
p, b = 0.55, 1.0 # an even-money bet won 55 % of the time
q = 1 - p
fstar = (b * p - q) / b
G = lambda f: p * math.log(1 + b * f) + q * math.log(1 - f)
print(f"edge b p - q = {b * p - q:.2f}; Kelly f* = {fstar:.3f}; G(f*) = {G(fstar):.5f} a bet")
print(f"{'fraction':>12} {'f':>6} {'G(f) per bet':>13} {'share of max growth':>20}")
for k in (0.25, 0.5, 1.0, 1.5, 2.0, 2.5):
f = k * fstar
print(f"{k:9.2f} x f* {f:6.3f} {G(f):+13.5f} {G(f) / G(fstar):20.0%}")
# Small-edge (continuous) approximation: G(c f*) / G(f*) = c (2 - c). Half Kelly keeps
# 75 % of the growth with half the volatility; twice Kelly gives zero growth.
print("continuous approximation c(2 - c): "
+ ", ".join(f"c = {c}: {c * (2 - c):.0%}" for c in (0.5, 1, 1.5, 2)))
random.seed(11)
def run(f, n=1000):
w, peak, dd = 1.0, 1.0, 0.0
for _ in range(n):
w *= (1 + b * f) if random.random() < p else (1 - f)
peak = max(peak, w); dd = max(dd, 1 - w / peak)
return w, dd
print(f"\n2,000 sequences of 1,000 bets each")
print(f"{'fraction':>10} {'median final':>13} {'10th pct':>10} {'median max drawdown':>20}")
for k in (0.5, 1.0, 2.0):
res = [run(k * fstar) for _ in range(2000)]
fin = sorted(w for w, _ in res)
dd = statistics.median(d for _, d in res)
med, p10 = statistics.median(fin), fin[len(fin) // 10]
print(f"{k:7.1f} f* {med:13.1f} {p10:10.2f} {dd:20.0%}")
# edge b p - q = 0.10; Kelly f* = 0.100; G(f*) = 0.00501 a bet
# fraction f G(f) per bet share of max growth
# 0.25 x f* 0.025 +0.00219 44%
# 0.50 x f* 0.050 +0.00375 75%
# 1.00 x f* 0.100 +0.00501 100%
# 1.50 x f* 0.150 +0.00374 75%
# 2.00 x f* 0.200 -0.00014 -3%
# 2.50 x f* 0.250 -0.00673 -134%
# continuous approximation c(2 - c): c = 0.5: 75%, c = 1: 100%, c = 1.5: 75%, c = 2: 0%
#
# 2,000 sequences of 1,000 bets each
# fraction median final 10th pct median max drawdown
# 0.5 f* 47.1 6.37 61%
# 1.0 f* 122.4 2.70 90%
# 2.0 f* 0.9 0.00 100%几个值得记住的结果:
- 半凯利(下注 f*/2)保留了约 75% 的长期增长率,而波动只有全凯利的一半。在小优势的连续近似下,下注 c 倍凯利比例得到的增长率是最大值的 c(2 − c) 倍。
- 两倍凯利的增长率近似为零(这个离散例子中略为负数):承担了全凯利两倍的风险,却完全没有超额增长。
- 全凯利的路径极其颠簸:在 1,000 次下注中,最大回撤的中位数约为 90%。凯利准则使长期增长最大,但它对途中的痛苦毫不在乎。
参数是估计出来的
公式里的 p、b 或 μ、σ 都假设是已知的。现实中它们是从有限的数据中估计出来的,而期望收益是最难估计的参数:默顿指出,提高估计期望收益的精度需要更长的时间跨度,而不是更高的采样频率 (Merton 1980);乔普拉与津巴发现,在投资组合优化中,期望收益的估计误差造成的损失远大于方差与协方差的误差 (Chopra and Ziemba 1993)。
假设真实的超额收益是 m,投资者用 T 年的数据估计它,估计值的标准误为 σ/√T,然后按估计值下注 c 倍的凯利比例。期望的超额增长率可以精确算出:
它在 c* = m2/(m2 + s2) < 1 处最大:估计越不准,越应该少下注。
推导
真实超额收益 4%,波动率 18%(示意参数)。比较用 5 到 100 年的数据估计时,不同倍数的凯利下注的期望超额增长;最后给出连续模型中「财富曾经跌到起点的 x 倍」的概率。
# Kelly with an estimated edge. The investor does not know the excess return m = mu - r;
# she estimates it from T years of data, m_hat ~ Normal(m, s^2), s = sigma / sqrt(T),
# and invests the fraction f = c * m_hat / sigma^2 (c = 1: full Kelly on the estimate).
# Expected excess growth a year:
# E[f m - f^2 sigma^2 / 2] = (c m^2 - c^2 (m^2 + s^2) / 2) / sigma^2,
# maximised at c* = m^2 / (m^2 + s^2) < 1.
import math, random
m, sigma = 0.04, 0.18 # illustrative: excess return 4 %, volatility 18 %
best = m ** 2 / (2 * sigma ** 2)
print(f"true Kelly fraction m/sigma^2 = {m / sigma ** 2:.2f}; best excess growth {best:.4f}")
print("expected excess growth as a share of the best, for multiples c of Kelly")
print(f"{'years of data':>14} {'s.e. of m':>10} {'c*':>5}"
+ "".join(f"{'c = ' + str(c):>9}" for c in (0.25, 0.5, 1.0, 2.0)))
for T in (5, 10, 20, 50, 100):
s = sigma / math.sqrt(T)
eg = lambda c: (c * m ** 2 - c ** 2 * (m ** 2 + s ** 2) / 2) / sigma ** 2
cstar = m ** 2 / (m ** 2 + s ** 2)
print(f"{T:14d} {s:10.3f} {cstar:5.2f}"
+ "".join(f"{eg(c) / best:9.0%}" for c in (0.25, 0.5, 1.0, 2.0)))
# Check one row by simulation.
random.seed(5)
T = 20; s = sigma / math.sqrt(T)
sims = [random.gauss(m, s) for _ in range(200_000)]
for c in (0.5, 1.0):
fs = [c * x / sigma ** 2 for x in sims]
val = sum(f * m - f * f * sigma ** 2 / 2 for f in fs) / len(fs)
print(f"simulation, {T} years of data, c = {c}: {val / best:.0%} of best")
# Drawdowns. In the continuous model, investing c times the (true) Kelly fraction, the
# probability that wealth (relative to the risk-free asset) EVER falls to a fraction x of
# its starting value is x^(2/c - 1).
print("\nprobability of ever falling to a fraction x of the start")
print(f"{'c':>6}" + "".join(f"{'x = ' + str(x):>10}" for x in (0.8, 0.5, 0.2)))
for c in (0.25, 0.5, 1.0, 1.5):
print(f"{c:6.2f}" + "".join(f"{x ** (2 / c - 1):10.1%}" for x in (0.8, 0.5, 0.2)))
# true Kelly fraction m/sigma^2 = 1.23; best excess growth 0.0247
# expected excess growth as a share of the best, for multiples c of Kelly
# years of data s.e. of m c* c = 0.25 c = 0.5 c = 1.0 c = 2.0
# 5 0.080 0.20 18% -26% -305% -1620%
# 10 0.057 0.33 31% 24% -102% -810%
# 20 0.040 0.50 37% 50% -1% -405%
# 50 0.025 0.71 41% 65% 60% -162%
# 100 0.018 0.83 42% 70% 80% -81%
# simulation, 20 years of data, c = 0.5: 50% of best
# simulation, 20 years of data, c = 1.0: -1% of best
#
# probability of ever falling to a fraction x of the start
# c x = 0.8 x = 0.5 x = 0.2
# 0.25 21.0% 0.8% 0.0%
# 0.50 51.2% 12.5% 0.8%
# 1.00 80.0% 50.0% 20.0%
# 1.50 92.8% 79.4% 58.5%这张表的意思很直接:在这组参数下,即使有 20 年的数据,按估计值下全凯利的期望超额增长也已经接近零,半凯利则保留了一半;只有 5 到 10 年的数据时,全凯利的期望结果比完全不承担风险还差得多。负数在这里不是笔误:估计误差让下注比例时而过大、时而方向错误,平方项的惩罚超过了线性项的收益。
证据
回撤。 在连续模型中,下注 c 倍凯利比例时,财富(相对于无风险资产)曾经跌到起点 x 倍的概率是 x2/c−1。全凯利下,财富曾经腰斩的概率是 50%,曾经跌到起点五分之一的概率是 20%;半凯利下,这两个概率分别是 12.5% 与 0.8%。索普与麦克莱恩、索普、津巴讨论了全凯利的这些「坏性质」,并以此作为在实践中使用分数凯利的主要理由 (Thorp 2006; MacLean et al. 2011)。
证据
凯利与股票市场。 罗坦多与索普把凯利准则应用于股票指数,讨论了把它用于真实市场时的实际问题 (Rotando and Thorp 1992)。如上文所示,估计出的最优杠杆对期望收益的假设非常敏感;第六章还会说明,收益分布的厚尾会进一步降低它。萨缪尔森则从理论上反对把最大化对数财富当作所有人的目标:风险厌恶比对数更强的人,即使在很长的期限里,也应该选择比凯利更保守的策略 (Samuelson 1979)。从这个角度看,分数凯利不只是对参数误差的修正,也是对不同风险态度的尊重。
假说 · 尚未验证
「凯利倍数 = 信心」假说(尚未确立)。在参数不确定时,一个人实际应下注的凯利倍数 c,近似等于他对自己估计的「信号占比」m2/(m2 + s2);人们普遍高估这个占比(过度自信),所以实际下注倍数系统性地高于 c。如果实验中受试者在得知估计精度后,选择的倍数并不随精度变化,或者平均低于 c,这一假说就被削弱。
本章小结
凯利准则给出使长期增长率最大的下注比例 f* = (bp − q)/b,连续形式为 (μ − r)/σ2。半凯利保留约四分之三的增长、只有一半的波动;两倍凯利的超额增长为零。全凯利的回撤极深:财富曾经腰斩的概率是 50%。更重要的是,期望收益只能被粗略地估计,按估计值下全凯利,期望结果可能比不承担风险更差;最优的倍数随估计精度下降而下降。下一章讨论另一种限制:当你有每个月都必须支付的刚性支出时,「零」不只是一个数学极限,而是一道吸收壁。
参考文献
Fan, Y. (2026). Non-Ergodic Wealth Dynamics, the Kelly Criterion and Volatility Drag: From Itô's Lemma on Geometric Brownian Motion and Ruin Barriers to Barbell Portfolios, Read Beside the Shiji's 'Biographies of the Money-Makers' [非遍历性财富动力学、凯利准则与波动率税] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23754709 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).