What does Moving Festivals and Promotion Calendars conclude, in numbers, about “Festival-Aligned Comparisons: an Event-Time Map, the Split of Ramadan and the Cost of Date Errors”?

Answer: Chapter 6 builds a festival-aligned monthly comparison that cuts the mean absolute error over the year from 0.054 to 0.017.

Scope of the numbers: Sales series and lead times are illustrative; all calculations are generated by the book's programs. Every festival date follows the official announcement; the book treats the religious and cultural meaning of each festival with respect, passes no judgment on it, and is general analysis, not individualised business advice.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.017, 0.054

true growth +0.040; monthsame-date YoYaligned YoY
Jan+0.157+0.044
Feb-0.089+0.055
Mar+0.164+0.040
Apr-0.096+0.071
May+0.055+0.048
Jun+0.049+0.056
Jul+0.050+0.047
Aug+0.066+0.066
Sep+0.057+0.075
Oct+0.086+0.070
Nov+0.064+0.057
Dec+0.039+0.050
mean abs error: same-date 0.054, aligned 0.017
worst month:same-date 0.136, aligned 0.035
Show the full program
# Chapter 6. p61: a festival-aligned calendar map for monthly YoY.
# Model (illustrative): a shop serving all three communities. Daily
# sales = 1000 x (1 + G) per year x weekday factor x (1 + sum of
# weight x (lift - 1)) x lognormal noise (sigma 0.08, fixed seed),
# with the lift profile of p21 around each festival and weights
# CNY 0.5, Aidilfitri 0.6, Deepavali 0.3. Dates: the official 2024
# and 2025 dates. Aligned map: a day within -28..+6 of a festival is
# paired with the same event day last year; any other day is paired
# with the day 364 days earlier (same weekday).
import math
import random
from datetime import date, timedelta

G, SIG, LO, HI = 0.04, 0.08, -28, 6
WEEK = [1.0, 0.95, 0.95, 1.0, 1.1, 1.25, 1.2]
FEST = {"CNY": (0.5, {2024: date(2024, 2, 10), 2025: date(2025, 1, 29)}),
        "RAYA": (0.6, {2024: date(2024, 4, 10), 2025: date(2025, 3, 31)}),
        "DEEP": (0.3, {2024: date(2024, 10, 31),
                       2025: date(2025, 10, 20)})}
MON = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split()


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 sales(rng):
    s, d = {}, date(2023, 12, 1)
    while d <= date(2025, 12, 31):
        x = [1.0] + [w * (lift((d - t.get(d.year, t[2024])).days) - 1)
                     for w, t in FEST.values()]
        v = 1000.0 * (1 + G) ** (d.year - 2024) * WEEK[d.weekday()]
        s[d] = v * math.fsum(x) * math.exp(rng.gauss(0.0, SIG))
        d += timedelta(days=1)
    return s


def partner(d, fests):
    best = None
    for name, (w, t) in fests.items():
        k = (d - t[d.year]).days
        if LO <= k <= HI and (best is None or abs(k) < abs(best[1])):
            best = (name, k)
    if best is None:
        return d - timedelta(days=364)
    return fests[best[0]][1][d.year - 1] + timedelta(days=best[1])


if __name__ == "__main__":
    s = sales(random.Random(20261113))
    print("true growth {:+.3f}; month  same-date YoY  aligned YoY".format(G))
    en, ea = [], []
    for m in range(1, 13):
        days = [d for d in s if d.year == 2025 and d.month == m]
        cur = math.fsum(s[d] for d in days)
        old = math.fsum(s[d] for d in s if d.year == 2024 and d.month == m)
        ali = math.fsum(s[partner(d, FEST)] for d in days)
        en.append(abs(cur / old - 1 - G))
        ea.append(abs(cur / ali - 1 - G))
        print("                  {}   {:+.3f}        {:+.3f}".format(
            MON[m - 1], cur / old - 1, cur / ali - 1))
    print("mean abs error: same-date {:.3f}, aligned {:.3f}".format(
        math.fsum(en) / 12, math.fsum(ea) / 12))
    print("worst month:    same-date {:.3f}, aligned {:.3f}".format(
        max(en), max(ea)))

Single source and citation

Fan, Y. (2026). Moving Festival Calendars in Multicultural Malaysia: Overlaps of Hari Raya, Chinese New Year and Deepavali and the Alignment of Promotional Schedules (Version 1.0.0), Chapter 6: Festival-Aligned Comparisons: an Event-Time Map, the Split of Ramadan and the Cost of Date Errors. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 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}
}

Other chapter answers in this book