关于「实证闭环:节气订货日历、门店排期与预注册检验」,《节气、热滞后与季节需求》给出的定量结论是什么?
结论:第八章给出买手订货日历、门店节气排期、蒸馏小工具「节气订货日历」与预注册检验方案。书中以标注框区分已发表的证据、可运行的 Python 计算(18 段程序)、原典与作者的假说。
数据口径:书中参数为示意;全部计算由书中程序生成;本书是非个人化经营建议,订货日期只是演示,不对任何商家承诺销量。 第四章说明「哪天最热」是一个被天气噪声主导的统计量:示意数据中单日最高温的定位误差为 16.81 天,而三年逐日数据的谐波相位误差只有 1.25 天。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| Solar-Term Order Calendar 2026 (illustrative, lag 32.5 d) | |||||||
| Xiazhi 06-21 16:24 | Dongzhi 12-22 04:54 | peak 26-07-24 | trough 27-01-23 | ||||
| fu: chufu 07-15 | zhongfu 07-25 | mofu 08-14 | out 08-24 | (40 d) | |||
| category | lead | starts | days | order by | near term | named | shift |
| iced drinks | 21 | 26-06-03 | 102 | 26-05-06 | Lixia+0 | 26-04-03 | +32.5 |
| fans | 45 | 26-06-18 | 71 | 26-04-27 | Guyu+7 | 26-03-26 | +32.5 |
| sunscreen | 30 | 26-04-21 | 122 | 26-03-15 | Chunfen-5 | 26-03-15 | +0.0 |
| hot pot | 21 | 26-12-02 | 102 | 26-11-04 | Lidong-3 | 26-10-03 | +32.5 |
| down coats | 90 | 26-12-15 | 76 | 26-09-09 | Bailu+2 | 26-08-08 | +32.5 |
| spring jackets | 60 | 26-02-22 | 119 | 25-12-17 | Dongzhi-5 | 25-11-14 | +32.5 |
| same calendar with a maritime lag of 44.0 d: iced drinks order by 26-05-17 |
查看完整验算程序
# Chapter 8. p81: the solar-term order calendar (core of tool.py)
# Functions copied unchanged from distill/tool.py. For 2026: the
# terms (p21 formula, Beijing time), heat peak and cold trough
# (solstice plus a 32.5-day lag, Trenberth 1983), the fu periods
# (p31 geng-day rule) and, per category, the half-peak selling window
# of p53, the latest order date (window start minus a 7-day shelf
# buffer minus the supplier lead time) and the date a buyer reaches
# by reading the season off the term names (lag 0). Thresholds and
# lead times are ILLUSTRATIVE: heat-driven iced drinks (18 C, lead
# 21 d) and fans (24 C, 45 d), sun-driven sunscreen (30 d), cold-
# driven hot pot (10 C, 21 d) and down coats (5 C, 90 d), and spring
# jackets driven by the warming rate (60 d). Temperature: mean 14.0,
# amplitude 14.0, day-to-day sd 3.0 C. "near term" names the closest
# term and the days from it; "shift" is order date minus named date.
# Tool examples in the chapter: --lag 41.3 (the coastal site of p33),
# --mean 16.5 --amp 11.0 --sd 2.5 (a milder, damper city).
import datetime
import math
YEAR = 365.2422
W = 2 * math.pi / YEAR
J2000 = datetime.datetime(2000, 1, 1, 12)
BJ = datetime.timedelta(hours=8)
NAMES = ["Chunfen", "Qingming", "Guyu", "Lixia", "Xiaoman", "Mangzhong",
"Xiazhi", "Xiaoshu", "Dashu", "Liqiu", "Chushu", "Bailu",
"Qiufen", "Hanlu", "Shuangjiang", "Lidong", "Xiaoxue", "Daxue",
"Dongzhi", "Xiaohan", "Dahan", "Lichun", "Yushui", "Jingzhe"]
# name, driver, threshold C, first scan day after Xiazhi, lead days
CATS = [("iced drinks", "heat", 18.0, -120, 21),
("fans", "heat", 24.0, -120, 45),
("sunscreen", "sun", 0.0, -120, 30),
("hot pot", "cold", 10.0, 60, 21),
("down coats", "cold", 5.0, 60, 90),
("spring jackets", "rise", 0.0, -300, 60)]
def sun_lon(t):
n = (t - J2000).total_seconds() / 86400
big_l = (280.460 + 0.9856474 * n) % 360
g = math.radians((357.528 + 0.9856003 * n) % 360)
return (big_l + 1.915 * math.sin(g) + 0.020 * math.sin(2 * g)) % 360
def crossing(year, target):
"""Beijing datetime when the Sun's longitude reaches target."""
def gap(x):
return (sun_lon(x) - target + 180) % 360 - 180
t = datetime.datetime(year, 1, 1) - BJ
day = datetime.timedelta(days=1)
while not (gap(t) < 0 <= gap(t + day)):
t += day
lo, hi = t, t + day
while (hi - lo).total_seconds() > 1:
mid = lo + (hi - lo) / 2
if gap(mid) < 0:
lo = mid
else:
hi = mid
return hi + BJ
def terms(year):
out = [(crossing(year, 15 * k), k) for k in range(24)]
return sorted(out)
def cycle(d):
return (d.toordinal() + 1721425 + 49) % 60
def geng_from(d, k):
seen = 0
while True:
if cycle(d) % 10 == 6:
seen += 1
if seen == k:
return d
d += datetime.timedelta(days=1)
def fu_dates(year):
xz = crossing(year, 90).date()
lq = crossing(year, 135).date()
c1, c2, c3 = geng_from(xz, 3), geng_from(xz, 4), geng_from(lq, 1)
out = c3 + datetime.timedelta(days=10)
return c1, c2, c3, out, (out - c1).days
def phi(z):
return math.exp(-0.5 * z * z) / math.sqrt(2 * math.pi)
def cdf(z):
return 0.5 * (1 + math.erf(z / math.sqrt(2)))
def pos_part(mu, s):
return mu * cdf(mu / s) + s * phi(mu / s)
def excess(driver, c, d, lag, mean, amp, sd):
m = mean + amp * math.cos(W * (d - lag))
if driver == "heat":
return pos_part(m - c, sd)
if driver == "cold":
return pos_part(c - m, sd)
if driver == "sun":
return max(0.0, math.cos(W * d))
return max(0.0, -amp * W * math.sin(W * (d - lag)))
def window(driver, c, first, lag, mean, amp, sd):
grid = [first + 0.25 * i for i in range(4 * 300)]
vals = [excess(driver, c, d, lag, mean, amp, sd) for d in grid]
k = max(range(len(grid)), key=lambda i: vals[i])
lo = hi = k
while lo > 0 and vals[lo - 1] >= vals[k] / 2:
lo -= 1
while hi < len(grid) - 1 and vals[hi + 1] >= vals[k] / 2:
hi += 1
return grid[k], grid[lo], grid[hi]
def nearest(t, table):
best = min(table, key=lambda x: abs((t - x[0]).total_seconds()))
days = int(round((t - best[0]).total_seconds() / 86400))
return "{}{:+d}".format(NAMES[best[1]], days)
def calendar(year=2026, lag=32.5, mean=14.0, amp=14.0, sd=3.0,
buffer=7, leads=None):
leads = dict(leads or {})
xz = crossing(year, 90)
dz = crossing(year, 270)
table = terms(year - 1) + terms(year) + terms(year + 1)
rows = []
for name, driver, c, first, lead in CATS:
lead = leads.get(name, lead)
pk, a, b = window(driver, c, first, lag, mean, amp, sd)
_, a0, _ = window(driver, c, first, 0.0, mean, amp, sd)
start = xz + datetime.timedelta(days=a)
order = start - datetime.timedelta(days=buffer + lead)
named = xz + datetime.timedelta(days=a0 - buffer - lead)
rows.append({"category": name, "driver": driver, "lead": lead,
"start": start, "end": xz + datetime.timedelta(
days=b), "order_by": order, "named": named,
"shift": (order - named).total_seconds() / 86400,
"term": order})
return {"year": year, "lag": lag, "xz": xz, "dz": dz,
"heat_peak": xz + datetime.timedelta(days=lag),
"cold_trough": dz + datetime.timedelta(days=lag),
"fu": fu_dates(year), "rows": rows, "table": table,
"terms": terms(year)}
def lines(cal):
f = "%y-%m-%d"
out = ["Solar-Term Order Calendar {} (illustrative, lag {:.1f} d)"
.format(cal["year"], cal["lag"])]
out.append("Xiazhi {} Dongzhi {} peak {} trough {}".format(
cal["xz"].strftime("%m-%d %H:%M"), cal["dz"].strftime("%m-%d %H:%M"),
cal["heat_peak"].strftime(f), cal["cold_trough"].strftime(f)))
c1, c2, c3, end, n = cal["fu"]
out.append("fu: chufu {} zhongfu {} mofu {} out {} ({} d)".format(
c1.strftime("%m-%d"), c2.strftime("%m-%d"),
c3.strftime("%m-%d"), end.strftime("%m-%d"), n))
out.append("category lead starts days order by "
"near term named shift")
for r in cal["rows"]:
days = (r["end"] - r["start"]).total_seconds() / 86400
out.append("{:<15} {:4d} {} {:4.0f} {} {:<12} {} {:+5.1f}"
.format(r["category"], r["lead"],
r["start"].strftime(f), days,
r["order_by"].strftime(f),
nearest(r["order_by"], cal["table"]),
r["named"].strftime(f), r["shift"]))
return out
if __name__ == "__main__":
for ln in lines(calendar()):
print(ln)
late = calendar(lag=44.0)
print("same calendar with a maritime lag of 44.0 d: iced drinks order"
" by {}".format(late["rows"][0]["order_by"].strftime("%y-%m-%d")))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《二十四节气气温滞后相位、三伏一阶热惯性与季节性消费需求预测母典》第 8 章「实证闭环:节气订货日历、门店排期与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-232 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026232,
author = {Fan, Yafu},
title = {Temperature Phase Lag across the Twenty-Four Solar Terms, First-Order Thermal Inertia behind the Dog Days and Seasonal Demand Forecasting},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}