Skip to content

View original

UsEquityRegimeGatedOversoldBounceBasketLong

Hypotheses

US Equity Regime-Gated Oversold-Bounce Mean Reversion, Long-Only Liquid Large-Caps + Index ETFs (Daily Bars, Buy 2-Sigma Dips ONLY While SPY>200d SMA, 3-7 Day Hold, Commission-Free)

Hypotheses

Implements the hypothesis literally: the 2-sigma dip is the entry trigger, the SPY>200d SMA condition is the ONLY regime gate (dips in a bear tape are skipped entirely, which is the whole point of the hypothesis), the hold horizon is bounded at 3-7 sessions by the reversion target plus the 7-session time stop, and the venue is USEQ so a 2-4% dip-bounce clears the ~0.02-0.05% round-trip cost by an order of magnitude. SPY is the primary instrument because it both anchors the regime SMA and is itself a tradeable basket member, so the strategy still trades (and the signal still varies) if only the primary leg has data. calculate_signal returns SPY's raw z-score every bar (continuous, unclipped); the entry decision lives in should_enter against the matching-unit entry_z threshold. Basket legs keep independent per-instrument state (no cross-instrument index alignment to corrupt) and are managed from the primary bar after the base class's cross-leg timestamp barrier, so every leg's z-score is computed on contemporaneous data. Sizing is equity-relative in whole shares with an equal-slot gross cap and a fixed 1.5% risk-per-trade cap, so losses cannot compound into position size (max gross = 100% of equity, leverage 1.0). Per-bar work is O(1) per leg (running sums + Wilder ATR, bounded deques), so the 300s smoke budget is not at risk on ~1.5k daily bars x 6 legs. Entry frequency: a 2-sigma 20-day dip fires roughly 5-10 times/year per name; across 6 names with a ~70% risk-on duty cycle that is comfortably 50+ trades/year, far from the zero-trade failure mode.

Hypotheses

failed deflated Sharpe: DSR=0.0011, expected-max=0.807 over 75 trials (47 effective) — the selected Sharpe is below what the search would find by luck; plus two unwaivable HARD gates (is_overfitted=true, OOS 0.467 < 0.5). Not a fee problem and not a tuning problem: zero cliffs and a flat 0.29–0.70 surface mean the same weak edge exists everywhere, so a second optimization pass cannot lift OOS over 0.5. Economically immaterial (CAGR 1.70%, IR -0.555, alpha 0.0068). Not revise_hypothesis — the oversold-bounce/short-term-reversal premise has already been reframed and killed repeatedly on USEQ (cross-sectional reversal x2, turn-of-month overlay, uptrend-gated deep-dip basket).

Implementation

Long-only oversold-bounce mean reversion on a 6-name basket of liquid US large-caps and index ETFs (SPY, QQQ, AAPL, MSFT, JPM, XOM) on daily USEQ bars. Each session every member's close is z-scored against its own 20-session rolling mean/std; a close 2 sigma or more below the mean is bought, but ONLY while the market regime is risk-on (SPY close above its 200-session SMA). Positions exit on whichever comes first: reversion (z back above 0), a 7-session time stop, a 3xATR stop from the entry fill, or the SPY regime flipping risk-off (flatten). Capital is deployed in equal 20%-of-equity slots, at most 5 concurrent, each additionally capped at 1.5% of equity risked at the ATR stop distance. Whole-share sizing, no leverage, commission-free USEQ (costs = spread + impact only).

Verification Results

Optionally require len(self._trend_closes) >= trend_len (or set min_trend_bars closer to 200) before enabling entries, so the regime always reflects the full 200-session SMA the hypothesis names. Impact is limited to early backtest history.

Verification Results

The regime gate activates once trend history reaches min_trend_bars=60, using a partial SMA over 60-200 sessions until the full trend_len=200 window fills. For roughly the first ~140 sessions after warmup the 'SPY>200d SMA' regime is evaluated against a shorter mean than the hypothesis specifies, which can flip the risk-on/off decision differently in that early window.

Verification Results

Sandbox is positive (avg_trade_return_pct 0.73%, PF 1.51, 121 trades) but the strategy LOSES in the normal-vol tercile (-1.94%, Sharpe -0.12) with the Sharpe CI [-0.28, 1.24] straddling zero; the edge is concentrated in the calm and stressed regimes. Full-history walk-forward should confirm the oversold-bounce edge is not confined to a couple of favorable regimes. Cross-sectional single-name mean-reversion baskets have a weak survival record here, so the analyst should weigh regime robustness carefully.

Backtest Review

USEQ commission-free venue: avg_trade_return_pct 0.469% clears the ~0.05% fee floor by ~10x and PF 1.35 is above the 1.2 line, so this is NOT the L75 fee-dead USEQ signature (that keys off PF<1.2 / avg<=0.10%).

Backtest Review

Decisive sample: 502 long trades over a ~27yr history; plenty for meaningful parameter fitting.

Backtest Review

Trades implement the hypothesis: 502 long / 0 short (long-only oversold-bounce), avg hold 8.5d consistent with the 3-7d intent, regime-gated on SPY>200d.

Backtest Review

Regime-robust on full history: all three vol terciles are POSITIVE (calm +0.145, normal +0.239, stressed +0.253) — QA's concern that the edge was confined to calm/stressed regimes is NOT borne out once tested on full history.

Backtest Review

Low risk: max_drawdown 7.6%, impact only 5.6% of gross, capacity ~$32M.

Backtest Review

Headline Sharpe is low (0.199, mtm) with sharpe_ci_low -0.14 straddling zero; the book is low-exposure (43%) and low-vol (6.2% annualized), so absolute return is modest — this will be the real test at the post-optimization promotion gate.

Backtest Review

Some yearly variance (a few negative years), typical of a regime-gated mean-reversion basket.

Analysis

Mechanically clean: zero cliff parameters, smooth sensitivity surface, PBO 0.415 <= 0.5, all three walk-forward OOS windows positive (0.397/0.581/0.424) — a stable but tiny edge, not a curve-fit blow-up.

Analysis

Holdout passed the hard gate: 88 trades, Sharpe +0.115, consistent_with_oos=true (z=-0.85).

Analysis

Economics fine for USEQ: avg_trade_return_pct 0.682% (~14x floor), PF 1.53, zero commissions, impact 3.8% of gross, capacity $67.7M.

Analysis

Modest risk: max drawdown 10.7% (inside the 15% equities default), 34.6% exposure, win rate 0.538 at 1.30 payoff.

Analysis

HARD: walk-forward is_overfitted=true (IS 0.864 -> OOS 0.467); HARD: OOS Sharpe 0.467 < 0.5 validity floor — promotion impossible, unwaivable.

Analysis

Deflation is decisive: DSR 0.0011, is_significant=false, and the selected Sharpe (0.279 full-period) sits BELOW the expected-max-by-luck bar of 0.807.

Analysis

Sharpe CI [-0.075, 0.576] straddles zero; PSR 0.789 < 0.95; fails programme FDR (candidate_p 0.9989, BH keeps 4 of 281).

Analysis

No alpha vs its own benchmark: IR -0.555, alpha 0.0068, CAGR 1.70% over 33 years.

Analysis

Calmar 0.149 vs 0.5; holdout ratio 0.245 vs 0.70; max DD duration 1,274 days.

Analysis

Sensitivity surface uniformly mediocre (0.29–0.70) — weak everywhere, no robust region to tune toward.

Analysis

Breaks down under stress: COVID window -7.1% / Sharpe -3.85; stressed-regime Sharpe 0.23 vs calm 0.36.

Analysis

Benjamini-Hochberg at q=0.10 over 281 programme candidates keeps 4. A candidate that does not survive here is not distinguishable from the programme's own noise, however good its individual statistics look.

Outcome Summary

UsEquityRegimeGatedOversoldBounceBas-ff3588066c

Outcome Summary

The strategy bought 2-sigma daily dips in a six-name US large-cap and ETF basket, trading only while SPY sat above its 200-day SMA, and the pre-optimization review sent it forward to optimize on the strength of 502 trades, PF 1.35 and a per-trade return of 0.469% that cleared the commission-free USEQ cost floor roughly tenfold. Optimization improved the headline numbers to Sharpe 0.279, PF 1.53 and 0.682% per trade, and the run was structurally sound: no parameter cliffs, PBO 0.415, three positive walk-forward OOS windows and a passed holdout. But the deflation statistics were decisive — DSR 0.0011, a Sharpe CI of [-0.075, 0.576] straddling zero, failure of programme FDR at candidate_p 0.9989, and a selected Sharpe below the 0.807 expected-max-by-luck bar — alongside two unwaivable HARD gates in is_overfitted=true and OOS Sharpe 0.467 < 0.5. It was abandoned after one iteration as economically immaterial (CAGR 1.70%, alpha 0.0068, IR -0.555) and as another instance of an oversold-bounce premise already killed repeatedly on USEQ.

Outcome Summary

A mechanically clean strategy — zero sensitivity cliffs, PBO 0.415, all three walk-forward OOS windows positive, holdout passed with 88 trades at Sharpe 0.115 — can still be worthless if the edge is uniformly weak: a flat 0.29-0.70 sensitivity surface means there is no better region to tune toward and a second optimization pass cannot lift OOS Sharpe over the floor.

Outcome Summary

abandoned

Outcome Summary

The analyst voted abandon after optimization: walk-forward flagged is_overfitted=true (IS 0.864 vs OOS 0.467) and the OOS Sharpe of 0.467 fell below the 0.5 validity floor, both unwaivable HARD gates, while deflated Sharpe of 0.0011 against an expected-max-by-luck bar of 0.807 over 75 trials (47 effective) said the selected Sharpe was indistinguishable from search noise.

Outcome Summary

Buy 2-sigma oversold dips in a long-only basket of liquid US large-caps and index ETFs (SPY, QQQ, AAPL, MSFT, JPM, XOM) on daily USEQ bars, but only while SPY traded above its 200-session SMA, exiting on reversion, an ATR stop, a 3-7 day time stop, or a regime flip.

Outcome Summary

The initial backtest over ~8,453 days produced 502 long trades, 49.1% total return, Sharpe 0.199, profit factor 1.35, 7.6% max drawdown and avg_trade_return_pct 0.469% on a commission-free venue; after optimization it showed 381 trades, 57.7% total return, Sharpe 0.279, PF 1.53, avg_trade_return_pct 0.682% and 10.7% max drawdown, with CAGR 1.70% and information ratio -0.555.
Strategy report

Backtest and paper results are hypothetical. Trading involves risk of loss.