Cumulative NH-NL Pine ta.cum / SMA50 / z-score fidelity re-audit
Rejected qm-kdnj.4 · 2026-08-18
Does the Pine-default Total Stock Market cumulative NH-NL z50 regime reproduce the authoritative dates, how far did the prior SMA50(raw)<0 experiment drift, and does the corrected risk-off state improve a causal SPY long/cash overlay on the maximal native span?
Pine semantics are frozen and fixture-exact. On 5,391 finite native dates (2005-03-15 through 2026-08-17), the corrected regime is risk-off on 1,812 days (33.61%) with 28 entries. Holding inputs fixed, prior SMA50(raw)<0 differs on 401 days (7.44%); the actual HIGN/LOWN legacy differs on 711 of 5,359 common days (13.27%). Corrected risk-off days precede deeper 21-day mean drawdowns (-3.79% vs -2.02%), but the causal SPY/cash overlay returns 7.11% CAGR and 4.334 final equity, below the same-input prior (7.76%, 4.937), actual legacy (8.68%, 5.915), and B&H (10.90%, 9.110). Fidelity is fixed; promotion is rejected without retuning.
Provenance
Research narrative
Source-of-truth rule
TradingView Pine default: indexData=INDEX:MAHX-INDEX:MALX; cumulativeIndex=ta.cum(indexData); movingAverage=ta.sma(cumulativeIndex,50); zs=(cumulativeIndex-movingAverage)/ta.stdev(cumulativeIndex,50); sell=zs<0. The 50-bar standard deviation is population ddof=0, the current bar is included, and execution occurs on the next tradable close.
What changed
The prior experiment tested SMA50 of raw daily breadth below zero. The corrected rule tests whether the cumulative breadth line is below its own 50-day mean, normalized by its 50-day population standard deviation. The same-input audit attributes 401 mismatches to that formula change; comparing the actual legacy HIGN/LOWN implementation raises drift to 711 dates.
What the market evidence says
Corrected risk-off states identify substantially deeper subsequent drawdowns and protect the GFC and 2022 windows, but they do not improve full-window return, Sharpe, Sortino, or closest-comparator drawdown. Falsification and adjacent settings show the state is not noise, yet genuine defensive information is insufficient for promotion when incremental portfolio utility fails.
Decision
Reject promotion and retain the experiment. Fidelity outranks performance, so the result is published exactly as Pine defines it and no threshold, index family, or lookback is tuned to rescue the economics.
Generic-exit contract: Not applicable: this is a persistent two-state buy/sell regime, not a one-way buy-only or sell-only signal.
Corrected Pine regime equity vs SPY
Aligned window, both rebased to 1.0 at start — Real monthly engine equity, next-close with 10 bps one-way costs · S&P dashed, experiment solid. X = Date, Y = Equity (rebased to 1.0).
Signal driver & thresholds (x-aligned)
Prior versus corrected dates
| Comparison | Corrected active | Mismatch % | Mismatches | Prior active | Rows |
|---|---|---|---|---|---|
| Same input: SMA50(raw) vs cumulative-z50 | 33.61% | 7.44% | 401 | 34.48% | 5391 |
| Actual legacy HIGN/LOWN vs corrected default | 33.74% | 13.27% | 711 | 22.63% | 5359 |
Same-input comparison isolates formula drift; actual legacy also changes the breadth family.
Strategy-parity performance comparison
| CAGR | Final equity | Max drawdown | Rule | Sharpe | Sortino |
|---|---|---|---|---|---|
| 7.11% | 4.334 | -17.89% | Corrected Pine cumulative-z50 | 0.710 | 0.717 |
| 7.76% | 4.937 | -15.70% | Prior SMA50(raw), same MAHX-MALX | 0.754 | 0.765 |
| 8.68% | 5.915 | -21.82% | Actual legacy HIGN-LOWN SMA50(raw) | 0.745 | 0.806 |
| 10.90% | 9.110 | -55.19% | SPY buy-and-hold | 0.641 | 0.783 |
Same window, costs, and one-bar execution lag.
Frozen robustness checks
| Check | Result |
|---|---|
| Extra execution lag | +8.21% final equity vs corrected; not destroyed |
| Adjacent windows 40/45/50/55/60 | 96.8%-98.5% state agreement; 6.69%-7.60% CAGR |
| Adjacent z thresholds -0.25/0/+0.25 | 98.1%-98.4% agreement; 6.75%-7.71% CAGR |
| Circular 252-bar falsification | 4.95% CAGR / 0.388 Sharpe vs true 7.11% / 0.710 |
| Inverted-state falsification | 3.27% CAGR / 0.282 Sharpe |
| Alternative Pine index choices | 79.0%-95.5% state agreement; default retained |
No row is a retuning candidate; Pine length 50 and threshold zero remain authoritative.
Stats
| CAGR | 7.11% | Sharpe | 71.03% |
|---|---|---|---|
| Sortino | 71.73% | maxDD | -17.89% |
Disposition
Rejected for risk-off-indicators/v1 and strategy promotion. The exact Pine regime is reproducible and has defensive timing information, but it provides no incremental return or downside advantage over the closest same-input prior. Publish the negative, corrected result as a qm-kdnj experiment; do not alter the risk-indicator registry or catalog.
Follow-on work
- No explicit follow-on; file new issue if needed
Errors & data gaps
TradingView daily closes are a pinned current snapshot, not a historical vintage archive. SPY ends 2026-07-24, so signal-date fidelity extends through 2026-08-17 while equity and outcome comparisons stop at 2026-07-24. The legacy comparator changes both index family and formula; the same-input formula comparator isolates SMA50(raw) versus cumulative-z drift. No synthetic pre-2005 extension or threshold retuning is included. The signal is a continuous two-state regime, not a one-way impulse, so the qm-kdnj generic-opposite exit harness is not applicable. Risk-off states predict materially deeper forward drawdowns but only modestly lower mean forward returns; the claim is defensive timing, not negative expected return. The page publishes derived z-scores, states, metrics, and metadata only; it does not redistribute raw TradingView observations.
Follow-up
gh issue create --title "Follow-up Cumulative NH-NL Pine tacum SMA50 z-score fidelity re-audi" --body "Follow-up to qm-kdnj.4: Does the Pine-default Total Stock Market cumulative NH-NL z50 regime reproduce t" --label "priority:p2" --label "pipeline:research" --label "agent:ready"# deep-link