Strategies
Low-Volatility Anomaly on the Select Sector SPDRs: Monthly Hold of the 3 Lowest 252-Day Return-Vol Sector ETFs, Long-Only, Equal-Weight (USEQ 1-DAY, pure OHLCV, 2 parameters)
Outcome: Abandoned
SectorSpdrLowVolBottom3MonthlyLong
Outcome Summary
SectorSpdrLowVolBottom3MonthlyLong adapted the QuantConnect/Quantpedia 'Volatility Effect in Stocks' idea to the 11 Select Sector SPDR ETFs. It held the 3 lowest-volatility sectors each month at about 33% of equity each, with no leverage, shorts or regime gates. The hypothesis flagged the risk of sandbox timeouts, and the code used fixed-size deques with running sums. Even so, after 3 iterations the strategy still ran past the 300s limit in the Layer 3 sandbox backtest and was abandoned in a verification loop. It never produced a backtest, so its economic edge was never measured.
Hypothesis
Implements the hypothesis directly: return-vol (log returns, not price levels), point-in-time eligibility at 252 bars (XLRE/XLC join late), calendar-month rebalance from bar timestamps, equal-weight long-only, gross <= 0.98x equity. Vol kept via O(1) running sum/sumsq per ETF so per-bar cost is independent of span. Iteration 3 fix: the previous submission's code field reached verification as a placeholder string (Layer-1 'invalid decimal literal, line 1'); the full source is now inline in the code field.
verification_loop: sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of XLU.USEQ-1-DAY-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Implementation
Long-only low-volatility anomaly on the 11 Select Sector SPDR ETFs (USEQ daily). On the first aligned session of each calendar month, rank ETFs with >=252 daily log returns by 252-session return volatility and hold the 3 lowest at equal weight (~32.7% of equity each, 1x, whole shares). Names leaving the bottom-3 are sold, joiners bought, continuing names held. No regime or cash gates.
Verification Results
sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of XLU.USEQ-1-DAY-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Iteration History
Verification failed (Layer 1 — static analysis): - Syntax error: invalid decimal literal (<unknown>, line 1) (line 1)
Outcome Summary
The hypothesis already asked for O(1) rolling-window updates, but this 11-leg daily strategy still timed out in the sandbox. Before resubmitting, profile the per-bar cost across all legs, including the custom cross-leg alignment barrier and the per-bar position and order cache checks, rather than only the volatility math.
It was abandoned in a verification loop after 3 iterations. Layer 3 (the sandbox backtest) failed with a sandbox_timeout because the smoke test ran past the 300s wall-clock limit on a ~20,000-bar window (2400 days of XLU.USEQ-1-DAY-LAST-EXTERNAL). Backtest review, optimization, analyst review and risk review never ran.
It tested the low-volatility anomaly on the 11 Select Sector SPDR ETFs. Each month it held the 3 sectors with the lowest 252-day log-return volatility, long-only, equal-weight and unleveraged, on USEQ daily bars.
There are no performance numbers. The strategy never passed verification, so no backtest report, optimization report or trade statistics exist.
Analysis
Volatility Effect in Stocks
Backtest and paper results are hypothetical. Trading involves risk of loss.