关于「实证闭环:马新台促销排期、移动节庆对齐器与预注册检验」,《马来西亚移动节庆与促销排期》给出的定量结论是什么?

结论:第八章给出马新台三地的促销排期表、蒸馏小工具「移动节庆对齐器」与预注册检验方案,并指出节日提升幅度低于示意模型的约 0.145 倍时命题不成立。书中含 24 段可运行的 Python 程序。

数据口径:书中销售序列与提前天数为示意;全部计算由书中程序生成。 第二章量化同比失真:在一家示意门店中,开斋节从四月移入三月,使三月同日同比为加 0.289、四月为减 0.218,而真实增长只有百分之四;用真实节日日期,十二对比较的平均绝对误差为 0.180。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.145

noise: sd of a monthly YoY with no festival = 0.0203
weight wworst same-date error (Mar, Apr 2025)> 2 sd?
0.000.0031no
0.020.0071no
0.050.0153no
0.100.0288no
0.200.0548yes
0.400.1041yes
0.600.1499yes
1.000.2348yes
threshold weight w* = 0.145
查看完整验算程序
# Chapter 8. p83: below which festival lift does the claim fail?
# Model: the shop of p21 (Aidilfitri only, official 2024 and 2025
# dates, weekday factors), with festival weight w scaling the lift
# profile: daily factor 1 + w x (lift - 1). Without noise we get the
# same-date YoY error of March and April 2025; with noise (sigma
# 0.08, fixed seed, 200 replicate years) we get the spread of a
# monthly YoY when nothing moves. The claim "same-date YoY is badly
# distorted" holds only where the error exceeds twice that spread.
import math
import random
import statistics
from datetime import date, timedelta

G, SIG, REPS = 0.04, 0.08, 200
WEEK = [1.0, 0.95, 0.95, 1.0, 1.1, 1.25, 1.2]
RAYA = {2024: date(2024, 4, 10), 2025: date(2025, 3, 31)}


def lift(k):
    if -21 <= k <= -1:
        return 1.0 + 1.2 * (22 + k) / 21
    if 0 <= k <= 2:
        return 0.35
    if 3 <= k <= 6:
        return 0.8
    return 1.0


def month(y, m, w, rng=None):
    d, out = date(y, m, 1), []
    while d.month == m:
        v = (1 + G) ** (y - 2024) * WEEK[d.weekday()]
        v = v * (1 + w * (lift((d - RAYA[y]).days) - 1))
        if rng is not None:
            v = v * math.exp(rng.gauss(0.0, SIG))
        out.append(v)
        d += timedelta(days=1)
    return math.fsum(out)


def err(w):
    return max(abs(month(2025, m, w) / month(2024, m, w) - 1 - G)
               for m in (3, 4))


if __name__ == "__main__":
    rng = random.Random(20261113)
    yo = [month(2025, 6, 0.0, rng) / month(2024, 6, 0.0, rng) - 1
          for _ in range(REPS)]
    sd = statistics.stdev(yo)
    print("noise: sd of a monthly YoY with no festival = {:.4f}".format(sd))
    print("weight w   worst same-date error (Mar, Apr 2025)   > 2 sd?")
    for w in (0.0, 0.02, 0.05, 0.1, 0.2, 0.4, 0.6, 1.0):
        e = err(w)
        print("{:6.2f}     {:.4f}                                  {}"
              .format(w, e, "yes" if e > 2 * sd else "no"))
    lo, hi = 0.0, 1.0
    for _ in range(40):
        mid = (lo + hi) / 2
        if err(mid) > 2 * sd:
            hi = mid
        else:
            lo = mid
    print("threshold weight w* = {:.3f}".format(hi))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《马来西亚多元节庆移动日历叠加、开斋节农历新年屠妖节浮动日期与促销排期对齐母典》第 8 章「实证闭环:马新台促销排期、移动节庆对齐器与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-313 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026313,
  author    = {Fan, Yafu},
  title     = {Moving Festival Calendars in Multicultural Malaysia: Overlaps of Hari Raya, Chinese New Year and Deepavali and the Alignment of Promotional Schedules},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论