关于「固定种子的订单模拟:四种付款政策在同一批买家身上的账」,《货到付款押金与预付筛选》给出的定量结论是什么?
结论:第六章以固定种子模拟四种政策,押金规则加申诉复核比只做货到付款多赚 3535.44。
数据口径:本书把一单的账拆开:示意参数下,签收一单的毛利为 4.5342,拒收一单要付出双程运费、货损与资金占用共 4.3522,盈亏平衡拒收率为 0.4202;在买家自愿付款的保守假设下,追讨要打平需要联系率与付款率之积达到 0.2068,现实中很难做到。 东南亚拒收率没有找到经同行评议的估计,书中参数全部为示意,全部计算由书中程序生成。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 3535.44
| buyers 4000 (committed 2995, casual 1005) | |
| pol orders fails rate profit total per order flag H flag L | |
| P0 | 31843 3949 0.1240 118763.04 3.7296 0.0000 0.0000 |
| P1 | 31843 3569 0.1121 120472.25 3.7833 0.0000 0.0000 |
| P2 | 31277 3204 0.1024 122358.96 3.9121 0.0097 0.4876 |
| P3 | 31285 3211 0.1026 122298.48 3.9092 0.0060 0.4826 |
| analytic P0 profit per order 3.7134 | |
| P1 minus P0 | 1709.20 u |
| P2 minus P0 | 3595.92 u |
| P3 minus P0 | 3535.44 u |
查看完整验算程序
# Chapter 6. p61: a fixed-seed simulation of four payment policies.
# 4000 buyers, a quarter casual; each places 2 to 14 orders with a
# basket drawn from {10, 15, 20, 30, 45} u. Failures per COD attempt:
# buyer refusal 0.025 (committed) or 0.325 (casual), buyer absent
# 0.015, carrier or address error 0.01; a fifth of the last two are
# wrongly recorded as refusals. Trust cost phi is uniform on
# [0, 0.16]; surplus per order uniform on [0, 6] u. Policies:
# P0 COD only; P1 COD plus a prepay discount of 0.0278 of the basket
# (p41); P2 = P1 plus the deposit rule of p32 from the buyer's own
# record (flagged buyers pay a deposit, deterred as in p51, or leave
# when the expected deposit cost exceeds their surplus); P3 = P2
# with appeal and human review that strikes wrongly recorded
# refusals from the record. Costs follow p13. The same random draws
# serve every policy. Illustrative parameters throughout.
import math
import random
SO = SR = 1.8
RATE, DR, DF, FEE, A, E = 0.12, 21, 10, 0.03, 0.8, 0.015
QH, PHI, RHO, H, THETA = 0.05, 0.08, 0.6, 1.8, 6.0
QD = (0.025, 0.325)
QA, QC, MIS = 0.015, 0.01, 0.2
DISC = 0.0278
def costs(p):
c = 0.65 * p
m = p - c - SO - FEE * p - p * RATE * DF / 365
k = math.fsum([SO, SR, 0.05 * c, (c + SO) * RATE * DR / 365])
return c, m, k
def dstar(p, ql):
_, _, k = costs(p)
d0 = (ql * k + A) / (1 - ql) - (QH * k + A) / (1 - QH)
return (1 - ql) * d0 / (ql + PHI - (1 - ql) * QH / (1 - QH))
def deposit(p, n, k):
qhat = (k + 1) / (n + 10)
if n < 5 or qhat <= 0.15:
return 0.0
return math.floor(min(dstar(p, qhat), costs(p)[2]) * 2) / 2
def draw(seed):
rng = random.Random(20261113)
rng.seed(seed)
buyers = []
for _ in range(4000):
t = 1 if rng.random() < 0.25 else 0
phi, surplus = rng.uniform(0, 0.16), rng.uniform(0, 6)
orders = [(rng.choice((10, 15, 20, 30, 45)), rng.random(),
rng.random(), rng.random())
for _ in range(rng.randint(2, 14))]
buyers.append((t, phi, surplus, orders))
return buyers
def run(buyers, pol):
prof, n_ord, n_fail, flagged = [], 0, 0, [0, 0]
for t, phi, sur, orders in buyers:
rec_n, rec_k, was = 0, 0, False
for p, u1, u2, u3 in orders:
c, m, k = costs(p)
d = DISC * p if pol >= 1 else 0.0
qtot = QD[t] + QA + QC
if pol >= 1 and d >= phi * (p - d) + RHO * qtot * H:
n_ord = n_ord + 1
if u1 < RHO * QD[t]:
prof.append(-math.fsum([SO, 0.05 * c, A, E * (p - d),
(c + SO) * RATE * DR / 365]))
else:
prof.append(p - d - c - SO - E * (p - d) - A)
continue
dep = deposit(p, rec_n, rec_k) if pol >= 2 else 0.0
if dep > 0:
was = True
if (qtot + phi) * dep > sur:
break
qd = QD[t] * math.exp(-dep / THETA)
n_ord, rec_n = n_ord + 1, rec_n + 1
if u1 < qd:
n_fail, rec_k = n_fail + 1, rec_k + 1
prof.append(dep - k - A)
elif u1 < qd + QA + QC:
n_fail = n_fail + 1
if u2 < MIS and pol != 3:
rec_k = rec_k + 1
prof.append(-k - A)
else:
prof.append(m - A)
if was:
flagged[t] = flagged[t] + 1
return math.fsum(prof), n_ord, n_fail, flagged
if __name__ == "__main__":
buyers = draw(20261113)
nt = [0, 0]
for b in buyers:
nt[b[0]] = nt[b[0]] + 1
print("buyers {} (committed {}, casual {})".format(
len(buyers), nt[0], nt[1]))
print("pol orders fails rate profit total per order flag H flag L")
for pol in range(4):
tot, no, nf, fl = run(buyers, pol)
print("P{} {:6d} {:6d} {:6.4f} {:13.2f} {:9.4f} {:6.4f} {:6.4f}"
.format(pol, no, nf, nf / no, tot, tot / no, fl[0] / nt[0],
fl[1] / nt[1]))
ana = []
for p in (10, 15, 20, 30, 45):
_, m, k = costs(p)
for t, w in ((0, 0.75), (1, 0.25)):
q = QD[t] + QA + QC
ana.append(0.2 * w * ((1 - q) * m - q * k - A))
print("analytic P0 profit per order {:.4f}".format(math.fsum(ana)))
base = run(buyers, 0)[0]
for pol in (1, 2, 3):
print("P{} minus P0: {:9.2f} u".format(pol, run(buyers, pol)[0]
- base))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《货到付款拒收博弈与东南亚电商信任赤字、押金阈值与预付折扣激励设计母典》第 6 章「固定种子的订单模拟:四种付款政策在同一批买家身上的账」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-314 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026314,
author = {Fan, Yafu},
title = {Cash-on-Delivery Refusal Games and the Trust Deficit in Southeast Asian E-Commerce: Deposit Thresholds and Prepayment-Discount Incentive Design},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}