What does Extreme Tails and Chargeback Reserves conclude, in numbers, about “Chargeback Reserves and Server Headroom: Writing Return Levels into the Ledger and the Server Room”?

Answer: Chapter 6 writes return levels into chargeback reserves and server headroom: at once in a thousand months the true monthly bill is 1.77 times the normal rule, a reserve spliced and fitted with the shape at its upper end is 9798 yuan, and the residual method gives servers a median of 0.98 overloaded minutes a year.

Scope of the numbers: Chapter 5 chooses the threshold with the mean excess plot and 150 simulated shops; the log error of the ten-year level is smallest at the ninetieth percentile, at 0.194. Marked boxes separate published evidence, runnable Python calculations (19 programs), classical sources and the author's hypotheses.

中文版

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: 1.77

monthly chargeback bill: mean 1833, sd 1098 yuan (lam 7.2)
level1-in-T mo simulated normal ratio
0.95020 3624 3639 1.00
0.990100 5080 4387 1.16
0.995200 5962 4661 1.28
0.9991000 9257 5226 1.77
expected shortfall beyond 0.997305 yuan
three average months5500; months above it: 0.0070
months above q0.99 where one chargeback is over half the bill0.607
Show the full program
# Chapter 6. p61: the monthly chargeback bill and three reserve rules.
# Model: 1,800 orders a month, each charged back with probability 0.004
# (Poisson count, mean 7.2 a month); a chargeback costs the order value
# (illustrative Burr XII law, b = 200, c = 2, k = 1.25) plus a 15 yuan
# fee. All parameters are illustrative. 40,000 simulated months (fixed
# seed) give the exact-by-simulation quantiles and expected shortfall;
# set beside them the normal rule mean + z sd from the exact compound
# Poisson moments, and the rule of thumb "three average months".

import math
import random
from statistics import NormalDist

B, C, K = 200.0, 2.0, 1.25
PER, RATE, FEE = 1800, 0.004, 15.0
LAM = PER * RATE
MONTHS = 40000
ND = NormalDist()


def burr_q(p):
    return B * ((1.0 - p) ** (-1.0 / K) - 1.0) ** (1.0 / C)


def beta(a, b):
    return math.exp(math.lgamma(a) + math.lgamma(b) - math.lgamma(a + b))


def poisson(rng, lam):
    lim, k, p = math.exp(-lam), 0, rng.random()
    while p > lim:
        k += 1
        p *= rng.random()
    return k


def pct(xs, p):
    ys = sorted(xs)
    return ys[min(len(ys) - 1, int(p * len(ys)))]


m1 = B * K * beta(K - 1.0 / C, 1.0 + 1.0 / C)
m2 = B * B * K * beta(K - 2.0 / C, 1.0 + 2.0 / C)
mean_l = LAM * (m1 + FEE)
sd_l = math.sqrt(LAM * (m2 + 2.0 * FEE * m1 + FEE * FEE))
rng = random.Random(20261124)
pairs = []
for _ in range(MONTHS):
    k = poisson(rng, LAM)
    xs = [burr_q(rng.random()) + FEE for _ in range(k)]
    pairs.append((math.fsum(xs), max(xs) if xs else 0.0))
loss = sorted(t for t, _ in pairs)
print("monthly chargeback bill: mean %.0f, sd %.0f yuan (lam %.1f)"
      % (mean_l, sd_l, LAM))
print("  level   1-in-T mo   simulated   normal   ratio")
for p in (0.95, 0.99, 0.995, 0.999):
    sim = pct(loss, p)
    nor = mean_l + sd_l * ND.inv_cdf(p)
    print("  %5.3f   %8.0f   %9.0f  %7.0f  %6.2f"
          % (p, 1.0 / (1.0 - p), sim, nor, sim / nor))
tail = loss[int(0.99 * MONTHS):]
print("  expected shortfall beyond 0.99: %.0f yuan" % (math.fsum(tail)
                                                      / len(tail)))
rot = 3.0 * mean_l
print("  three average months = %.0f; months above it: %.4f"
      % (rot, len([x for x in loss if x > rot]) / MONTHS))
q99 = pct(loss, 0.99)
bad = [(t, m) for t, m in pairs if t > q99]
one = len([1 for t, m in bad if m > 0.5 * t])
print("  months above q0.99 where one chargeback is over half the bill:"
      " %.3f" % (one / len(bad)))

Single source and citation

Fan, Y. (2026). Extreme-Value Theory and Generalised Pareto Tails: Whale-Order Ceilings and Reserves for Extreme Chargebacks (Version 1.0.0), Chapter 6: Chargeback Reserves and Server Headroom: Writing Return Levels into the Ledger and the Server Room. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-244 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026244,
  author    = {Fan, Yafu},
  title     = {Extreme-Value Theory and Generalised Pareto Tails: Whale-Order Ceilings and Reserves for Extreme Chargebacks},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book