关于「瓦尔德恒等式:止损线卖掉的是时间」,《鞅、停时与商业试错的停损界》给出的定量结论是什么?
结论:瓦尔德第一恒等式说,停下时的期望结果等于每期漂移乘以期望期数;程序 p31 与 p32 在两条线与三条线上精确验证了它。止损线、止盈线与截止日期能动的只有时间:对成功概率 0.45 的项目,止损线从无到紧,把期望亏损从 2.469 缩到 0.905;对成功概率 0.55 的项目,同样的止损线把期望盈利从 2.164 缩到 1.157。从台账里读漂移,要用合并比率而不是逐项平均,否则一个亏损的项目类别会读成盈利。既然停止规则只改变时间,「见好就收」又改变了什么?它为什么让人觉得自己赢多输少?这是下一章的问题。
数据口径:可选停时定理说,只要停止时刻不偷看未来且有上限,不赚不亏的事情在停下时的期望结果就等于起点;示意参数下,「第一次领先就停」的胜率是 0.824,期望却精确为零。 书中参数均为示意;全部计算由书中程序生成。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.45, 0.55, 1.157, 2.164
| target +6, stop -4, deadline 26 weeks | |
| p P(tgt) P(stop) P(dead) E[T] E[S_T] mu*E[T] same | |
| 0.45 | 0.1226 0.6197 0.2578 15.949 -1.5949 -1.5949 True |
| 0.50 | 0.2419 0.4406 0.3176 17.348 0.0000 0.0000 True |
| 0.55 | 0.4085 0.2777 0.3138 17.747 1.7747 1.7747 True |
| stop-line sweep, target +6, deadline 26 | |
| b | E[S_T] E[T] | E[S_T] E[T] | |
| | p | 0.45 | p = 0.55 |
| 2 | | -0.905 9.05 | 1.157 11.57 |
| 3 | | -1.282 12.82 | 1.525 15.25 |
| 4 | | -1.595 15.95 | 1.775 17.75 |
| 6 | | -2.033 20.33 | 2.033 20.33 |
| 8 | | -2.276 22.76 | 2.125 21.25 |
| 12 | | -2.445 24.45 | 2.162 21.62 |
| 27 | | -2.469 24.69 | 2.164 21.64 |
| b | 27 means no stop line inside the deadline |
核心公式
\[E[S_T]=\mu\,E[T].\]
查看完整验算程序
# Chapter 3. p32: Three lines (target, stop, deadline): the stop line
# sells time. Model: +1/-1 walk per period (one period = one week of a
# trial), success probability p, target +6, stop -b, deadline 26 weeks.
# Exact distribution by forward recursion over fractions. Wald I holds
# exactly for this bounded stopping time: E[S_T] = (2p - 1) E[T].
# Part 2 sweeps the stop line b for a losing (p = 0.45) and a winning
# (p = 0.55) trial. All parameters are illustrative.
from fractions import Fraction
def three_lines(p, a, b, n):
q = 1 - p
live = {0: Fraction(1)}
p_a = p_b = Fraction(0)
es = et = Fraction(0)
for t in range(1, n + 1):
new = {}
for s, pr in live.items():
new[s + 1] = new.get(s + 1, Fraction(0)) + pr * p
new[s - 1] = new.get(s - 1, Fraction(0)) + pr * q
live = {}
for s in sorted(new):
pr = new[s]
if s >= a:
p_a += pr
es += s * pr
et += t * pr
elif s <= -b:
p_b += pr
es += s * pr
et += t * pr
else:
live[s] = pr
p_n = Fraction(0)
for s, pr in live.items():
p_n += pr
es += s * pr
et += n * pr
return p_a, p_b, p_n, es, et
A, B, N = 6, 4, 26
print("target +%d, stop -%d, deadline %d weeks" % (A, B, N))
print("%5s %8s %8s %8s %7s %8s %8s %5s" % (
"p", "P(tgt)", "P(stop)", "P(dead)", "E[T]", "E[S_T]", "mu*E[T]",
"same"))
for p in (Fraction(9, 20), Fraction(1, 2), Fraction(11, 20)):
pa, pb, pn, es, et = three_lines(p, A, B, N)
mu = 2 * p - 1
print("%5.2f %8.4f %8.4f %8.4f %7.3f %8.4f %8.4f %5s" % (
float(p), float(pa), float(pb), float(pn), float(et),
float(es), float(mu * et), es == mu * et))
print("stop-line sweep, target +%d, deadline %d" % (A, N))
print("%4s | %8s %7s | %8s %7s" % ("b", "E[S_T]", "E[T]", "E[S_T]",
"E[T]"))
print("%4s | %16s | %16s" % ("", "p = 0.45", "p = 0.55"))
for b in (2, 3, 4, 6, 8, 12, 27):
lo = three_lines(Fraction(9, 20), A, b, N)
hi = three_lines(Fraction(11, 20), A, b, N)
print("%4d | %8.3f %7.2f | %8.3f %7.2f" % (
b, float(lo[3]), float(lo[4]), float(hi[3]), float(hi[4])))
print("b = 27 means no stop line inside the deadline")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《杜布鞅论可选停时定理、加倍追注谬误与商业试错见好就收停损界母典》第 3 章「瓦尔德恒等式:止损线卖掉的是时间」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-249 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026249,
author = {Fan, Yafu},
title = {Doob's Martingales and the Optional Stopping Theorem: the Doubling Fallacy and Rigorous Stop-Loss Bounds for Business Trials},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}