5D Library › Two-Scale Renormalization, Occupancy Entropy and Thrust-Wave Superposition in Discrete Cyclical Networks · 中文

Chapter 8 Practice and a Pre-Registered Test: A Four-Step Checklist and a Blind Permutation Backtest

Note

This chapter is not investment advice and offers no trading method. The checklist example is a fictional “Mr. Lin” and his shop; all names, numbers and data are invented or synthesised by the programs. The test in Part 2 serves to judge whether a statistical hypothesis holds; whatever its result, it does not imply that any asset can be bought or sold on that basis, nor that any divinatory inference is valid. Real market trading can lose all of the capital committed, and with leverage or derivatives losses can exceed it.

Part 1 A four-step checklist

The first seven chapters can be condensed into four questions. When someone says that “a certain calendar label is related to a certain outcome”, ask in turn:

  1. One prediction, one outcome. Before new data are seen, has the claim been written as a prediction that yields a number, with a single primary outcome (Chapter 6)?
  2. Chance baseline. If label and outcome were unrelated, how common would such a “coincidence” be (the Barnum effect and chance expectation, Chapter 6)?
  3. Count the forks. How many labels, outcomes and time windows could have been tried in all? What survives correction (multiple testing and data snooping, Chapter 6)?
  4. Blind test. On new data, analysed by someone who does not know what the labels mean, with a permutation test and decision rule written in advance, what is the result (Part 2 of this chapter)?

Calculation

The checklist applied to the fictional Mr. Lin. Mr. Lin says that of the 24 best months of his shop’s takings over the past 24 years, 5 were “opposition months” (month branch = year branch + 6), so opposition months are good for his business. Step 2 computes: if months were unrelated to takings, the number of opposition months among the 24 best would follow a binomial distribution (each month being an opposition month with probability 1/12). Step 3 estimates the forks he may have tried: 12 differences “month branch − year branch” × 3 outcomes (best months, worst months, averages) × 2 time windows (all years, recent years) = 72. Step 4 runs a within-year stratified permutation test on the next 12 years of new data (synthesised by the program, with no calendar effect).

Calculation

# The four-step checklist applied to a FICTIONAL claim (all names and numbers invented).
# "Mr. Lin" says his shop's best months fall in opposition months (month branch = year
# branch + 6): of the 24 best months in the past 24 years, 5 were opposition months.
import math, random
from math import comb
rng = random.Random(37)

# Step 1: ONE prediction, written down before new data are seen: in the next 12 years,
# opposition months have higher log sales than the other 11 months of the same year;
# one-sided alpha 0.025; the shop's records are coded by someone who does not know it.
print("step 1: one outcome (within-year contrast of log sales), one-sided alpha 0.025")
# Step 2: chance baseline for the anecdote. If months were unrelated to sales, each of the
# 24 best months would be an opposition month with probability 1/12.
p_tail = sum(comb(24, k) * (1 / 12) ** k * (11 / 12) ** (24 - k) for k in range(5, 25))
print(f"step 2: expected opposition months among 24 best: {24 / 12:.0f};"
      f" P(5 or more by chance) = {p_tail:.3f}")
# Step 3: how many patterns could have produced an equally striking story? 12 offsets x 3
# outcomes (best, worst, average months) x 2 windows (all years, recent years) = 72.
forks = 72
print(f"step 3: {forks} forks -> Bonferroni-adjusted p = {min(1.0, forks * p_tail):.2f};")
print(f"   P(at least one fork this striking) = {1 - (1 - p_tail) ** forks:.2f}"
      " if the forks were independent")
# Step 4: blind test on the NEXT 12 years (synthetic sales with no calendar effect).
Y0 = 6
logs = [math.log(100) + rng.gauss(0, 0.15) for _ in range(144)]
c = [[12 / 11 * (logs[12 * j + m] - sum(logs[12 * j:12 * j + 12]) / 12)
      for m in range(12)] for j in range(12)]
sel = [next(m for m in range(12) if ((m + 2) - (j + Y0)) % 12 == 6) for j in range(12)]
d0 = sum(c[j][sel[j]] for j in range(12)) / 12
null = [sum(c[j][rng.randrange(12)] for j in range(12)) / 12 for _ in range(9999)]
p = (1 + sum(d >= d0 for d in null)) / 10000
print(f"step 4: contrast {d0:+.3f} (ratio {math.exp(d0):.2f}), one-sided permutation"
      f" p = {p:.3f} -> {'supported' if p <= 0.025 else 'not supported'}")
# step 1: one outcome (within-year contrast of log sales), one-sided alpha 0.025
# step 2: expected opposition months among 24 best: 2; P(5 or more by chance) = 0.045
# step 3: 72 forks -> Bonferroni-adjusted p = 1.00;
#    P(at least one fork this striking) = 0.96 if the forks were independent
# step 4: contrast -0.032 (ratio 0.97), one-sided permutation p = 0.764 -> not supported

Step 1 rewrites Mr. Lin’s claim as a prediction: over the next 12 years, log takings in opposition months exceed those in the other months of the same year, one-sided α=0.025\alpha = 0.025. Step 2: by chance one expects 2 opposition months among the 24 best, and 5 or more occur with probability 0.045, “significant” on its own. Step 3: if he reported only the most striking of 72 forks, the Bonferroni-adjusted pp value is 1.00; if the forks were independent, the probability that at least one of 72 is as striking is 0.96. Step 4: on the new data the within-year contrast for opposition months is −0.032 (ratio 0.97), with permutation p=0.764p = 0.764: not supported. The fictional example shows that a story “significant on its own” provides almost no evidence once the forks are counted, and that a blind test on new data is the way to judge it.

Part 2 A pre-registered blind permutation backtest

Chapter 8 of the author’s framework proposes a “double-blind, de-labelled backtest on historical time series”. It is written below as a protocol with a single predicted quantity and a single primary outcome. No randomised trial in people is designed, because the book’s models concern counting structures and allocations, and the claim in the author’s framework closest to a testable prediction concerns calendar labels and historical time series. In line with the method of volume 33, the protocol has only one primary outcome and states its power.

The question and the single predicted quantity

In the excess returns of the US stock market as a whole, cumulated over solar-term months, is the typical size of moves in “opposition months” (month branch = year branch + 6) larger than in the other solar-term months of the same year?

Hypothesis · not established

The author’s hypothesis as operationalised for testing (not yet established; to be confirmed by the author before registration). Treat the year branch as the “occupied” node of the ring and the month opposite it as the “coupled” node; in Chapter 3 the flux of a half-empty antipodal pair is amplified by 1+c=1.51 + c = 1.5. On this basis the model’s single predicted quantity is the ratio RR between the typical size of moves (the geometric mean, measured by log absolute returns) in the opposition month and in the other months of the same year; the hypothesis predicts R>1R > 1, and the model’s own R=1.5R = 1.5 is the smallest effect of interest. This operationalisation is a choice made by the book for testing; the author’s framework does not specify it, and any other operationalisation must be registered separately and cannot be substituted after the results are seen. If the test concludes that “an effect of 1.5 times or more is excluded” or “smaller in opposition months, against the prediction”, the hypothesis under this operationalisation is refuted.

Design

Element Specification
Design Blind permutation test on public historical data; protocol, calendar mapping and analysis code registered in advance on a public registry
Data set Daily excess and risk-free returns of the US stock market as a whole (Mkt−RF and RF in “Fama/French 3 Factors [Daily]”, whose daily series begins on 1 July 1926 (French, n.d.); for the construction of the factors see (Fama and French 1993)) in Kenneth French’s data library; the version downloaded on the day of registration is archived and its checksum published
Period From the start of spring 1930 to the start of spring 2026: 96 complete stem-and-branch years (geng-wu to yi-si), 1,152 solar-term months; 96 years is exactly eight twelve-year cycles, so each solar-term month (yin to chou) is an opposition month exactly 8 times
Calendar mapping The year boundary is the moment of the start of spring (apparent solar longitude 315°); the month boundaries are the moments of the twelve jie terms (start of spring, waking of insects, clear and bright, start of summer, grain in ear, minor heat, start of autumn, white dew, cold dew, start of winter, major snow, minor cold: longitude 315° and every 30° from it), recorded in UTC (Beijing time = UTC + 8 h); the return of trading day dd (New York date) is assigned to the solar-term month containing “21:00 UTC on day dd” (a fixed cut-off, 05:00 next day Beijing time, never earlier than the New York close in any year: the present 16:00 close is 21:00 UTC in winter and 20:00 UTC in summer, and earlier closes were earlier still); the mapping table is checked by an independent calendar auditor against published observatory times and recomputed independently with the program below
Solar-term month return Excess return of each solar-term month r=∏d(1+Rm,d)−∏d(1+Rf,d)r = \prod_d (1 + R_{m,d}) – \prod_d (1 + R_{f,d}) over all its trading days, with Rm,d=(Mkt−RF)d+RFdR_{m,d} = (\text{Mkt−RF})_d + \text{RF}_d and Rf,d=RFdR_{f,d} = \text{RF}_d; if |r|<0.005%|r| < 0.005\,\% it is set to 0.005%0.005\,\%
Label Opposition month: month branch ≡\equiv year branch +6(mod⁡12)+ 6 \pmod{12}, exactly one per year, 96 in all
Primary outcome Within-year contrast of log absolute returns: for each year cy=1211(log|ropp|−log⁡|r|¯y)c_y = \frac{12}{11}\left(\log|r_{\text{opp}}| – \overline{\log|r|}_y\right), averaged over the 96 years to give DD; R=eDR = e^{D}
Primary test One-sided stratified permutation test: within each year, one month is redrawn at random as the “opposition month”, 9,999 times; p=(1+#{D*≥D})/10,000p = (1 + \#\{D^* \ge D\})/10{,}000; p≤0.025p \le 0.025 means “larger in opposition months”
Interval D±1.96⋅SD(cy)/96D \pm 1.96 \cdot \mathrm{SD}(c_y)/\sqrt{96}, converted to a 95 % confidence interval for RR
Blinding A data manager codes the 12 classes of “month branch − year branch” at random as A to L and passes only the coded classes and returns to the analyst; the analyst computes DD, pp and the interval for all 12 classes with the locked code, and only after the results are publicly time-stamped is it revealed which class is opposition (difference 6)
Secondary and sensitivity analyses Results for all 12 classes (with no effect, about 0.3 classes would be false positives at one-sided 0.025); a circular-shift test (all 143 non-zero shifts); a Beijing-date rule (trading day dd goes to the solar-term month begun by the last jie whose Beijing date is not later than dd); the old approximate mapping (monthly Mkt−RF, with the month branch of the solar-term month containing the 15th day of the calendar month); a subsample without the 1930s. Secondary analyses do not change the primary verdict

There is only one primary outcome. The secondary analyses help to interpret the result but play no part in the primary verdict; all analyses are written into the registered code.

Calendar mapping: exact solar-term moments

The years and months of the stem-and-branch calendar are bounded by solar terms. The year boundary is the start of spring, the moment the Sun’s apparent longitude reaches 315°; the month boundaries are the twelve jie, the moments at 315° and every 30° from it (start of spring 315°, waking of insects 345°, clear and bright 15°, … major snow 255°, minor cold 285°); the twelve “middle” terms between them (rain water, spring equinox and so on) are not month boundaries. The program below computes the apparent solar longitude with the low-accuracy method of chapter 25 of Meeus’s Astronomical Algorithms (the geometric longitude plus approximate corrections for aberration and nutation in longitude; accuracy stated there as about 0.01°) (Meeus 1998), takes the difference ΔT\Delta T between dynamical and universal time from rough published values (about 24 s in 1930 and 69 s in 2026), and finds by bisection the moment the longitude reaches 285°+30°i285° + 30° i, recorded in UTC. It uses only the standard library and is compared term by term with published observatory times: the twelve jie of 2013, 2015 and 2016 from the Hong Kong Observatory (Hong Kong time, UTC + 8) (Hong Kong Observatory, n.d.), and those of 2024 and 2026 from the National Astronomical Observatory of Japan (Japan time, UTC + 9, one hour ahead of Beijing time) (国立天文台 暦計算室, n.d.).

Calculation

# Exact solar-term boundaries for Chapter 8. Apparent solar longitude by the low-accuracy
# method of Meeus (1998, ch. 25; stated accuracy about 0.01 degree); TT = UT + Delta T
# (rough published values); bisection for the moment the longitude reaches 285 + 30 i.
# Times are UTC; Beijing time = UTC + 8 h. Checked against published observatory times.
import math
from bisect import bisect_right
from datetime import datetime, timedelta, timezone
UTC, BJ = timezone.utc, timezone(timedelta(hours=8))
J2000 = datetime(2000, 1, 1, 12, tzinfo=UTC)
DT = [(1930, 24), (1950, 29), (1970, 40), (1990, 57), (2000, 64), (2010, 66),
      (2020, 69), (2030, 69)]                                  # Delta T in seconds

def delta_t(y):
    for (y0, d0), (y1, d1) in zip(DT, DT[1:]):
        if y < y1:
            return d0 + (d1 - d0) * (y - y0) / (y1 - y0)
    return DT[-1][1]

def longitude(t):
    """Apparent geocentric longitude of the Sun (degrees) at the UTC moment t."""
    T = ((t - J2000).total_seconds() + delta_t(t.year)) / 86400 / 36525
    L0 = 280.46646 + 36000.76983 * T + 0.0003032 * T * T
    M = math.radians(357.52911 + 35999.05029 * T - 0.0001537 * T * T)
    C = ((1.914602 - 0.004817 * T - 0.000014 * T * T) * math.sin(M)
         + (0.019993 - 0.000101 * T) * math.sin(2 * M) + 0.000289 * math.sin(3 * M))
    om = math.radians(125.04 - 1934.136 * T)
    return (L0 + C - 0.00569 - 0.00478 * math.sin(om)) % 360   # aberration + nutation

def jie(y, i):
    """UTC moment of the jie term at longitude 285 + 30 i in calendar month i + 1 of y."""
    target = (285 + 30 * i) % 360
    lo = datetime(y, i + 1, 1, tzinfo=UTC); hi = lo + timedelta(days=12)
    while hi - lo > timedelta(seconds=1):
        mid = lo + (hi - lo) / 2
        if (longitude(mid) - target + 180) % 360 < 180: lo = mid
        else: hi = mid
    return lo

# Published times (MMDDhhmm, January to December): HKO (UTC+8), NAOJ (UTC+9).
PUB = {(2013, 8): "01051234 02040013 03051815 04042302 05051618 06052023 "
                  "07070635 08071620 09071916 10081058 11071414 12070709",
       (2015, 8): "01060021 02041158 03060556 04051039 05060353 06060758 "
                  "07071812 08080401 09080700 10082243 11080159 12071853",
       (2016, 8): "01060608 02041746 03051144 04041628 05050942 06051349 "
                  "07070003 08070953 09071251 10080433 11070748 12070041",
       (2024, 9): "01060549 02041727 03051123 04041602 05050910 06051310 "
                  "07062320 08070909 09071211 10080400 11070720 12070017",
       (2026, 9): "01051723 02040502 03052259 04050340 05052049 06060048 "
                  "07071057 08072043 09072341 10081529 11071852 12071153"}

if __name__ == "__main__":
    t = jie(2026, 1).astimezone(BJ)
    print(f"start of spring 2026 (315 deg): {t:%Y-%m-%d %H:%M} Beijing time (UTC+8)")
    err = []
    for (y, tz), s in PUB.items():
        for i, tok in enumerate(s.split()):
            pub = datetime(y, int(tok[:2]), int(tok[2:4]), int(tok[4:6]), int(tok[6:]),
                           tzinfo=timezone(timedelta(hours=tz)))
            err.append((jie(y, i) - pub).total_seconds() / 60)
    print(f"vs {len(err)} published times: error {min(err):+.1f} to {max(err):+.1f} min,"
          f" mean {sum(err) / len(err):+.1f}, mean |error| "
          f"{sum(map(abs, err)) / len(err):.1f}")
    # Boundaries from the start of spring 1930 to the start of spring 2026.
    B = [jie(y, i) for y in range(1930, 2027) for i in range(12)]
    B = B[1:B.index(jie(2026, 1)) + 1]
    days = [(b - a).total_seconds() / 86400 for a, b in zip(B, B[1:])]
    print(f"{len(B)} boundaries, {len(days)} solar-term months, {len(days) // 12} years;"
          f" month length {min(days):.2f} to {max(days):.2f} days")
    bj = [b.astimezone(BJ) for b in B]
    print(f"jie fall on day {min(b.day for b in bj)} to {max(b.day for b in bj)}"
          " of the calendar month (Beijing date)")
    mins = [b.hour * 60 + b.minute + b.second / 60 for b in B]
    near = sum(abs((m - 21 * 60 + 720) % 1440 - 720) < 15 for m in mins)
    split = sum(16 * 60 <= m < 21 * 60 for m in mins)
    print(f"boundaries within 15 min of the 21:00 UTC day cut-off: {near}")
    print(f"boundaries where the Beijing-date rule assigns one day differently: {split}")
    # Old approximation: calendar month -> solar month containing its 15th day.
    same = tot = 0
    for k in range(len(days)):
        y, m = divmod(1930 * 12 + 1 + k, 12)
        d = datetime(y, m + 1, 1, 12, tzinfo=BJ)
        mid = bisect_right(B, d.replace(day=15))
        while d.month == m + 1:
            same += bisect_right(B, d) == mid; tot += 1; d += timedelta(days=1)
    print(f"15th-day rule: {same / tot:.1%} of calendar-month days lie in the same"
          " solar-term month")
# start of spring 2026 (315 deg): 2026-02-04 03:54 Beijing time (UTC+8)
# vs 60 published times: error -13.9 to +0.0 min, mean -6.1, mean |error| 6.1
# 1153 boundaries, 1152 solar-term months, 96 years; month length 29.46 to 31.43 days
# jie fall on day 3 to 9 of the calendar month (Beijing date)
# boundaries within 15 min of the 21:00 UTC day cut-off: 20
# boundaries where the Beijing-date rule assigns one day differently: 241
# 15th-day rule: 80.5% of calendar-month days lie in the same solar-term month

The program puts the start of spring 2026 at 03:54 Beijing time on 4 February; the National Astronomical Observatory of Japan publishes 05:02 Japan time, that is 04:02 Beijing time. Against the 60 published times the program is almost always early: the error lies between −13.9 and +0.0 minutes, 6.1 minutes early on average. The apparent longitude moves about 0.041° an hour, so 0.01° corresponds to about 15 minutes: the error matches the stated accuracy of the formula but is larger than “a few minutes”. The registered mapping table therefore rests on published observatory times (or an ephemeris of equal accuracy), and the program serves only as an independent recomputation and demonstration.

From the start of spring 1930 to that of 2026 there are 1,153 boundary moments and 1,152 solar-term months, from 29.46 to 31.43 days long, and every jie falls on the 3rd to the 9th of its calendar month (Beijing date). Only 20 boundaries lie within 15 minutes of the 21:00 UTC day cut-off, close enough for the program’s error to put a trading day in the wrong month; the auditor must check each of them against the published times. Under the Beijing-date rule, 241 boundaries fall between midnight and 05:00 Beijing time, and the day before the Beijing date of each would move to the preceding solar-term month; the assignment actually changes only when that day is a trading day. This is a pre-specified sensitivity analysis. The last line checks the approximation used in the draft: with the month branch taken from the solar-term month containing the 15th, only 80.5 % of the days of a calendar month actually lie in that solar-term month, which is why daily data cumulated between exact boundary moments are now used.

Power

The data set is fixed: 96 years is 96 years, the 1,152 solar-term months are built from more than twenty thousand trading days, and the sample cannot be enlarged. The question here is therefore not “how much data is needed” but “how large an effect can this fixed data set detect”.

Calculation

# Power of the Chapter 8 test on a FIXED 96 years of solar-term months built from DAILY
# returns. Synthetic daily GARCH(1,1) excess returns (normal or t(5) shocks, illustrative
# values), 21 trading days per solar-term month; every daily return in the opposition
# month is multiplied by R (the volatility process itself is unchanged). Month outcome
# log|month return|; D = mean yearly contrast; one-sided alpha 0.025; R = 1.5 = 1 + c.
import math, random
from statistics import NormalDist, stdev
YEARS, Y0, DAYS = 96, 6, 21
Z = NormalDist().inv_cdf

def history(rng, R=1.0, df=None, a=0.08, b=0.91):
    s2, ys, sq = 1.0, [], math.sqrt
    for T in range(12 * YEARS):
        y, m = divmod(T, 12); k = R if ((m + 2) - (y + Y0)) % 12 == 6 else 1.0
        tot = 0.0
        for _ in range(DAYS):
            z = rng.gauss(0, 1)
            if df:                                   # t(df) shock scaled to variance 1
                z /= sq(2 * rng.gammavariate(df / 2, 1) / (df - 2))
            x = sq(s2) * z; tot += k * x; s2 = (1 - a - b) + a * x * x + b * s2
        ys.append(math.log(abs(tot) + 1e-12))
    return ys

def contrasts(ys):
    c = [[12 / 11 * (ys[12 * j + m] - sum(ys[12 * j:12 * j + 12]) / 12)
          for m in range(12)] for j in range(YEARS)]
    sel = [next(m for m in range(12) if ((m + 2) - (j + Y0)) % 12 == 6)
           for j in range(YEARS)]
    return c, sel

if __name__ == "__main__":
    rng = random.Random(1930)
    for df in (None, 5):
        sds = []
        for _ in range(200):
            c, sel = contrasts(history(rng, df=df))
            sds.append(stdev([c[j][sel[j]] for j in range(YEARS)]))
        sd = sum(sds) / len(sds); se = sd / math.sqrt(YEARS)
        lab = "normal" if df is None else f"t({df})"
        pw = {r: 1 - NormalDist().cdf(Z(0.975) - math.log(r) / se)
              for r in (1.25, 1.5, 1.75)}
        mde = math.exp((Z(0.975) + Z(0.90)) * se)
        yrs = math.ceil(((Z(0.975) + Z(0.90)) * sd / math.log(1.25)) ** 2)
        print(f"{lab} daily shocks: SD of yearly contrast {sd:.2f}, SE of D {se:.3f}")
        print("   power at R = " + ", ".join(f"{r}: {p:.0%}" for r, p in pw.items()))
        print(f"   90 % power needs R >= {mde:.2f}; R = 1.25 would need {yrs} years")
    # Check by simulation with the pre-registered within-year permutation test.
    for R in (1.0, 1.5):
        rej = 0
        for _ in range(600):
            c, sel = contrasts(history(rng, R))
            d0 = sum(c[j][sel[j]] for j in range(YEARS)) / YEARS
            null = [sum(c[j][rng.randrange(12)] for j in range(YEARS)) / YEARS
                    for _ in range(199)]
            rej += (1 + sum(d >= d0 for d in null)) / 200 <= 0.025
        print(f"simulated permutation test (normal daily shocks), R = {R}:"
              f" rejects {rej / 600:.1%}")
# normal daily shocks: SD of yearly contrast 1.20, SE of D 0.122
#    power at R = 1.25: 45%, 1.5: 91%, 1.75: 100%
#    90 % power needs R >= 1.49; R = 1.25 would need 303 years
# t(5) daily shocks: SD of yearly contrast 1.21, SE of D 0.123
#    power at R = 1.25: 44%, 1.5: 91%, 1.75: 100%
#    90 % power needs R >= 1.49; R = 1.25 would need 308 years
# simulated permutation test (normal daily shocks), R = 1.0: rejects 2.3%
# simulated permutation test (normal daily shocks), R = 1.5: rejects 89.8%

The program generates data the way the registered analysis will use them: daily excess returns from a GARCH(1,1) model with volatility clustering (normal and heavy-tailed t(5)t(5) shocks, illustrative parameters, 21 trading days per solar-term month), cumulated over solar-term months; the effect multiplies every daily return in the opposition month by RR and leaves the volatility process itself unchanged. The standard deviation of the within-year contrast is about 1.20 and 1.21, so the standard error of DD is about 0.122 and 0.123. At one-sided α=0.025\alpha = 0.025 the power for R=1.5R = 1.5 is 91 % under both models; for R=1.25R = 1.25 it is only 45 % and 44 %. For 90 % power the true effect must be at least R≈1.49R \approx 1.49; detecting R=1.25R = 1.25 with 90 % power would need 303 to 308 years of data, which no existing stock market has. Simulating the registered stratified permutation test directly, the null is rejected 2.3 % of the time when there is no effect (nominal level 2.5 %) and 89.8 % of the time when R=1.5R = 1.5; the simulation uses only 199 permutations each time, which costs a little power relative to the 9,999 of the real analysis, so “about 90 %” is a conservative statement.

Compared with the monthly design of the book’s draft (approximate mapping by calendar month), the power is slightly lower: the draft’s normal model gave a contrast standard deviation of 1.13, power of 94 % for R=1.5R = 1.5 and a 90 %-power effect of R≈1.45R \approx 1.45 to 1.491.49; now both models give 91 % and need R≈1.49R \approx 1.49. Under these illustrative parameters the volatility level of the daily model changes faster from one solar-term month to the next (its persistence per solar-term month is about 0.9921≈0.810.99^{21} \approx 0.81, against 0.98 in the draft’s monthly model), so the volatility of different solar-term months within a year differs more, and the contrast standard deviation rises to about 1.20; the difference also contains Monte Carlo error. On the other hand, the draft’s power calculation ignored the dilution caused by calendar months overlapping their solar-term months on only about eighty per cent of their days; cumulating between exact boundary moments removes that dilution.

Note

What “90 % power” means. As in volume 33: 90 % is the probability of reaching some “larger in opposition months” conclusion when the true effect equals the smallest effect of interest (R=1.5R = 1.5); in that situation the decision rule reaches its strongest conclusion, “at least 1.5 times”, only about 2.5 % of the time (2.3 % in the simulation below). Reaching the strongest conclusion with good probability requires a true effect clearly larger than 1.5 times.

Decision rule

Calculation

# Decision rule, fixed before any data are opened. R = exp(D); p = one-sided within-year
# permutation p (9,999 draws in the real analysis); CI = D +- 1.96 SD(c) / sqrt(96).
# Gates: > 1 % of trading days missing, blind broken, or mapping audit failed
# -> NOT INTERPRETABLE. Simulations use the daily model of the power program.
import math, random
from statistics import stdev
SESOI = math.log(1.5); YEARS, Y0, DAYS = 96, 6, 21

def verdict(d, lo, hi, p, missing=0.0, blind=True, mapping=True):
    if missing > 0.01: return "NOT INTERPRETABLE: over 1 % of trading days missing"
    if not blind:      return "NOT INTERPRETABLE: the analyst saw the labels"
    if not mapping:    return "NOT INTERPRETABLE: calendar mapping failed its audit"
    if lo >= SESOI:                 v = "at least 1.5x in opposition months"
    elif p <= 0.025 and hi < SESOI: v = "larger in opposition months, but below 1.5x"
    elif p <= 0.025:                v = "larger in opposition months; 1.5x not shown"
    elif hi < 0:                    v = "SMALLER in opposition months (against)"
    elif hi < SESOI:                v = "an effect of 1.5x or more is excluded"
    else:                           v = "unclear: the interval is too wide"
    return v

def show(r, lo, hi, p, **gates):
    v = verdict(math.log(r), math.log(lo), math.log(hi), p, **gates)
    return f"R = {r:.2f} ({lo:.2f} to {hi:.2f}), p = {p:.3f}: {v}"

def simulate(rng, R, a=0.08, b=0.91):
    s2, ys = 1.0, []
    for T in range(12 * YEARS):
        y, m = divmod(T, 12); k = R if ((m + 2) - (y + Y0)) % 12 == 6 else 1.0
        tot = 0.0
        for _ in range(DAYS):
            x = math.sqrt(s2) * rng.gauss(0, 1); tot += k * x
            s2 = (1 - a - b) + a * x * x + b * s2
        ys.append(math.log(abs(tot) + 1e-12))
    c = [[12 / 11 * (ys[12 * j + m] - sum(ys[12 * j:12 * j + 12]) / 12)
          for m in range(12)] for j in range(YEARS)]
    sel = [next(m for m in range(12) if ((m + 2) - (j + Y0)) % 12 == 6)
           for j in range(YEARS)]
    obs = [c[j][sel[j]] for j in range(YEARS)]; d = sum(obs) / YEARS
    half = 1.96 * stdev(obs) / math.sqrt(YEARS)
    null = [sum(c[j][rng.randrange(12)] for j in range(YEARS)) / YEARS
            for _ in range(199)]
    p = (1 + sum(x >= d for x in null)) / 200
    return verdict(d, d - half, d + half, p)

if __name__ == "__main__":
    for case in ((1.03, 0.82, 1.29, 0.40), (1.21, 0.97, 1.51, 0.050),
                 (1.32, 1.06, 1.65, 0.008), (1.12, 1.01, 1.24, 0.020),
                 (1.80, 1.52, 2.13, 0.001), (0.74, 0.60, 0.92, 0.99)):
        print(show(*case))
    print(show(1.60, 1.30, 1.97, 0.001, blind=False))
    rng = random.Random(2025)
    for R in (1.0, 1.5):
        tally = {}
        for _ in range(600):
            v = simulate(rng, R); tally[v] = tally.get(v, 0) + 1
        print(f"true R = {R}: share of 600 simulated backtests")
        for k, n in sorted(tally.items(), key=lambda kv: -kv[1]):
            print(f"   {n / 6:5.1f} %  {k}")
# R = 1.03 (0.82 to 1.29), p = 0.400: an effect of 1.5x or more is excluded
# R = 1.21 (0.97 to 1.51), p = 0.050: unclear: the interval is too wide
# R = 1.32 (1.06 to 1.65), p = 0.008: larger in opposition months; 1.5x not shown
# R = 1.12 (1.01 to 1.24), p = 0.020: larger in opposition months, but below 1.5x
# R = 1.80 (1.52 to 2.13), p = 0.001: at least 1.5x in opposition months
# R = 0.74 (0.60 to 0.92), p = 0.990: SMALLER in opposition months (against)
# R = 1.60 (1.30 to 1.97), p = 0.001: NOT INTERPRETABLE: the analyst saw the labels
# true R = 1.0: share of 600 simulated backtests
#     92.0 %  an effect of 1.5x or more is excluded
#      3.3 %  unclear: the interval is too wide
#      3.0 %  larger in opposition months; 1.5x not shown
#      1.7 %  SMALLER in opposition months (against)
# true R = 1.5: share of 600 simulated backtests
#     85.8 %  larger in opposition months; 1.5x not shown
#      9.3 %  unclear: the interval is too wide
#      2.5 %  an effect of 1.5x or more is excluded
#      2.3 %  at least 1.5x in opposition months

The first seven example results are invented to illustrate each verdict. If more than 1 % of trading days are missing, if the analyst learned the meaning of the labels before submitting the results, or if the calendar mapping fails its audit, the report says “not interpretable” whatever the result. Only if the lower limit of the 95 % confidence interval for RR is at least 1.5 does the report say “at least 1.5 times in opposition months”. If p≤0.025p \le 0.025 but the lower limit is below 1.5, it says “larger in opposition months; 1.5 times not shown”, and if the upper limit is also below 1.5, “larger in opposition months, but below 1.5 times”. If p>0.025p > 0.025 and the upper limit is below 1.5, it says “an effect of 1.5 times or more is excluded”, an informative negative conclusion in the spirit of equivalence testing (Lakens 2017). If the upper limit is below 1, it says “smaller in opposition months, against the prediction”.

The simulations (with the same daily model as the power program) show that if the true R=1R = 1 (no effect), 92.0 % of 600 simulated backtests conclude “an effect of 1.5 times or more is excluded”, 3.0 % wrongly reach a “larger in opposition months” conclusion, 3.3 % are “unclear” and 1.7 % conclude “smaller in opposition months”. If the true R=1.5R = 1.5, 85.8 % conclude “larger in opposition months; 1.5 times not shown” and 2.3 % reach the strongest conclusion, 88.1 % together, consistent with the design power of 90 % within the simulation error of about ±1.3 percentage points for 600 runs and the use of only 199 permutations; another 9.3 % are “unclear” and 2.5 % wrongly exclude an effect of 1.5 times.

What this test cannot show

First, it tests one market, one period and one operationalisation. A negative result does not show that calendar labels are meaningless in every other setting, still less that the mathematics of the first three chapters is wrong (theorems do not depend on data); it shows only that under this operationalisation an effect of the model’s size is absent. Second, a positive result does not show that the model’s mechanism is right, still less that any divinatory inference is valid: it could arise from the 2.5 % chance, from data errors, from mapping errors or from some seasonal structure not yet understood, and it must be replicated, with pre-registration, on other markets and periods. Third, even if moves in opposition months really are larger, their direction is unknown, and after trading costs there may be nothing to exploit; this protocol is not a trading strategy. Fourth, matching trading days to boundary moments depends on a day cut-off fixed in advance (21:00 UTC); each boundary affects the assignment of at most one trading day, 20 boundaries lie within 15 minutes of the cut-off and must be checked one by one against published times, and the result under the Beijing-date rule is reported as a sensitivity analysis. The cut-off coincides with the present New York close in winter but falls after the close in summer and in the early years; if a boundary falls between the day’s close and 21:00 UTC, that day’s already completed return still goes to the new solar-term month, a convention fixed in advance under which the result is reported. The draft approximated solar-term months by calendar months, which overlap on only about eighty per cent of their days and would weaken any real effect; daily data remove this problem, but the daily risk-free return and the trading calendar of the early years (for example the closures of the 1930s) are taken as the database gives them. Fifth, effects smaller than about 1.5 times can be neither confirmed nor excluded by these data. Sixth, the data are public, and the analyst may have seen the return series; blinding protects the meaning of the labels, not the data themselves, which is why the protocol locks the mapping, code and decision rule at registration. Seventh, the stem-and-branch year here begins at the moment of the start of spring, unlike the lunisolar calendar, whose year begins on the first day of the first month (国家质量监督检验检疫总局、国家标准化管理委员会 2017); this is a prior choice that cannot be changed after the results are seen.

Ethics and conflicts of interest

The test uses only public historical market data, involves no human participants and collects no personal information. The protocol, calendar mapping table and analysis code are registered on a public pre-registration platform before the data are downloaded (Nosek et al. 2018). Because the author holds related positions (routine observation positions in US equity index funds or related derivatives) and provides related consulting, the test must be carried out with the pre-registered code by an independent analyst who has no financial relationship with the author and does not know the meaning of the labels; the author takes no part in downloading, coding or analysing the data. All code and results are made public, and the results will be published whether positive or negative.

Disclosure

The author uses the works of 5D Library, including this book, as the methodological basis of his community courses, the 5D Ascension Cards (Dimensional Shift Card Decks) and the Yafu AI knowledge base, and therefore has a commercial interest in the subject of this book. The book promotes no course, card deck or service; the Chapter 8 test is designed to be run and analysed by researchers independent of the author’s business and does not recruit from the author’s community, students or customers; all the code and the study protocol are published openly for anyone to check. The author develops and maintains prior-analysis software tools and quantitative research scripts based on the symbolic system of the sexagenary (ganzhi) calendar, and provides related open-source research and independent consulting services; while writing this book he may have held routine observation positions in US equity index funds (such as SPY) or related derivatives. All models in this book are offered solely for mathematical and historical-statistical discussion; they constitute no investment advice, trading signal or promise of divinatory prediction, and the book recommends no specific trade or asset. The models in the book were proposed by the author; because the author holds related positions and provides related consulting, the Chapter 8 test must be carried out with pre-registered code by an independent analyst who has no financial relationship with the author and does not know what the labels mean, and its results will be published whether positive or negative.

References

Fama, Eugene F., and Kenneth R. French. 1993. “Common Risk Factors in the Returns on Stocks and Bonds.” Journal of Financial Economics 33 (1): 3–56. https://doi.org/10.1016/0304-405X(93)90023-5.
French, Kenneth R. n.d. Data Library: Fama/French 3 Factors [Daily]. Tuck School of Business, Dartmouth College. https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/f-f_factors.html.
Hong Kong Observatory. n.d. Date and Time Information of the 24 Solar Terms in 2013, 2015 and 2016. 香港天文台. https://www.hko.gov.hk/en/gts/astron2016/Solar_Term_2016.htm.
Lakens, Daniël. 2017. “Equivalence Tests: A Practical Primer for t Tests, Correlations, and Meta-Analyses.” Social Psychological and Personality Science 8 (4): 355–62. https://doi.org/10.1177/1948550617697177.
Meeus, Jean. 1998. Astronomical Algorithms. 2nd ed. Willmann-Bell.
Nosek, Brian A., Charles R. Ebersole, Alexander C. DeHaven, and David T. Mellor. 2018. “The Preregistration Revolution.” Proceedings of the National Academy of Sciences 115 (11): 2600–2606. https://doi.org/10.1073/pnas.1708274114.
国家质量监督检验检疫总局、国家标准化管理委员会. 2017. 农历的编算和颁行(GB/T 33661—2017). 中华人民共和国国家标准.
国立天文台 暦計算室. n.d. 暦要項:二十四節気および雑節(令和6年、令和8年). 国立天文台(日本). https://eco.mtk.nao.ac.jp/koyomi/yoko/2026/rekiyou262.html.

Fan, Y. (2026). Two-Scale Renormalization, Occupancy Entropy and Thrust-Wave Superposition in Discrete Cyclical Networks: Algebraic Topology and Monte Carlo Verification on a Twelve-Node Ring Lattice [离散周期网络中的双尺度重整化、占位数分布熵与推力波叠加定理] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23796761 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).