What does Acquirer Risk Steps and Reserve Survival conclude, in numbers, about “Jumps: Cumulative Sums, Exponentially Weighted Averages and Bayesian Online Change Points”?
Answer: Chapter 3 detects jumps in takings with CUSUM, EWMA and Bayesian online changepoints; at one false alarm a year a one-standard-deviation rise is seen in 8.5 days on average.
Scope of the numbers: Parameters are illustrative; all calculations come from the book's programs. This is general risk analysis, not legal, financing or investment advice, and promises no income.
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: 8.5
| upper CUSUM, K = 0.5, SIGMA = 0.25 on log takings | |||||
| target ARL0 | h | ARL1 at delta = 0.5 | 1.0 | 2.0 | 3.0 |
| 100 | 2.849 | 16.1 | 6.1 | 2.6 | 1.7 |
| 365 | 4.083 | 27.5 | 8.5 | 3.4 | 2.2 |
| 730 | 4.761 | 35.1 | 9.9 | 3.8 | 2.5 |
| takings factor: 0.5 -> 1.133, 1.0 -> 1.284, 2.0 -> 1.649, 3.0 -> 2.117 | |||||
| false alarms a year at ARL0 365: about 1.00 |
Key formula
Show the full program
# Chapter 3. p31: Page's CUSUM on daily log takings, threshold by ARL.
# x_t = log(daily takings); in control x_t ~ N(mu, SIGMA), SIGMA = 0.25
# (illustrative). z_t = (x_t - mu) / SIGMA. Upper CUSUM:
# S_t = max(0, S_{t-1} + z_t - K), alarm when S_t > h, K = 0.5.
# Average run lengths (ARL) by the Brook-Evans Markov chain with M
# states, solved by Gaussian elimination. ARL0 = mean days between
# false alarms with no change; ARL1 = mean days to alarm after a step
# of delta standard deviations (delta = 1 is takings x exp(0.25)).
import math
SIGMA, K, M = 0.25, 0.5, 90
def phi(x):
return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))
def solve(a, b):
n = len(b)
a = [row[:] + [b[i]] for i, row in enumerate(a)]
for c in range(n):
piv = max(range(c, n), key=lambda r: abs(a[r][c]))
a[c], a[piv] = a[piv], a[c]
for r in range(c + 1, n):
f = a[r][c] / a[c][c]
if f:
for j in range(c, n + 1):
a[r][j] -= f * a[c][j]
x = [0.0] * n
for r in range(n - 1, -1, -1):
tail = math.fsum([a[r][j] * x[j] for j in range(r + 1, n)])
x[r] = (a[r][n] - tail) / a[r][r]
return x
def cusum_arl(h, delta):
w = 2.0 * h / (2 * M - 1)
mat = []
for i in range(M):
ci = i * w
row = []
for j in range(M):
if j == 0:
pij = phi(0.5 * w - ci + K - delta)
else:
pij = (phi((j + 0.5) * w - ci + K - delta)
- phi((j - 0.5) * w - ci + K - delta))
row.append((1.0 if i == j else 0.0) - pij)
mat.append(row)
return solve(mat, [1.0] * M)[0]
def h_for(arl0):
lo, hi = 1.0, 8.0
for _ in range(40):
mid = 0.5 * (lo + hi)
if cusum_arl(mid, 0.0) < arl0:
lo = mid
else:
hi = mid
return 0.5 * (lo + hi)
def main():
print("upper CUSUM, K = 0.5, SIGMA = 0.25 on log takings")
print("target ARL0 h ARL1 at delta = 0.5 1.0 2.0 3.0")
for arl0 in (100, 365, 730):
h = h_for(arl0)
a1 = [cusum_arl(h, d) for d in (0.5, 1.0, 2.0, 3.0)]
print("{:>10} {:.3f} {:>7.1f} {:>5.1f} {:>5.1f}"
" {:>5.1f}".format(arl0, h, *a1))
print("takings factor: " + ", ".join(
"{} -> {:.3f}".format(d, math.exp(d * SIGMA))
for d in (0.5, 1.0, 2.0, 3.0)))
h = h_for(365)
print("false alarms a year at ARL0 365: about {:.2f}".format(
365.0 / cusum_arl(h, 0.0)))
if __name__ == "__main__":
main()Single source and citation
Fan, Y. (2026). Payment-Acquirer Risk Step-Functions, Multi-Gateway Hot Failover and Rolling-Reserve Survival for Digital Fleets (Version 1.0.0), Chapter 3: Jumps: Cumulative Sums, Exponentially Weighted Averages and Bayesian Online Change Points. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-397 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026397,
author = {Fan, Yafu},
title = {Payment-Acquirer Risk Step-Functions, Multi-Gateway Hot Failover and Rolling-Reserve Survival for Digital Fleets},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Steps: Noise in the Chargeback Ratio, the Beta Posterior and Card-Network Definitions
- Chapter 2 · Lag: Cohort Measures, Arrival-Date Measures and Underestimation During Surges
- Chapter 4 · Refunds: The Optimal Interception Threshold Before a Dispute
- Chapter 5 · Hot Failover: Common-Cause Failure, Timeout Budgets and Idempotency
- Chapter 6 · Reserves: Rolling Holdbacks, Settlement Freezes and the Minimum Buffer That Keeps Cash Flowing
- Chapter 7 · Reading the Classics: Peace and Peril in the Zuo Zhuan, Forethought in the Doctrine of the Mean, Joseph's Granaries and Bagehot's Reserve
- Chapter 8 · The Empirical Loop: the Acquirer-Risk Ledger, Field Tools and Checker Specifications