Skip to content

View translation

SmartMoneyGatedFundingRotationLong

Hypotheses

Cross-Sectional SMART-MONEY POSITIONING Rotation, Long-Only (BINANCE USD-M, 8 Majors, WEEKLY Hold Top-3 by TOP-TRADER Long/Short Account-Ratio Conviction — the Deployed Momentum-Rotation STRUCTURE but Ranked by a NON-PRICE Positioning Key, with an Absolute Cash Gate; 2-Parameter)

Hypotheses

A LONG-ONLY, weekly-rebalanced cross-sectional ROTATION across the same 8-major USD-M universe as the deployed Sharpe-2.6 momentum winner (BTC, ETH, SOL, BNB, AVAX, LINK, ADA, XRP) — but the ranking key is a genuine NON-PRICE signal instead of price relative-strength: the TOP-TRADER long/short ACCOUNT ratio (count_toptrader_long_short_ratio) from the Binance VISION 'metrics' files (MULTI-YEAR to ~2020, NOT the 30-day API). This deliberately copies the ONE structural template that survives in this factory — long-only, majors, weekly hold top-K, low parameter count — and swaps only the selection signal, which is exactly what L30 permits ('require a genuine non-price data dependency'). Rationale from the session's brutal evidence: every SINGLE-NAME directional signal-timing strategy died (taker -100%, positioning-fade risk-reject, breakout verification_loop, exhaustion -43%), every DOLLAR-NEUTRAL momentum spread blew up (>90% DD), cross-venue two-leg carry died in verification_loop, and options/liquidations/pure-OHLCV are structurally dead — while the LONG-ONLY MAJORS BASKET (momentum Sharpe 2.6, negative-funding carry Sharpe 1.97) is the reproducible survivor. So this stays firmly in the survivor mold and contributes a signal orthogonal to the two deployed baskets: informed-trader RELATIVE conviction across names, not price trend (momentum) and not funding (carry). It is distinct from the pending SmartMoneySpotRegimeAccumulation, which uses the top-trader ratio as a PER-NAME time-series risk-on/off gate on SPOT; THIS uses it CROSS-SECTIONALLY on PERPS to rank the 8 names against each other and hold only the 3 with the highest smart-money conviction. An absolute cash gate provides the drawdown protection the always-invested momentum book lacks. 2 parameters.

Hypotheses

Iteration-4 fix for the Layer-3 sandbox_timeout. Root cause found in the framework, not in per-bar code: the previous version referenced the primary-symbol 'metrics' key, and supp_collector loads that via _load_parquet('metrics') with NO downsampling or window filter - a 15 MB, 5-minute, multi-year mirror expanded to ~600k row-dicts, JSON round-tripped into the subprocess and re-parsed at strategy construction. That consumed the 300 s smoke budget before bars were processed. This version references neither 'metrics' nor 'top_account_ratio' and instead uses the per-leg 'top_trader_ratio_by_instrument' series that subprocess_entry._add_per_leg_top_trader_ratio attaches (hourly, run-window filtered - two orders of magnitude smaller). Per-bar cost is unchanged in shape and O(log n): sorted numpy arrays built once in __init__, searchsorted bounds, one np.mean per leg. The same change also restores hypothesis fidelity: the previous iteration had to disclose that the literal per-name top-trader ranking key was infeasible and fell back to ranking by funding; it IS feasible via the per-leg wiring, so the cross-section is now ranked by exactly the smart-money positioning key the hypothesis specifies, with funding dropped from the signal entirely. Two further small carries: the weekly schedule is now calendar-anchored (days-since-epoch from bar.ts_event, restart-invariant) rather than an uptime bar counter, and 'funding_rates_by_instrument' remains referenced (in the module docstring, which is what the loader gate tests) purely so the engine charges each long perp leg its own funding - an 8-leg long-only perp basket that pays no funding would overstate returns. Disclosure kept from before: the multi-year mirror carries the POSITION-weighted top-trader ratio; the account-COUNT variant exists only in the recent daily shard and mixing them would put a level break inside the trailing percentile. Entry frequency: the gate is a percentile at 0.45, so on an ordinary week roughly half the universe qualifies and the book is normally full (3 names) - not a rare conjunction. Layers 1 and 2 are preserved: imports, class structure, the four required methods and the continuous finite signal (cross-sectional dispersion of conviction) are unchanged in shape.

Hypotheses

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 BTCUSDT.BINANCE-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 weekly cross-sectional rotation over 8 Binance USD-M majors (BTC, ETH, SOL, BNB, AVAX, LINK, ADA, XRP) ranked by a NON-PRICE key: each name's own top-trader (smart-money) long/short ratio, converted to its own trailing percentile so the names are comparable. Every 7 calendar days the book holds the top-3 names by that conviction percentile; an absolute cash gate requires a name's percentile to clear entry_level to be held at all, so when the informed cohort is de-risked across the universe nothing qualifies and the book sits in cash. Equal 30% notional per name (0.9x gross, no leverage).

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 BTCUSDT.BINANCE-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

SmartMoneyGatedMomentumRotationLong

Iteration History

Verification failed (Layer 4 — QA review): - The hypothesis's CORE EDGE is not implemented. The hypothesis explicitly states the ranking key is a genuine NON-PRICE signal — the TOP-TRADER long/short ACCOUNT ratio, ranked CROSS-SECTIONALLY to hold the 3 names with highest smart-money conviction. But in _rebalance() the cross-section is ranked purely by PRICE momentum (close[-1]/close[-1-lookback]-1); the top-trader ratio is used ONLY as a single BTC-wide on/off cash gate, never as the per-name selection key. The developer's own docstring admits this ('the cross-section is ranked by the feasible survivor key (price relative-strength)'). The hypothesis's entire stated edge (informed-trader relative conviction across names) is absent; what ships is the already-deployed price-momentum rotation plus a regime gate — a materially DIFFERENT strategy. - Because selection reverts to trailing price relative-strength across a majors basket, the implemented mechanism collapses to the 'cross-sectional momentum rank' class with a zero-survivor record (L7). The hypothesis was only defensible by being orthogonal to the deployed momentum basket; as coded it is NOT orthogonal — it is that basket with a BTC gate. - Sandbox is decisively negative and below the measurability floor: total_return -31.2%, Sharpe -1.69 (CI [-3.01, -0.06]), profit_factor 0.175, avg_trade_return_pct -7.17%, max_drawdown 35.8%, over only 14 trades / 362 days. Inverted reward/risk (avg_loss $4731 vs avg_win $1107).

Iteration History

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BTCUSDT.BINANCE-1-DAY-LAST-EXTERNAL, Bars processed: 363 Diagnostics: should_enter() returned a side 0 times over 324 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds. Ensure your strategy produces trades with the given data and parameters.

Iteration History

Verification failed (Layer 4 — QA review) [class=hypothesis_mismatch]: - [edge_concern] Sandbox is non-informative: metrics_reliable=false, total_trades=1, PF 0.0, one position held 2135 days with end_unrealized 118%. The +140% return is single-name buy-and-hold beta (benchmark_correlation 0.77), not a rotation edge — no performance read is possible. - Core edge absent and contradicted: the hypothesis ranks by each name's OWN top-trader long/short account ratio and explicitly excludes funding-carry, but the code substitutes per-name FUNDING as the ranking key (infeasible per-name metrics → no metrics_by_instrument). It implements exactly the carry signal the hypothesis says it is NOT, overlapping a deployed basket. - The weekly 8-major top-3 rotation degenerated to single-name buy-and-hold (1 trade, 2135-day hold, ~30% single leg). Likely cause: funding_rates_by_instrument key mismatch for the 7 extra legs leaves only the BTC fallback wired → ranked has one entry → k=min(3,1)=1 → buys BTC once, never rotates.
Strategy report

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