What does Buyer Pricing, Fee Steps and Accessory Attach conclude, in numbers, about “Practice: One Year of a Buyer Shop and One Test Protocol”?
Answer: Chapter 8 combines these in a year of trading and one test protocol. Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (16 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 only
| policy | net/month | sd | in zone |
|---|---|---|---|
| naive, no drawer | 858171 | 32888 | 96 |
| envelope, no drawer | 860211 | 32666 | 96 |
| envelope, drawer 0.25 x 1 | 892175 | 33884 | 96 |
| envelope, drawer 0.45 x 2 | 975282 | 37051 | 96 |
| envelope gain over naive: 2040 a month | |||
| drawer 0.45 x 2 over naive, no drawer: 0.1365 | |||
| mean monthly sd: 34122 |
Show the full program
# Chapter 8. p15: One year of a buyer shop, month by month. Each month
# 300 bags are sold, drawn from the catalogue of p02 (400 bags, median
# cost 9800, yen moving 0.6% a day) and priced that morning by the
# naive rule or by the envelope of p01. A checkout drawer adds
# accessories at 7% of the bag price (net 0.425 of their price): one
# item at attach 0.25, or two items at attach 0.45. Twelve months; we
# print the mean monthly net and its spread. Seed 110.
import math
import random
T, M, G, S1, S2 = 13000.0, 0.20, 0.028, 350.0, 560.0
C1, C2 = T * (1 - G - M) - S1, T * (1 - M) - S2
def quote(c, env):
p1 = (c + S1) / (1 - G - M)
if p1 < T:
return p1
if env and c <= C2:
return T
return (c + S2) / (1 - M)
def net(p, c):
if p < T:
return p * (1 - G) - c - S1
return p - c - S2
def year(env, attach, items, seed):
rng = random.Random(seed)
base = [rng.lognormvariate(math.log(9800.0), 0.35) for _ in range(400)]
fx, months, dz = 1.0, [], 0
for _ in range(12):
tot = []
for _ in range(30):
fx *= math.exp(rng.gauss(0.0, 0.006))
for _ in range(10):
c = rng.choice(base) * fx
p = quote(c, env)
dz += C1 <= c <= C2
tot.append(net(p, c))
tot.append(attach * items * 0.07 * p * 0.425)
months.append(math.fsum(tot))
mean = math.fsum(months) / 12
sd = math.sqrt(math.fsum((x - mean) ** 2 for x in months) / 11)
return mean, sd, dz
if __name__ == "__main__":
res = []
print(" {:25s} {:>9s} {:>6s} {:>8s}".format(
"policy", "net/month", "sd", "in zone"))
for name, env, a, k in (("naive, no drawer", False, 0.0, 0),
("envelope, no drawer", True, 0.0, 0),
("envelope, drawer 0.25 x 1", True, 0.25, 1),
("envelope, drawer 0.45 x 2", True, 0.45, 2)):
m, s, dz = year(env, a, k, 110)
res.append((m, s))
print(" {:25s} {:9.0f} {:6.0f} {:8d}".format(name, m, s, dz))
print(" envelope gain over naive: {:.0f} a month".format(
res[1][0] - res[0][0]))
print(" drawer 0.45 x 2 over naive, no drawer: {:.4f}".format(
res[3][0] / res[0][0] - 1))
print(" mean monthly sd: {:.0f}".format(
math.fsum(x[1] for x in res) / len(res)))Single source and citation
Fan, Y. (2026). Cross-Border Buyer Dynamic Pricing, Fee-Threshold Payment Routing and Accessory Attach Economics (Version 1.0.0), Chapter 8: Practice: One Year of a Buyer Shop and One Test Protocol. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-110 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026110,
author = {Fan, Yafu},
title = {Cross-Border Buyer Dynamic Pricing, Fee-Threshold Payment Routing and Accessory Attach Economics},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Deadzone: When a Dearer Bag Gets a Cheaper Quote
- Chapter 2 · The Envelope: Menus, Many Steps and Safe Rounding
- Chapter 3 · The Accessory in the Box: Zero Marginal Freight and Mixed Bundling
- Chapter 4 · The Checkout Drawer: Exposure, Discounts and Small Tests
- Chapter 5 · Five Days Open: Currency Risk in a Live Buying Window
- Chapter 6 · The Refund That Never Quite Arrives
- Chapter 7 · Mother and Child Coins, the Equable Transport and Block Booking