Skip to content

View original

TenMajorPerpsBiWeeklyRelativeStrengthRotationLongTop4

Hypotheses

Cross-Sectional Relative-Strength Momentum Rotation, Long-Only Perps (10 Liquid BINANCE USD-M Majors — Bi-Weekly Rebalance, Hold Top-4 by 60-Day Relative Strength, Equal-Weight, Absolute-Momentum Cash Filter Sits Out Names in Their Own Downtrend; a Distinct-Cadence Sibling of the Factory's Deployed Sharpe-2.6 Survivor, 3-Parameter)

Hypotheses

A LONG-ONLY, MULTI-INSTRUMENT cross-sectional relative-strength momentum rotation on 10 liquid BINANCE USD-M major perps (BTCUSDT, ETHUSDT, SOLUSDT, BNBUSDT, XRPUSDT, ADAUSDT, AVAXUSDT, LINKUSDT, DOTUSDT, LTCUSDT — all SAME venue). This is deliberately a DISTINCT-CONFIGURATION SIBLING of the factory's single most robust survivor — the deployed, Sharpe-2.6 long-only cross-sectional momentum weekly rotation — which is the ONLY construction with demonstrated robust survival across 1043 hypotheses. Rationale grounded in the failure log: (1) MULTI-INSTRUMENT solves the structural-unmeasurability death (my single-instrument Donchian produced ~47 trades vs the ~100 floor; 10 names rotating bi-weekly produce hundreds of position changes — comfortably measurable) WITHOUT raising per-name turnover into fee_edge territory; (2) it is NOT a momentum-CONFLUENCE clone (L41) — it is cross-sectional RANKING, the mechanism that actually survives, not single-name dual-timeframe; (3) it avoids the dead siblings' specific defects — it stays on PERPS (0.10% fee, not the spot 0.20% that killed the spot rotation), uses simple EQUAL-weight (not the risk-parity/inverse-vol weighting that died with negative expectancy), a MAJORS universe (not the mid-caps that died), and is LONG-ONLY (not the dollar-neutral top/bottom version that died overfit). Distinct from the DEPLOYED champion (8 majors, weekly, 30-day RS, top-3) by a broader 10-name universe, BI-WEEKLY cadence (lower turnover), an INTERMEDIATE 60-day relative-strength lookback (captures slower, more persistent leadership), TOP-4 holdings, and equal-weight — a genuinely different point in the parameter space that diversifies the champion's cadence/lookback concentration risk and is a legitimate candidate for a SECOND robustly-deployable strategy. Explicitly guarded against the L36 compounding/leverage artifact: no leverage stacking, exposure normalized to equity, each of the up-to-4 holdings capped at 25% of equity, so avg_trade_return_pct stays in the realistic single-digit range. Pure OHLCV (no fragile supplementary feed). 3 parameters. Instruments: ["BTCUSDT.BINANCE","ETHUSDT.BINANCE","SOLUSDT.BINANCE","BNBUSDT.BINANCE","XRPUSDT.BINANCE","ADAUSDT.BINANCE","AVAXUSDT.BINANCE","LINKUSDT.BINANCE","DOTUSDT.BINANCE","LTCUSDT.BINANCE"]. venue_type: futures. data_requirements: ["ohlcv"].

Hypotheses

Iteration 2 fixes exactly the two blocking issues and nothing else. (1) ALIGNMENT BARRIER RESTORED (the verified bug). The `on_bar` override is gone. The base template's `on_bar`/`_maybe_process_primary` now routes bars and defers primary processing until every same-timeframe extra leg has a bar at the primary timestamp, so ranking AND entry sizing read contemporaneous closes for all 10 names instead of BTC-at-T vs peers-at-T-1. The rotation is driven from `calculate_signal`, which the base calls only at that aligned point; closes are now keyed by `ts_event` (with `ts_init` fallback) to match the barrier's own timestamp key. As a bonus this also restores the base's `_in_warmup`/staleness guards that the override bypassed. (2) DIAGNOSIS OF THE 0/14. The QA is right that this is a code defect, not a bad regime, and the defect is specific: the old absolute-momentum gate tested `r > 0` on the SAME 60-day return used for ranking, which makes it near-vacuous for a top-4-of-10 selection. A name can only rank top-4 with a negative 60-day return once 7+ of 10 majors are already negative — i.e. long after the drawdown has happened. So the advertised 'cash filter' never engaged on the way down; every entry was a name whose 60-day return was still positive but whose price had already rolled over, which is precisely a portfolio of -15% to -20% holds with no winners. (The 14 fills are also ~4 independent rebalance decisions x ~3.5 legs of ~0.9-correlated majors, so the observed record is 0-of-~4 independent bets, not 0-of-14 — the implausibility is real but its size is smaller than the raw trade count suggests.) The fix makes the gate actually detect a downtrend: close above its own trailing 60-day mean, which crosses down early in a rollover while the 60-day return is still positive. It reuses `lookback_days`, so the 3-parameter surface (lookback_days, top_k, rebalance_days) is unchanged — no new tunable was added. The same test is applied as a per-bar exit on holdings, which caps the -17.6% holds that produced the loss profile; being exit-only it can only increase the trade count, so it cannot regress the Layer-3 'must produce >=1 trade' check that already passed. Everything the QA verified as clean is untouched: calendar-anchored rebalance period from the bar timestamp, per-instrument timestamp-keyed close dicts with trimming, guarded divisions, equal-weight capital-relative sizing via `get_account_equity()` capped at 25%/leg and 90% gross, leverage 1.0 never referenced in sizing, perps-over-spot venue choice, and the same clean import set (no banned imports added). The signal remains continuous every bar (primary trailing return minus peer-mean trailing return).

Hypotheses

Long-only cross-sectional majors momentum rotation carrying the L19/L36/L45 abandon signature — not worth 2 hours of optimization. Max drawdown is 56.4% (CI to 78%), a hard abandon at BACKTEST_REVIEW regardless of the +736% headline (L19): a 736% return alongside a 56% drawdown is leverage/crypto beta, not risk-adjusted edge, and it will not clear the promotion drawdown floor. avg_trade_return_pct is 13.68% on a majors basket with monthly prints like 2021-02 +111% — the L36 compounding/leverage artifact (position size riding the equity curve), confirmed by return_kurtosis 37 and skew 2.4. The entire record is carried by two bull years (2021 +494%, 2024 +142%) while 2022 (-52%), 2023 (-22%), 2025 (-4.3%) and 2026 (-8.9%) are all negative, and the recent regime is negative; the headline is further inflated by end_unrealized_pct 342 (un-exited open MTM). Risk-adjusted it is not significant (Sharpe 0.78, CI [0.096, 1.50] barely off zero). Despite being pitched as a sibling of the deployed Sharpe-2.6 champion, this is the L45 multi-instrument cross-sectional momentum family (0/84 survivors) crossed with the L36/L19 leverage-artifact deaths; optimization would just curve-fit the vol-sort to the bull regimes. Failure pattern: risk_reject/overfit long-only cross-sectional momentum basket, 56% DD + compounding artifact, edge concentrated in 2021/2024 (L19/L36/L45).

Implementation

Long-only cross-sectional relative-strength momentum rotation over 10 liquid BINANCE USD-M major perps (BTC, ETH, SOL, BNB, XRP, ADA, AVAX, LINK, DOT, LTC) on daily bars, pure OHLCV. Every 14 calendar days the strategy ranks all 10 names by trailing 60-day total return and holds equal-weight LONG the top 4, subject to a two-leg absolute-momentum cash filter: a name qualifies only if its own 60-day return is positive AND its close is above its own trailing 60-day mean; otherwise the slot sits in cash. Each leg is min(25%, 90%/4) = 22.5% of current equity notional at leverage 1.0, so gross exposure is ~90% long and never exceeds equity. Exits are (a) rotation-driven on the bi-weekly grid when a holding leaves the filtered top-4, and (b) a downtrend-break exit evaluated every bar when a holding's close falls below its own 60-day mean. No stop-loss beyond the trend break, no leverage stacking, no supplementary data.

Verification Results

CLEAN RESTART 2026-09-04 — this run's verdict history and learning records were removed and it was restarted from verification. Its previous abandonment came from the pipeline, not from the market: the Layer-2 harness mis-bound @staticmethod helpers (fixed), QA issued terminal performance verdicts on an unoptimized smoke test (removed — QA now judges correctness only), and sandbox timeouts came from backtest-slot starvation (fixed). The hypothesis and the strategy code are unchanged. Verify the code on its merits; performance is decided later by the full backtest and the optimizer.

Backtest Review

Clean, faithful multi-leg cross-sectional construction on the momentum family (which has a deployed survivor); adequate sample (154 trades); low fee drag (commission 1.13% of gross)

Backtest Review

avg_trade_return_pct above fee floor; positive alpha vs equal-weight basket (0.197)

Backtest Review

Hard drawdown fail (L19): max_drawdown 56.4% (CI to 78%) — no strategy at >50% DD survives the promotion floor; a 736% return alongside 56% DD is leverage/beta, not risk-adjusted edge

Backtest Review

L36 compounding/leverage artifact: avg_trade_return_pct 13.68% on a majors basket (monthly 2021-02 +111%, 2021 annual +494%) — position size rode the equity curve; return_kurtosis 37, skew 2.4

Backtest Review

Edge concentrated in two bull years: 2021 +494% and 2024 +142% carry the entire record; 2022 (-52%), 2023 (-22%), 2025 (-4.3%) and 2026 (-8.9%) are all negative, and the recent regime is negative

Backtest Review

Headline inflated by open MTM: end_unrealized_pct 342 (a large share of the +736% is un-exited unrealized, not realized)

Backtest Review

Not significant: Sharpe 0.78 with CI [0.096, 1.50] barely off zero; L45 multi-instrument cross-sectional momentum family (0/84 survivors)

Iteration History

Verification failed (Layer 4 — QA review): - SANDBOX SHOWS THE L17 CODE-DEFECT SIGNATURE — win_rate 0.0 AND profit_factor 0.0 (0 winners of 14 trades, avg_trade -17.6% of notional, Sharpe -1.91, -46.5%). In this factory that exact signature has repeatedly been a polarity/sizing/exit/accounting bug mis-diagnosed as fee/edge and abandoned after 4-5 wasted iterations. I cannot pass it as a bad-regime sandbox; it must be diagnosed. In static review I VERIFIED the obvious suspects are correct: ranking buys the highest 60-day returns, the abs-momentum filter keeps only positive-momentum names, and sizing is 22.5%/leg with NO leverage amplification (so the -17.6%/trade losses are unamplified real asset moves). If a bug exists it is subtle (most likely the overridden on_bar / multi-leg fill path, issue #2), or the 0/14 is a genuine momentum crash — but 0 winners over 14 twenty-eight-day major-perp holds is implausible for a correct long-momentum rotation even in a bad year, which is exactly why L17 says stop and investigate. - OVERRIDDEN on_bar BYPASSES THE BASE TEMPLATE'S CROSS-LEG ALIGNMENT BARRIER — a real correctness bug for a cross-sectional strategy. The base on_bar gates primary processing through _maybe_process_primary, which defers until every same-timeframe extra leg has a bar at the current timestamp, so the book ranks on CONTEMPORANEOUS closes. This strategy replaces on_bar wholesale and fires the bi-weekly rebalance the instant the BTC bar arrives, so the 9 non-primary names can still hold day T-1's close when BTC's day-T bar triggers ranking. For a rank-based strategy whose entire edge is relative cross-sectional strength, ranking on mixed-timestamp data can systematically distort the top-4 selection. - Static divisions all guarded (past<=0 checked; _NS_PER_DAY nonzero constant; price<=0 checked). Other aspects verified clean: calendar-anchored rebalance period from ts_init (correctly avoids the L26 uptime-counter trap), per-instrument timestamp-keyed close dicts with trimming, equal-weight capital-relative sizing via get_account_equity() capped at 25%/leg and 90% gross, leverage 1.0 unamplified. Venue choice (perps not spot) correctly justified vs the spot sibling's fee_edge death. Code is largely sound — the block is the unexplained 0%-win-rate plus the alignment bypass, not general quality.
Strategy report

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