BtcWeeklyMovingAverageRegimeTrendLS
Hypotheses
BTC Macro Weekly Trend Regime — Simplest Robust Expression of the One Proven Edge at the EMPTIEST Horizon: Position = Side of the 20-Week Moving Average, Flip on Regime Change, Vol-Targeted, Weeks-to-Months Holds (BINANCE USD-M, WEEKLY Bars, Long-Short, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument MACRO trend-follower on BTCUSDT.BINANCE (USD-M perp) at the WEEKLY timeframe — deliberately the simplest, most overfit-resistant, most fee-robust expression of the ONLY edge the factory has ever promoted (directional trend), placed in the EMPTIEST bucket in the whole portfolio: macro_1w_plus is 0.5% (12 of 2462). Every symmetric mean-reversion / pairs / funding / options / cross-sectional sleeve is dead; cross-sectional momentum ROTATION was just abandoned overfit at Sharpe 0.85 (killed by DSR deflation on its parameter search). This sleeve responds to that specific failure mode by minimizing degrees of freedom and turnover: the position is simply the SIDE of a 20-week moving average, flipped only on a confirmed regime change — a handful of trades per year, so fee drag is negligible (the fee_edge graveyard that killed the 4H/daily fades cannot bite at this horizon) and there is almost nothing to overfit. It is distinct from the four pending trend sleeves (all 4H/daily intraday-to-swing on BTC/ETH/HL) by HORIZON (weekly bars, weeks-to-months holds) and by construction (MA-regime flip, not breakout/momentum-confluence/OI-gate). CRITICAL implementation note (the prior weekly attempt died on a config bug): the bar_type MUST be 1-WEEK, not 1-DAY — the strategy is defined on weekly bars end-to-end. Pure OHLCV, computationally TRIVIAL (one rolling SMA + ATR). Avoids every graveyard: NOT symmetric reversion, NOT pairs/cross-sectional (both dead), NOT funding (L57), NOT options (infra-broken), NOT a liquidation feed (L58). Exactly 3 tunable parameters: MA lookback (weeks), the ATR confirmation buffer, and the volatility target.
Hypotheses
ITERATION 3 - fixes the one reported failure (Layer 4 QA: unmeasurable trade count, 17 trades over 6.7 years) without touching anything that already passed. The signal math, entry/exit conditions, hysteresis and sizing formula are unchanged from the version that cleared Layers 1-3; they were moved verbatim into a per-instrument state dict so the same rule can run on each leg, with calculate_signal/should_enter/should_exit/position_size still driving the primary and on_extra_bar driving the other nine. No new imports, no banned imports, min_bars_required still 2 (the iteration-2 warmup fix is preserved intact). QA was right that the weekly horizon cannot reach ~100 trades ON ONE ASSET and that this is not fixable inside the 3 tunables - so instead of shortening the horizon (which would destroy the sleeve's entire reason to exist: macro_1w_plus is 0.5% of the portfolio, and a shorter MA would just make this a fifth BTC swing-trend sleeve) I added breadth. Cross-sectional breadth costs zero parameters and zero turnover per name. Measured by replaying the exact submitted code over real weekly bars for all ten symbols (3,290 bars, 2019-09 to 2026-08, entries/exits simulated with a 0.10% round-trip taker charge): 165 closed trades, ~32/yr, versus 17 before - past the ~100-trade measurability floor. Trades are spread evenly across names (13-20 per symbol), so no single leg carries the sample, and both directions are profitable (long 83 trades, short 82). Every year except the 2020 stub is positive. On the optimizer: note that holdout_days is max(15, 20% of the data range) in optimizer.py, so on a ~6.7-year backtest the holdout is ~1.3 years (roughly 40 trades), not 15 days - the '15-day holdout = 2 weekly bars = 0 trades' concern only binds when total history is under ~75 days, which is not the case here. Each of the three walk-forward windows likewise gets 40+ trades. HONEST CAVEATS: (1) per-trade returns at this horizon are enormous and extremely fat-tailed - mean +70% net, best +5,332% (a DOGE long through 2021), worst -62% - so the mean is outlier-driven and 2021 (mean +294%) dominates the sample; the analyst should look at the vol-targeted equity path and Sharpe rather than at per-trade averages, and should expect high kurtosis flags. (2) Because sizing is vol-targeted at 20% annualized and split 1/n, gross exposure is only ~26% of equity, so absolute total return will look modest relative to those per-trade numbers - that is the design, not a defect. (3) Basket membership (ten liquid majors, all currently listed with full weekly history verified in the catalog) is a structural choice, not a tuned parameter, but it is the one degree of freedom I added and it should be treated as such when judging overfit.
Hypotheses
Artifact-driven, high-drawdown weekly trend basket that fails multiple independent gates. max_drawdown is 62.1% (CI to 76%) — a hard abandon (L19); the book draws down more than the majors it holds. The entire track record rests on a single +156.68% week (2021-07-12): return_kurtosis 587, skew 19.2, 2021 +178.7% while every other year is modest — and a +156% single-week return on a vol-targeted book with gross capped at 1x equity (avg_position_pct 3.4%) is not physical, so it is a suspected sizing/compounding or thin-tape artifact, not a repeatable edge; strip that week and the edge is mediocre-to-negative. avg_trade_return_pct 56.4% is implausibly high (L36 compounding/leverage-artifact signature) from the same outlier. Sharpe is only 0.536 with sharpe_ci_low -0.056 (CI straddles zero), so even ignoring the artifact the result is indistinguishable from noise and cannot clear the deflated-Sharpe gate after best-of-N. At the weekly horizon the 10 correlated majors all flip long into the 2021 bull together, so the diversification premise collapses into one concentrated bet rather than the smooth right tail its daily 8-asset sibling delivered (DD 12%, CI-low 0.187, kurtosis 59). Optimizing 3 params cannot repair a 62% drawdown or manufacture significance from a one-week record. Abandon at BACKTEST_REVIEW. Failure pattern: weekly_trend_single_week_artifact (DD>50% + kurtosis-587 outlier + CI-on-zero).
Implementation
Long-short MACRO weekly moving-average regime trend-follower, now run as a 10-name basket of liquid Binance USD-M majors (BTC primary + ETH, SOL, BNB, XRP, ADA, DOGE, LINK, AVAX, LTC), 1-WEEK bars end to end. Each leg is an independent sleeve running the IDENTICAL rule: every bar it computes signal = (close - SMA(ma_lookback)) / ATR - the distance from the regime line in ATR units, continuous, positive in a bull regime and negative in a bear one - and holds the SIDE of that line. A leg goes long when signal >= atr_buffer, short when signal <= -atr_buffer, and flips only when the opposite condition confirms (ATR hysteresis, so a close hovering on the average does not churn the book). There is no fixed target and no separate stop: the regime line is the exit. Sizing is VOLATILITY-TARGETED per leg and split 1/n across the basket: notional = equity * min(vol_target / realized_annualized_vol, max_notional_frac) / n_legs, with realized vol the stdev of the last vol_lookback weekly log returns annualized by the bar interval (~52/yr, derived from the bar type). That keeps GROSS exposure capped at 1x equity (measured ~2.6% of equity per leg, ~26% gross) so leverage stays 1.0, while each leg still shrinks as its own volatility expands. Pure OHLCV, no supplementary feed; all state is per-leg incremental (running SMA sum, Wilder ATR, running return sums, bounded deques) and a full 10-symbol, 3,290-bar replay takes 0.03s. min_bars_required stays at 2 (the iteration-2 fix): all warmup happens inside the per-leg update and every premature-entry guard lives in the entry path, so the warmup is never charged twice.
Verification Results
Verification failed (Layer 4 — QA review):
- UNMEASURABLE trade count (L16), flagged by the developer themselves. The iteration-2 warmup fix is correct and the strategy now trades, but it trades far too rarely to validate: the developer's full-history dry run is 17 closed trades over 6.7 years, and the developer explicitly writes that this is 'BELOW the ~100-trade measurability floor that just killed the HL daily sleeve (L16).' The sandbox is a 2-trade, data_days=40 (~6 weekly bars) result with metrics_reliable=FALSE and Sharpe 1.41 on a CI of [-4.04, 5.87] — a pure small-sample mirage (PF 101 on 2 trades). This is the same measurability failure I rejected the HL daily sleeve for, only worse (17 vs 56). The weekly horizon on a single asset structurally cannot reach ~100 trades over ~6.7 years (~2-3 round trips/yr), and it is NOT fixable within the 3 tunables — the hypothesis's own selling point ('a handful of trades per year') is in direct conflict with the factory's validation framework. The optimizer cannot be populated: the 15-day holdout spans ~2 weekly bars (0 trades), each walk-forward OOS window gets ~5-6 trades, and the deflated-Sharpe gate (which just abandoned the cross-sectional rotation at Sharpe 0.85) is unachievable on 17 wide-CI trades.
Verification Results
Confirm the actual holdout sizing in optimizer.py. If it is time-proportional (20% of range), proceed. If it is a fixed 15 days, ABANDON at BACKTEST_REVIEW — a weekly strategy structurally cannot populate a 15-day holdout regardless of basket breadth, and no further iteration of this file changes that.
Verification Results
HOLDOUT-WINDOW COMPATIBILITY must be verified before optimization — the load-bearing assumption of this whole sleeve. The developer asserts optimizer.py uses holdout = max(15, 20% of the data range), which on ~6.7 years is ~1.3 years (~40 trades) and would populate the holdout fine. But the project docs (CLAUDE.md, Optimization Pipeline) state the holdout is the 'Final 15 days, tested once'. If the docs are right, 15 calendar days = ~2 weekly bars across the basket = ~0-3 trades, so the holdout gate (>=70% of WF OOS Sharpe) is unpopulated and this weekly sleeve still cannot clear the pipeline even with the basket fix. I cannot confirm which is true from the review inputs. Trade count itself is now fine (165 full-history) and each walk-forward window gets ~40 trades; it is specifically the final holdout at the weekly horizon that is at risk.
Verification Results
At BACKTEST_REVIEW use the full ~6.7-year backtest; disregard the sandbox Sharpe/PF/win-rate entirely.
Verification Results
The 1-year sandbox is uninformative and must not be trusted — judge on the full history. data_days is 41 (~6 weekly bars), 13 trades, PF 160, Sharpe 2.49 on a CI of [-2.92, 6.55], and avg_holding_period 161d exceeds the 41d window (internally inconsistent). This is a weekly-horizon artifact of the short sandbox window, not a code defect, but every headline sandbox metric here is noise. The meaningful measure is the developer's full-history replay (165 trades).
Verification Results
At BACKTEST_REVIEW judge on the vol-targeted equity path and Sharpe (not per-trade averages), and verify a tradeable trend premium exists in 2022-2026, not only in 2021. Basket membership (10 names) is the one added degree of freedom and should be treated as such when weighing overfit.
Verification Results
Extreme fat-tail / single-regime dependence. The developer discloses mean +70%/trade with best +5,332% (a DOGE 2021 long) and 2021 averaging +294%/trade, so the record is dominated by the 2021 alt-season right tail. Weekly holds make the tails even larger than the daily TSMOM sibling's. The deflated-Sharpe and bootstrap CIs will be very conservative given the kurtosis, and the edge outside 2021 is the real question.
Backtest Review
Correct living-family construction (directional weekly MA-regime trend), minimal 3-param surface, negligible fee drag (impact 0.15%), huge capacity ($41B)
Backtest Review
Fills the genuinely empty macro_1w_plus horizon bucket
Backtest Review
max_drawdown 62.1% (CI to 76%) — hard abandon (L19), the book draws down more than the majors it trades
Backtest Review
Entire record rests on a single +156.68% week (2021-07-12); return_kurtosis 587, skew 19.2, 2021 +178.7% vs modest every other year — a +156% single week on a 1x-gross vol-targeted book is a suspected sizing/thin-tape artifact, not a repeatable edge
Backtest Review
avg_trade_return_pct 56.4% is implausibly high (L36 compounding/leverage-artifact signature), driven by the same outlier
Backtest Review
Sharpe 0.536 with sharpe_ci_low -0.056 straddles zero — not distinguishable from noise, cannot clear the deflated-Sharpe gate after best-of-N; at the weekly horizon the 10 majors flip long together in 2021, so diversification collapses into one concentrated bet
Outcome Summary
BtcWeeklyMovingAverageRegimeTrendLS aimed to plant the factory's one proven edge — directional trend — in its emptiest bucket, the weekly macro horizon, as the simplest, lowest-DOF, lowest-turnover expression possible: long above a 20-week MA, short below, flipped on confirmation, run across 10 majors to reach a measurable trade count. The headline dazzled (+403.8%, PF 2.49, $41B capacity, near-zero fees) but the distribution betrayed it: a 62.1% drawdown, Sharpe 0.536 with a CI on zero, kurtosis 587, and an entire record resting on one +156.68% week in July 2021 — a physically implausible move on a 1x-gross vol-targeted book that reads as a sizing/thin-tape artifact. The analyst abandoned it at backtest review on the hard drawdown gate plus the artifact and CI-on-zero findings, noting the weekly majors all flip long together so diversification collapses into a single concentrated bet, unlike its smoother daily 8-asset sibling. It never reached optimization, analysis, or risk review.
Outcome Summary
Cross-asset diversification only smooths the return stream when the legs are not synchronized — at the weekly horizon ten correlated majors flip long together into a bull regime, concentrating into one bet whose entire record is a single outlier week, so a 62% drawdown and a kurtosis-587 artifact (not a repeatable edge) result; a headline +404% built on one week is a distributional red flag, not a promotable trend sleeve.
Outcome Summary
The analyst abandoned it at backtest review on multiple independent gate failures: max drawdown 62.1% is a hard abandon (L19, drawing down more than the majors it trades); the track record is an artifact — a physically implausible +156% single week on a vol-targeted 1x-gross book (avg position 3.4%) signals a sizing/compounding or thin-tape distortion (L36), and stripping it leaves a mediocre-to-negative edge; and Sharpe 0.536 with a CI straddling zero cannot clear the deflated-Sharpe gate, because at the weekly horizon the 10 correlated majors all flip long into the 2021 bull together, collapsing the diversification premise into one concentrated bet.
Outcome Summary
A long-short macro trend-follower expressing the factory's one proven edge (directional trend) at the empty weekly (macro_1w_plus) horizon — position = side of a 20-week moving average per name, flipped only on an ATR-buffered confirmed regime change, vol-targeted, held weeks-to-months — run as an equal-risk (1/N) basket of 10 liquid majors (BTC, ETH, SOL, BNB, XRP, ADA, DOGE, LINK, AVAX, LTC) after the single-asset version fell below the ~100-trade measurability floor, with 3 tunable parameters.
Outcome Summary
The weekly-bar backtest (2019-2026) returned +403.8% over 173 trades with profit factor 2.49, negligible fee drag (impact 0.15%), and huge capacity ($41B), but on deeply pathological distribution stats: max drawdown 62.1% (CI to 76%), Sharpe just 0.536 with sharpe_ci_low -0.056 (straddles zero), return kurtosis 587, skew 19.2, and avg_trade_return_pct an implausible 56.4% — the entire record resting on a single +156.68% week (2021-07-12), with 2021 +178.7% while every other year was modest.
Iteration History
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: BTCUSDT.BINANCE-1-WEEK-LAST-EXTERNAL, Bars processed: 41
Diagnostics: should_enter() returned a side 0 times over 19 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds.
Ensure your strategy produces trades with the given data and parameters.
Backtest and paper results are hypothetical. Trading involves risk of loss.