Solution: Stopped Martingales — Checking the One-Step Drift
Part 1
The indicator . Since is a stopping time, , so its complement is also in . Hence is -measurable.
Part 2
First equality: the indicator is -measurable, pull it out. Second: martingale property of . So is a martingale. ✓
Part 3
is a martingale, so is a martingale by part 2, meaning for every . Quick Monte Carlo check:
import numpy as np
rng = np.random.default_rng(0)
N = 200_000
max_n = 200
increments = rng.choice([-1, 1], size=(N, max_n))
S = np.concatenate([np.zeros((N, 1)), np.cumsum(increments, axis=1)], axis=1)
abs_S = np.abs(S)
# tau = first n such that |S_n| = 10
tau = np.argmax(abs_S >= 10, axis=1) # argmax returns first True; 0 if never
hit_mask = (abs_S >= 10).any(axis=1)
tau[~hit_mask] = max_n # clip those that didn't hit within window
for n in [1, 2, 5, 100]:
S_stopped = np.array([S[i, min(n, tau[i])] for i in range(N)])
print(f"n={n:3d}: E[S_{{n∧τ}}] = {S_stopped.mean():+.4f}")
# n= 1: E[S_{n∧τ}] = +0.0016
# n= 2: E[S_{n∧τ}] = -0.0014
# n= 5: E[S_{n∧τ}] = -0.0009
# n=100: E[S_{n∧τ}] = +0.0024All four close to zero, confirming the martingale property of the stopped process at every fixed finite time.
Part 4
At (symmetric walk starting at ), we have a.s. (on the event , which has probability by recurrence of the walk). So .
Why this is consistent with part 2. Part 2 says for every fixed . This does not imply — the interchange of limit and expectation requires an integrability condition (uniform integrability, dominated convergence, or monotone convergence).
For this example the interchange fails: converges a.s. to , but it is not uniformly integrable. At large the conditional distribution of on is skewed far to the negative side (waiting for a hit of after having been driven deep negative), so the positive contribution from (value ) is cancelled by the negative tail — only in the limit does the negative tail escape to with vanishing probability but infinite negative mass, and the mean jumps from to .
Moral: the stopped process is always a martingale, but need not equal unless you have an integrability condition. The optional stopping theorem supplies precisely the conditions under which the interchange is valid.
Takeaways
- Stopped martingales are always martingales — no integrability condition needed. This is the clean structural fact.
- requires an extra condition — bounded stopping time, bounded martingale, or uniform integrability. Otherwise the interchange of limit and expectation fails.
- The symmetric walk's hit-1 stopping time is the canonical failure of naive optional stopping: , the martingale hits a.s., but the expected value at stopping exceeds the starting value.
- Monte-Carlo sanity checks. In a trading simulator, stop-at-strategy profit calculations often implicitly invoke optional stopping. Verify the integrability condition holds (bounded horizon, bounded bankroll) before trusting the expected P&L.