Method
Rule / pseudocode
_A backtest only has evidence inside the feature range it sampled. When live realized vol exceeds anything seen in-sample, the strategy is operating out-of-support and its expected edge is unknown; going flat in those regimes is a principled, look-ahead-free risk control rather than a fitted threshold._
Out-of-sample equity curve
Out-of-sample performance
Hypothesis
Flattening a SPY 252-day time-series-momentum rule whenever 20-day realized volatility exceeds the maximum volatility seen in the in-sample training window (an out-of-support regime) avoids the worst out-of-sample drawdowns without sacrificing most of the trend premium.
Method
Instrument: SPY
Results
Out-of-sample Sharpe was 1.02, versus 0.41 in-sample. A bootstrap test returned p = 0.007 (statistically significant). Walk-forward Sharpe stayed positive in 5 of 5 folds. Worst out-of-sample drawdown was -22.71%.
Analysis
Full SPY history downloaded via yfinance from 2005-01-01 to 2026-06-01. After the 252-day warm-up period, effective data runs from 3 January 2006 to 29 May 2026. A 70/30 row-count split yields an in-sample window of 3,593 days (January 2006 to 13 April 2020) and an out-of-sample window of 1,540 days (14 April 2020 to 29 May 2026). The signal is: long SPY if the trailing 252-day return is positive AND the current 20-day annualised realised volatility does not exceed the IS maximum; else flat. Execution uses the prior day’s signal to avoid look-ahead. Costs are 10 bps round-trip applied on each position change. The significance test uses the corrected block-bootstrap helper (block length 5, returns demeaned to enforce a true zero-edge null), resolving the prior bug where resampling raw positive-mean returns always returned p ≈ 0.5.
The IS period produced an honest Sharpe of 0.407 (annualised return 5.57%, max drawdown −26.74%), while the OOS period yielded a Sharpe of 1.019 (annualised return 14.32%, total return 126.5%, max drawdown −22.71%). The near-doubling of Sharpe from IS to OOS is not evidence of generalisation; it reflects the structural character of the OOS window. The OOS period opens immediately after the COVID crash low (April 2020) and benefits fully from the subsequent bull market, while also capturing the 2022 bear market during which the 252-day momentum rule correctly went flat. That sequence — step aside in 2022, re-enter for 2023–2025 — is the dominant source of OOS alpha, not the vol gate.
Five walk-forward folds produced individual Sharpes of [0.23, 2.40, 1.50, 0.90, 1.06], a combined WF Sharpe of 1.193, and 100 per cent of folds positive (up from 80% in the prior run). The wide dispersion across folds (0.23 to 2.40) reflects momentum’s well-known regime dependence rather than a stable alpha source. All five folds draw from the same 2006–2026 dataset, which contains correlated macro structures; true out-of-universe robustness cannot be assessed from this evidence alone.
The corrected block-bootstrap p-value is 0.007 (observed Sharpe 1.023, null 90% CI [−0.61, 0.69], 1,000 simulations). This is a dramatic reversal from the prior buggy p = 0.502 and confirms the OOS Sharpe is statistically distinguishable from noise under the zero-edge null. Critically, however, this test is on the gated strategy returns, which are identical to the base 252-day momentum returns: the IS maximum 20-day annualised volatility is 95.92%, driven by the COVID spike of March 2020 falling inside the IS window. The gate fired on exactly 0 of 1,540 OOS days. The gated and ungated strategies produce precisely the same OOS Sharpe (1.019). The gate is categorically overfit to include the worst crisis regime in history, ensuring it will be silent in any plausible subsequent period.
The verdict is INCONCLUSIVE. The specific hypothesis — that the out-of-support vol gate avoids the worst OOS drawdowns — is definitively falsified: the gate was never active, so it could not have prevented any drawdown. The strong OOS metrics are attributable to a particularly favourable window for 252-day momentum, not to the gate design. The IS Sharpe (0.407) being less than half the OOS Sharpe (1.019) is a window-dependence flag rather than a green light. The underlying 252-day time-series momentum rule on SPY does appear to have real statistical edge (p = 0.007) in this data, but that deserves its own cleanly specified experiment with a balanced OOS window — not a verdict on this gate design.
Provenance
Synthesized from 1u3q7ko, 1tjgscr. The decay thread distinguishes 'edge decayed' from 'regime exit' (live inputs walk outside the support the backtest covered); the drawdown thread shows slow grinding drawdowns do the real damage. Combining them: gate a base trend rule on whether the CURRENT input feature is inside the in-sample range, rather than reacting to realized PnL. This is a distribution-shift (out-of-support) gate, mechanistically distinct from PnL-based kill-switches and from continuous vol-scaling.
Evidence
Walk-forward Sharpe by fold
---
_Generated by labs-algo-trading. Automated research — not financial advice. Backtests overfit; treat verdicts as hypotheses._