关于「一年现金流的尾部风险与到岸成本试算器」,《买手的背包、口岸博弈与报关反转点》给出的定量结论是什么?
结论:第六章用固定种子的蒙特卡洛模拟一年现金流,每月 20 件时带货的条件风险价值是 146183 元,并给出到岸成本试算器。
数据口径:书中参数为示意,各地法规不同;全部计算由书中程序生成;本书不是个人化的法律或税务建议。 第三章把口岸查验写成检查博弈,示意参数下不申报的盈亏平衡查验率是 0.1852,而风险画像使查验率在每季度两到四趟之间从 0.0380 跳到 0.5035。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 146183, 20
| Q/mo channel | mean | sd | P(loss) | VaR95 | CVaR95 | CVaR99 |
| 20 carry | 43284 | 55390 | 0.1004 | 119360 | 146183 | 168762 |
| 20 general | -35756 | 2552 | 1.0000 | 39954 | 41038 | 42672 |
| 38 carry | 4173 | 109675 | 0.5187 | 150684 | 158806 | 174003 |
| 38 general | 9770 | 4915 | 0.0232 | -1674 | 353 | 3362 |
| 60 carry | -106332 | 27979 | 0.9988 | 146530 | 158982 | 171448 |
| 60 general | 65573 | 7706 | 0.0000 | -52905 | -49547 | -44630 |
| 100 carry | -84021 | 99360 | 0.9828 | 113700 | 482484 | 544592 |
| 100 general | 166632 | 12803 | 0.0000 -145382 -139931 -132287 |
查看完整验算程序
# Chapter 6. p61: one year of cash flow by Monte Carlo, seed 20261112.
# A shop sells 12 Q units a year at 950 yuan. Carrying: trips of 50
# units, 4500 yuan travel, goods 600 a unit, profiled inspection rate
# of p41, sensitivity 0.9; at a finding the goods (30000) are lost, a
# fine of T = 6000 and a credit loss of 60000 are paid, each of the
# other n - 1 trips of the year is traced with probability 0.5 at 12000
# each, a severe tier of 400000 applies once traced tax reaches 100000,
# and the rest of the year is bought through general trade. General
# trade: 739 yuan a unit plus 7200 a month, each month's unit cost
# scaled by 1 + 0.05 Z for freight and exchange noise. 20000 years per
# volume. VaR and CVaR are losses measured from zero profit. All
# parameters are illustrative.
import math
import random
rng = random.Random(20261112)
YEARS, PRICE, UNIT, PER, TRAVEL = 20000, 950, 600, 50, 4500
def p_insp(n):
k = n / 4
a = 0.02 * math.exp(-5.0 + k * math.log(5.0) - math.lgamma(k + 1))
b = 0.98 * math.exp(-0.4 + k * math.log(0.4) - math.lgamma(k + 1))
return 0.02 + 0.58 * a / (a + b)
def general_year(q, months=12):
out = []
for _ in range(months):
out.append(q * 739 * (1 + 0.05 * rng.gauss(0, 1)) + 7200)
return math.fsum(out)
def carry_year(q):
n = math.ceil(12 * q / PER)
h = p_insp(n) * 0.9
units, cost = 12 * q, []
for j in range(1, n + 1):
cost.append(TRAVEL)
if rng.random() < h:
x = 0
for _ in range(n - 1):
if rng.random() < 0.5:
x += 1
cost += [UNIT * PER, 6000, 60000, x * 12000]
if (x + 1) * 6000 >= 100000:
cost.append(400000)
done = PER * (j - 1)
left = max(units - done, 0)
cost.append(UNIT * min(done, units))
months = left / q
cost.append(months * (q * 739 + 7200))
return PRICE * units - math.fsum(cost)
cost.append(UNIT * min(PER * n, units))
return PRICE * units - math.fsum(cost)
def stats(xs):
xs = sorted(xs)
n = len(xs)
mean = math.fsum(xs) / n
sd = math.sqrt(math.fsum((x - mean) ** 2 for x in xs) / (n - 1))
ploss = len([x for x in xs if x < 0]) / n
k5, k1 = n // 20, n // 100
var95 = -xs[k5]
cvar95 = -math.fsum(xs[:k5]) / k5
cvar99 = -math.fsum(xs[:k1]) / k1
return mean, sd, ploss, var95, cvar95, cvar99
print("Q/mo channel mean sd P(loss) VaR95 CVaR95 CVaR99")
for q in (20, 38, 60, 100):
for lab, f in (("carry", carry_year),
("general", lambda q: PRICE * 12 * q - general_year(q))):
m, sd, pl, v95, c95, c99 = stats([f(q) for _ in range(YEARS)])
print("{:4d} {:8s}{:8.0f}{:8.0f}{:9.4f}{:8.0f}{:8.0f}{:8.0f}"
.format(q, lab, m, sd, pl, v95, c95, c99))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《跨国买手体积重量双维背包优化、口岸风险画像抽检博弈与正规报关规模反转点》第 6 章「一年现金流的尾部风险与到岸成本试算器」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-174 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026174,
author = {Fan, Yafu},
title = {Two-Dimensional Volume-Weight Knapsacks for Cross-Border Buyers, Port Risk-Profiling Inspection Games and the Scale Reversal Point to Formal Customs Clearance},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}