What does Martingales, Stopping Times and Stop-Loss Bounds conclude, in numbers, about “Wald's Identities: a Stop Line Sells Time”?

Answer: Wald's first identity says that the expected result at stopping equals the drift per period times the expected number of periods; programs p31 and p32 confirm it exactly for two lines and for three. Stop lines, profit lines and deadlines can move only time: for a project with success probability 0.45, moving from no stop line to a tight one shrinks the expected loss from 2.469 to 0.905; for a project with success probability 0.55, the same stop line shrinks the expected gain from 2.164 to 1.157. To read a drift from a log, use the pooled ratio rather than the per-trial average, or a losing class of projects will read as a winning one. If stopping rules change only time, what does quitting while ahead change, and why does it make people feel they win more than they lose? That is the question of the next chapter.

Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs. It is not individual financial advice, does not encourage gambling of any kind, and analyses doubling only as a counter-example.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 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.450.1226 0.6197 0.2578 15.949 -1.5949 -1.5949 True
0.500.2419 0.4406 0.3176 17.348 0.0000 0.0000 True
0.550.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]
| p0.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
b27 means no stop line inside the deadline

Key formula

\[E[S_T]=\mu\,E[T].\]
Show the full program
# 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")

Single source and citation

Fan, Y. (2026). Doob's Martingales and the Optional Stopping Theorem: the Doubling Fallacy and Rigorous Stop-Loss Bounds for Business Trials (Version 1.0.0), Chapter 3: Wald's Identities: a Stop Line Sells Time. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 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}
}

Other chapter answers in this book