What does Martingales, Stopping Times and Stop-Loss Bounds conclude, in numbers, about “The Learning Value of a Stop Line: Lines of Belief, the Gap Between Good and Bad, and Escalating Sunk Costs”?
Answer: Chapter 5 shows that a stop line is a line of belief whose value rises with the gap between good and bad, capturing at most 0.646 of the value of foresight.
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.646
| prior good 0.3, deadline 26; result units per trial | |||||
| d | run all | best | stop | perfect | captured |
| 0.02 | -0.416 | -0.086 | -1 | 0.312 | -0.275 |
| 0.05 | -1.040 | -0.108 | -1 | 0.780 | -0.139 |
| 0.10 | -2.080 | 0.104 | -1 | 1.560 | 0.067 |
| 0.15 | -3.120 | 0.569 | -1 | 2.340 | 0.243 |
| 0.20 | -4.160 | 1.278 | -2 | 3.120 | 0.410 |
| 0.30 | -6.240 | 3.025 | -2 | 4.680 | 0.646 |
| a negative best means: do not start, or test more cheaply |
Key formula
Show the full program
# Chapter 5. p52: How much a stop line can learn depends on how far
# apart good and bad trials are, relative to weekly noise.
# Model: good p = 0.5 + d, bad p = 0.5 - d, prior good 0.3 (most trials
# fail), deadline 26 weeks, stop at -b with b chosen best in 1..26.
# Not starting earns 0; running everything to the deadline earns
# 26 x 2d x (2 x 0.3 - 1); perfect foresight (run only the good ones)
# earns 0.3 x 26 x 2d. "captured" = best stop line / perfect foresight.
# Exact fractions; d and the prior are illustrative.
from fractions import Fraction
N = 26
PI = Fraction(3, 10)
def run(p, b):
q = 1 - p
live = {0: Fraction(1)}
es = 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):
if s <= -b or t == N:
es += s * new[s]
else:
live[s] = new[s]
return es
print("prior good 0.3, deadline %d; result units per trial" % N)
print("%5s %9s %9s %6s %9s %9s" % (
"d", "run all", "best", "stop", "perfect", "captured"))
for d in (Fraction(1, 50), Fraction(1, 20), Fraction(1, 10),
Fraction(3, 20), Fraction(1, 5), Fraction(3, 10)):
allin = N * 2 * d * (2 * PI - 1)
best_b, best_e = None, None
for b in range(1, N + 1):
e = PI * run(Fraction(1, 2) + d, b) + \
(1 - PI) * run(Fraction(1, 2) - d, b)
if best_e is None or e > best_e:
best_b, best_e = b, e
perfect = PI * N * 2 * d
print("%5.2f %9.3f %9.3f %6d %9.3f %9.3f" % (
float(d), float(allin), float(best_e), -best_b, float(perfect),
float(best_e / perfect)))
print("a negative best means: do not start, or test more cheaply")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 5: The Learning Value of a Stop Line: Lines of Belief, the Gap Between Good and Bad, and Escalating Sunk Costs. 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
- Chapter 1 · A Conservation Law for Fair Games: Martingales, Bounded Stopping Times and the Optional Stopping Theorem
- Chapter 2 · The Exact Accounts of the Doubling Ladder: Finite Capital, Tail Losses and Doubling After a Loss
- Chapter 3 · Wald's Identities: a Stop Line Sells Time
- Chapter 4 · Quitting While Ahead Changes Only the Shape: the Win-Rate Illusion and Selling Winners While Holding Losers
- Chapter 6 · Peeking and Early Stopping: Optional Stopping and Test Martingales in Online Experiments
- Chapter 7 · Eastern and Western Sources Examined: Laozi on Knowing Enough and Knowing When to Stop, and Bernoulli's Logarithm
- Chapter 8 · Closing the Loop: the Three-Line Register of a Trial Budget, the Stop-Loss Bound Calculator and a Pre-Registered Protocol