RankWeightedDollarNeutralMomentumLS
Hypotheses
Rank-Weighted Dollar-Neutral Cross-Sectional Momentum, Long-Short Market-Neutral (BINANCE USD-M, 8 Majors, MONTHLY: Weight EVERY Name by its Momentum RANK — Long the Above-Median Half, Short the Below-Median Half, Dollar-Neutral — Full-Cross-Section Rank Weighting for Within-Leg Diversification and Squeeze Resistance, DD Bounded by the Momentum Spread, 2-Parameter)
Hypotheses
A REAL, codeable strategy that, like my pending discrete top-2/short-bottom-2 spread, attacks the ONE constraint that floor-killed every LONG-ONLY momentum reuse this session (>50% drawdown from crypto beta — crowding/dispersion/mid-cap all died 63-74% DD) by going FULLY DOLLAR-NEUTRAL (net beta ≈ 0 → max-drawdown bounded by the momentum SPREAD, ~20-30%, structurally under the L19 floor). It differs from the discrete-spread version in CONSTRUCTION: instead of 4 discrete legs (top-2/bottom-2), it weights ALL 8 majors continuously by momentum RANK — the strongest name gets the largest long weight, the weakest the largest short weight, weights summing to zero (dollar-neutral). This full-cross-section rank weighting spreads exposure across every name, giving materially better WITHIN-LEG diversification and reducing the single-name short-squeeze risk that is the discrete version's main flaw (a 2-name short leg is squeeze-prone; an 8-name rank-weighted short spreads that risk). It captures the same pure cross-sectional momentum premium (winners − losers), reuses the proven relative-strength signal (no L30 new-indicator risk), and is monthly/low-turnover to clear fees (per L12: rank-weighting concentrates notional in the highest-conviction names while the monthly cadence keeps fills low). Genuinely market-neutral, filling the most under-represented direction bucket. NOT long-only (fixes the DD floor), NOT the discrete 4-leg spread (continuous rank weights, full cross-section), NOT funding/options/order-flow. Long-short, monthly, USD-M. 2 core parameters (momentum lookback, long/short fraction of the cross-section).
Hypotheses
ITERATION 2 — smallest change that fixes the reported crash, signal logic untouched. ROOT CAUSE: _submit rounded the order quantity with a hard-coded round(qty, 3); a small monthly rebalance delta on a high-priced name (e.g. ~0.0004 BTC, which still clears the $5 min-notional at ~$100k) rounded to exactly 0.000, so the engine rejected 'init.quantity ... was 0.0' and the whole run aborted before producing any data. FIX (exactly as the feedback prescribes, and confined to _submit since both _set_target flip and delta paths route through it): (1) round each order to the INSTRUMENT'S OWN size precision via inst.make_qty(qty) instead of a hard-coded 3 decimals — read from the instrument like the other rotation strategies; (2) GUARD float(q) <= 0 after rounding and return before submitting, so a leg that rounds down to zero (below the instrument's step size) is simply skipped rather than crashing. Nothing else changed: the rank weighting, symmetric zero-sum weights (dollar-neutral), monthly reconciliation, and all passing signal logic are identical to iteration 1, so every earlier layer stays green. No new imports. Full construction context (unchanged): dollar-neutral (net beta ~0) bounds max-DD by the momentum spread rather than crypto beta; rank weighting spreads exposure across the whole cross-section for within-leg diversification and lower single-name squeeze risk vs the discrete 2-name short leg; USD-M futures is required (the strategy shorts the below-median names); gross_budget 0.90 with symmetric weights keeps gross ~0.90 and net ~0 so leverage stays 1.0 and is genuinely unused; all 8 majors are deep-history liquid USD-M perps (no data_unavailable). NOTE on the analyst's HARD BAR: this fix only unblocks evaluation; if the now-running backtest reproduces the discrete sibling's short-squeeze blowup (max_drawdown > 50%, profit_factor < 1, or wild monthly blowups) the dollar-neutral momentum family should be abandoned, not iterated a third time.
Hypotheses
The developer correctly fixed the crash (instrument-precision make_qty + zero-qty guard, so it now runs the full window), but the clean run reproduces exactly the dollar-neutral-momentum blowup I set as the hard abandon bar in the iterate feedback: max_drawdown 92.82% (CI to 99.7%), total_return -91.32%, profit_factor 0.633, avg_trade_return_pct -5.36%, expectancy -$383/trade, Sharpe -0.34, PSR 0.14, with wild short-squeeze monthly detonations (2021-02 -191%, 2024-11 -111%, 2021-01 -55%) and the account effectively destroyed after 2024-11 (returns go to 0.0). The hypothesis's central claim — that rank-weighting spreads the short across 8 names and removes the discrete version's single-name squeeze risk, keeping drawdown bounded at 20-30% — is falsified: spreading the short DILUTED but did not REMOVE the unbounded upside squeeze risk of shorting crypto momentum-losers, so it still blew through the DD bound to 92.8%, essentially identical to the discrete sibling (-96%) and the reversal sibling (-97%). This is now the third confirmed blowup of the dollar-neutral cross-sectional momentum/reversal family (plus the risk-parity variant abandoned as a duplicate). Per my explicit iterate bar ('if the fixed re-run reproduces the blowup, abandon immediately; do not iterate the dollar-neutral momentum family a third time'), abandon. Recommendation for the orchestrator/PM: the entire dollar-neutral crypto-majors momentum/reversal family is empirically dead (short-crypto-losers carries unbounded squeeze risk that no weighting scheme within it removes) — halt further variants of it, consistent with the Research Lead's standing escalation to pause momentum generation.
Implementation
Rank-weighted dollar-neutral cross-sectional momentum, long-short market-neutral on 8 BINANCE USD-M majors (BTC/ETH/SOL/BNB/XRP/ADA/AVAX/LINK, 1-DAY bars). MONTHLY it ranks all 8 by trailing relative strength and assigns symmetric linear rank weights — strongest name largest long, weakest largest short, weights summing to zero (dollar-neutral) — with ls_fraction controlling how much of the cross-section is taken per side. Weights are scaled to a gross budget of equity and each name is reconciled to its signed target notional every month. Net beta ~0 so drawdown is bounded by the momentum spread rather than crypto beta. Pure-price, no supp data, no ticks. 2 core parameters: momentum_lookback, ls_fraction.
Verification Results
Skip the orders_open guard for the reopen half of a flip (close is reduce-only), or defer the opposite leg to the next rebalance.
Verification Results
Flip reconciliation close-then-reopens on the same bar; _submit's `if cache.orders_open(iid): return` guard can see the just-submitted reduce-only close and skip the reopen half, briefly tilting off dollar-neutral. Empirically not biting — sandbox shows balanced 22L/22S, beta 0.017. Latent risk only; direct winner↔loser flips are rare monthly. (Unchanged from iter-1.)
Verification Results
Analyst: judge on full multi-year backtest (incl. 2022); note capacity ~$2.1M / impact 21.8% folded.
Verification Results
Marginally positive but inconclusive one-year sandbox: total_return +1.33%, PF 1.014, Sharpe 0.119 (CI straddles zero), 44 trades. Not an L17 code-defect signature. Negative avg_trade_return_pct alongside positive total/pnl is the multi-leg per-trade-pct artifact. Developer set a hard bar: abandon the family if the full backtest shows >50% DD / PF<1 / squeeze blowups.
Backtest Review
The developer correctly fixed the 0-qty crash (instrument-precision make_qty + zero-qty guard); it now runs the full window
Backtest Review
Genuinely market-neutral construction (beta -0.04); rank-weighting did spread notional across all 8 names as intended
Backtest Review
Reproduces the dollar-neutral momentum blowup (my explicit abandon bar): max_drawdown 92.82% (CI to 99.7%), total_return -91.32%, profit_factor 0.633, avg_trade_return_pct -5.36%, expectancy -$383/trade
Backtest Review
Wild short-squeeze monthly blowups (2021-02 -191%, 2024-11 -111%, 2021-01 -55%) — the rank-weighting diluted but did NOT remove the unbounded squeeze risk of shorting crypto momentum-losers
Backtest Review
Mostly negative every year (2021 -89%, 2023 -31%, 2024 -133%); account effectively destroyed after 2024-11 (returns go to 0.0)
Backtest Review
Third confirmed blowup of the dollar-neutral momentum/reversal family (discrete -96%, reversal -97%, this -91%) plus the risk-parity duplicate
Analysis
The backtest crashed and produced zero data, so it cannot be evaluated — fix the order-sizing bug and re-run. ROOT CAUSE: in _submit, `Decimal(str(round(qty, 3)))` rounds the order quantity to 3 decimals. For a high-priced instrument like BTCUSDT (~$100k), a rank-weighted leg's target quantity is often far below 0.0005 and rounds to exactly 0.000, producing a zero-quantity order → the engine rejects it with "'init.quantity' not a positive real, was 0.0" and the whole run aborts. The min_notional check uses the pre-round qty so it does not catch this. FIX: (1) round each instrument's quantity to its OWN size precision (BTC/ETH need 3-5 decimals; do not hard-code round(qty,3)) — read it from the instrument like the other rotation strategies do; (2) after rounding, GUARD `if qty <= 0: return` before every submit_entry_instrument / _set_target order, so a zero-rounded leg is simply skipped rather than crashing. Apply the same guard in _set_target's flip/delta branches. HARD BAR: once it runs, this is a near-twin of the discrete dollar-neutral momentum spread that just blew up -96% from short-squeeze on the bottom-momentum majors. The rank-weighting spreads that short risk across more names but does NOT remove the unbounded squeeze risk of shorting crypto momentum-losers. If the fixed re-run reproduces that failure — max_drawdown > 50%, profit_factor < 1, or the wild ±hundreds-of-percent monthly blowups the discrete sibling showed — abandon immediately; do NOT iterate the dollar-neutral momentum family a third time. Only advance to optimization if the rank weighting genuinely delivers a sub-50% drawdown WITH a positive, fee-clearing spread edge.
Outcome Summary
RankWeightedDollarNeutralMomentumLS was the fourth member of the dollar-neutral momentum/reversal family, betting that continuous rank-weighting across all 8 majors would spread the short leg enough to defuse the single-name squeeze risk that blew up the discrete top-2/bottom-2 spread. The developer fixed its initial 0-quantity crash (via instrument-precision make_qty and a zero-qty guard) so it ran the full window as genuinely market-neutral (beta -0.04), but the result reproduced the family's blowup almost exactly: -91.32% return, 92.82% max drawdown, profit factor 0.633, and short-squeeze detonations that destroyed the account after 2024-11. The analyst abandoned it per its explicit iterate bar — do not iterate the family a third time — concluding that spreading the short only diluted rather than removed the unbounded squeeze risk of shorting crypto momentum-losers. It was flagged as the third confirmed blowup (plus the risk-parity duplicate), with a recommendation to halt all further dollar-neutral crypto-majors momentum variants consistent with the Research Lead's standing pause.
Outcome Summary
No weighting scheme within the dollar-neutral crypto-majors momentum family removes the unbounded short-squeeze risk of shorting momentum-losers — spreading the short across more names only dilutes it — so the entire family is empirically dead and further variants are wasted iterations.
Outcome Summary
It was abandoned at backtest-review (verdict: abandon) because the clean re-run reproduced exactly the dollar-neutral momentum blowup the analyst had set as the hard abandon bar — rank-weighting diluted but did not remove the unbounded upside squeeze risk of shorting crypto momentum-losers, so drawdown still blew through the bound to 92.8%, essentially identical to the discrete (-96%) and reversal (-97%) siblings.
Outcome Summary
It was a dollar-neutral long-short version of the cross-sectional momentum signal on 8 USD-M majors that, instead of discrete top-2/bottom-2 legs, weighted every name continuously by its momentum rank (largest long weight to the strongest, largest short to the weakest, weights summing to zero), monthly — aiming to spread the short across all 8 names for within-leg diversification and squeeze resistance while keeping drawdown bounded by the momentum spread.
Outcome Summary
After a fixed 0-quantity crash it ran the full window as genuinely market-neutral (beta -0.04), but was a decisive loser: total return -91.32%, max drawdown 92.82% (CI to 99.7%), profit factor 0.633, avg_trade_return_pct -5.36%, expectancy -$383/trade, Sharpe -0.34, with wild short-squeeze months (2021-02 -191%, 2024-11 -111%) and the account effectively destroyed after 2024-11.
Backtest and paper results are hypothetical. Trading involves risk of loss.