SolEthDollarNeutralRatioTrendPair
Hypotheses
SOL/ETH Dollar-Neutral Relative-Momentum Trend, Long-Short Pair (Trade the SOL-vs-ETH Ratio's Own Trend, Binance USD-M Perps, Daily Bars, EMA/Momentum Sign, Market-Neutral, Low-Parameter)
Hypotheses
A MARKET-NEUTRAL (dollar-neutral) LONG-SHORT PAIR strategy that applies the factory's one repeatedly-validated edge — time-series momentum/trend — to the SOL/ETH price RATIO rather than to a single outright asset. When the SOL-vs-ETH ratio is trending up (SOL outperforming), it holds LONG SOLUSDT.BINANCE / SHORT ETHUSDT.BINANCE in equal notional; when the ratio trends down, it flips to SHORT SOL / LONG ETH. Both legs are Binance USD-M perps, so it is a single-venue, single-quote-currency book with no cross-venue fee/basis problem (the structural killer of the funding/carry siblings this session). The design deliberately combines the TWO things that have separately worked or would have helped in the failure log: (1) the validated TREND mechanism and its positive-skew payoff geometry (let winners run, trend-cross exit — NOT the inverted small-TP/large-stop fade that broke the COIN-M Bollinger), and (2) MARKET-NEUTRALITY, which strips out BTC/market beta so the held-out recent tail is not a single-regime directional bet — directly addressing the recent-regime NON-GENERALIZATION that abandoned the HL impulse strategy at the holdout gate. It trades the SOL-vs-ETH dispersion (capital rotates between correlated L1 majors in persistent waves), an edge orthogonal to outright momentum. It is distinct from every pipeline entry: not the 10-name dollar-neutral cross-sectional book (this is a focused 1-vs-1 ratio trend), not the BTC/ETH Bollinger pair (this is EMA/momentum-sign trend on the SOL/ETH ratio, a different pair and a different signal), and not any single-asset TS-momentum sibling. It is NOT a blacklisted family: not funding/carry, not options, not HL, not microstructure, not a fade. Deep multi-year Binance history for both legs means walk-forward and holdout span real regimes; low parameter count (3) resists overfitting. Fills the under-weight long/short (14.7%) and pairs (14.5%) buckets.
Hypotheses
Iteration-5 fix for the persistent Layer-3 timeout ('smoke test exceeded 300s wall-clock'). Investigation of the harness (pipeline_processor SANDBOX_BACKTEST_TIMEOUT=300, max_stale_seconds=120) plus the base template (which caps _bars/_extra_bars at 500) confirms the strategy's per-bar work is ALREADY O(1) — iteration 4 replaced the O(N) EMA rebuild with incremental O(1) EMA state, and SyncedBuffer.update is O(1). There is no remaining per-bar-scales-with-history cost, so the generic 'precompute/bisect' guidance does not apply here. With provably-O(1) per-bar code, the only remaining wall-clock driver is DATA VOLUME set by the bar_type: a fine timeframe over multi-year Binance history for two legs (tens of thousands of bars each, plus a multi-year on-demand download) is what exceeds the 300s subprocess cap. The hypothesis explicitly specifies DAILY bars, so the fix is to pin both legs to 1-DAY (~2000 bars/leg, pre-collected, runs in well under a second) — the smallest change that eliminates the timeout. The signal/entry/exit/sizing code that already passed Layers 1-2 is left byte-identical (no new imports, no logic change), so no earlier-layer regression is possible; only the config bar_type/extra_bar_type granularity changed.
Hypotheses
failed deflated Sharpe: DSR=0.0001, expected-max=1.2866 over 225 trials — the selected optimized Sharpe (0.467) sits below the best-of-N luck bar and is statistically indistinguishable from noise (is_significant=false, sharpe_ci_low=-0.3002 straddling 0, PBO=0.672>0.5; probabilistic_sharpe 0.9816 vs DSR 0.0001 is the textbook PSR-vs-DSR selection-inflation trap). The walk-forward is is_overfitted=TRUE: avg IS 0.590 collapses to avg OOS -0.277 with windows [1.108, -0.420, -1.520], two of three negative and the most recent deeply negative. The holdout 'pass' is SPURIOUS — ratio 0 because it is measured against a NEGATIVE WF-OOS baseline (-0.277), so holdout_sharpe 0.731 is a single lucky window, not forward generalization. Sensitivity is clean (0 cliffs) but the ENTIRE grid sits ~0.33-0.42 Sharpe, uniformly below the 1.2866 luck bar, so there is no robust region above significance to tune toward. benchmark_meaningful=false (market-neutral), so judged on absolute risk-adjusted metrics it still fails: Sharpe 0.39 base / 0.47 optimized with a CI through zero, and the edge is outlier/bull-dispersion-carried (return_kurtosis 768/785, skew 26; annual 2021 +140% and 2024 +132% carry the track while 2022 -8%, 2023 -13%, 2025 -12% all lose) with a negative information ratio (-0.30/-0.39). Not iterate (attempt 1 of 2): the binding failures are structural — a below-luck-bar Sharpe, DSR ~0, PBO 0.67, and an overfit walk-forward with two negative OOS windows — and a further best-of-225 sweep re-selects a sub-significant config from a surface that is entirely below significance. Not revise_hypothesis: SOL/ETH on Binance USD-M is a valid, data-rich target and this is high-IS/negative-OOS overfitting on a fine instrument, not a proven mechanism stranded on a dead one. FAILURE PATTERN: applying the validated TS-momentum/trend mechanism to the SOL/ETH log-ratio as a dollar-neutral pair does NOT inherit promotability — the ratio-trend edge is concentrated in the 2021/2024 SOL-outperformance dispersion waves (kurtosis 768, two big years carrying an otherwise-losing track), so the best-of-225 optimized Sharpe (0.467) cannot clear its own 1.2866 luck bar (DSR 0.0001, PBO 0.672, is_overfitted with OOS [1.108, -0.420, -1.520]). A clean 0-cliff sensitivity surface, a modestly improved optimized refit, and a holdout ratio inflated by a negative WF-OOS baseline measure consistency, not significance or forward-generalization.
Implementation
Market-neutral (dollar-neutral) LONG-SHORT pair on the SOL/ETH log price ratio, both Binance USD-M perps on DAILY bars. An EMA-crossover on log(SOL/ETH) (fast minus slow) is a continuous per-bar trend signal: when SOL is out-trending ETH it holds LONG SOL / SHORT ETH in equal notional (~0.5x per leg, ~1.0x gross), and it flips to SHORT SOL / LONG ETH when the trend inverts — a stop-and-reverse trend-cross system (winners run between crosses). A strict two-leg state machine keeps the book either a clean opposite pair or fully flat (orphan/same-side hedges are force-closed and re-entry deferred a bar), so no reversal-day leg stacking or leaked directional beta. Per-bar cost is O(1) (incremental EMA + O(1) timestamp-alignment via SyncedBuffer).
Verification Results
Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit. 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).
Backtest Review
Mechanism matches hypothesis exactly: 32 long-pair + 32 short-pair round trips, equal legs, ~61-day trend holds, stop-and-reverse on the log(SOL/ETH) ratio — no leg-stacking or mechanism mismatch.
Backtest Review
Genuinely dollar-neutral: beta 0.198, benchmark_meaningful=false; the two-leg book strips most market direction.
Backtest Review
Adequate sample for a daily pair (64 trades over 5.5 years / 2003 days), clean entry diagnostics (32 signaled = 32 submitted, zero size/notional/cash drops).
Backtest Review
Positive net edge after fees: total_return +317%, profit_factor 1.14, avg_position_pct 62%, commission only 0.61% of gross — not fee-fragile.
Backtest Review
Three-parameter design with an unexplored tuning space (ema_fast 20 / ema_slow 60 / entry_thresh 0.0) — defaults may be suboptimal, which is what optimization exists to test.
Backtest Review
Base Sharpe only 0.387 with sharpe_ci_low = -0.51 — the 95% CI straddles zero, so the base edge is not statistically distinguishable from noise.
Backtest Review
63.5% max drawdown and 116% annualized vol contradict the 'market-neutral / not a directional bet' framing — it behaves like a high-vol leveraged bet on the SOL/ETH ratio.
Backtest Review
Returns are outlier/bull-dispersion-carried (return_kurtosis 768, skew 26): 2021 +200% and 2024 +144% generate essentially all profit, while 2022 (-20%), 2023 (-32%) and 2025 (-27%) lose — a regime-concentration problem optimization cannot fix.
Backtest Review
923-day max-drawdown duration; information_ratio -0.30.
Backtest Review
High risk of failing the downstream deflated-Sharpe / PBO / recent-regime holdout gates — this profile is the recurring post-optimization abandonment signature.
Backtest Review
weak; CI (-0.51, 0.80) includes 0
Backtest Review
very high for a claimed market-neutral book
Backtest Review
adequate sample for daily pair optimization
Backtest Review
positive but thin edge
Backtest Review
reasonable gross for a 2-leg book
Analysis
Mechanism is sound and matches the hypothesis: clean dollar-neutral SOL/ETH ratio-trend, balanced 32/32 (base) and 36/36 (optimized) long/short pairs, no leg-stacking artifact; the iteration-3 neutrality state machine held.
Analysis
Sensitivity surface is clean (0 cliffs) and low beta (0.15) confirms genuine market-neutrality.
Analysis
Optimizer modestly improved point metrics (Sharpe 0.387->0.467, PF 1.14->1.34, max_dd 63%->43%) by trimming gross.
Analysis
Fails deflated Sharpe: DSR=0.0001, is_significant=false, PBO=0.672, optimized Sharpe 0.467 below the 225-trial expected-max luck bar of 1.2866; sharpe_ci_low=-0.3002 straddles 0.
Analysis
Walk-forward is_overfitted=TRUE: avg IS 0.590 collapses to avg OOS -0.277 with windows [1.108, -0.420, -1.520], two negative and the most recent deeply so.
Analysis
Holdout 'pass' is spurious: ratio 0 because measured against a negative WF-OOS baseline (-0.277); holdout_sharpe 0.731 is a single positive window, not forward generalization.
Analysis
Entire sensitivity grid sits ~0.33-0.42 Sharpe, uniformly below the luck bar — no robust region above significance.
Analysis
Edge is outlier/bull-dispersion-carried (kurtosis 768/785, skew 26): 2021 +140% and 2024 +132% carry the track while 2022/2023/2025 all lose; negative information_ratio (-0.30/-0.39).
Analysis
PSR 0.9816 vs DSR 0.0001 is the textbook selection-inflation trap.
Analysis
Do NOT proceed to optimization — the backtest is corrupted by a leg-stacking / non-neutral accounting artifact that your iteration-3 fix did NOT eliminate. Proof: daily_returns still contains 2021-07-24 = +232.39% and 2024-02-25 = +199.45%, the exact impossible values your own docstring names as the bug you tried to fix. A ~1x-gross dollar-neutral SOL/ETH pair cannot return +232% in a day (the SOL/ETH ratio's worst daily move is ~±20%, so a 0.5x-per-leg book gains ~5-10% at most). Until this is fixed the reported 317% total / 200%/144% annual is meaningless — it is two artifact days; every other year loses money.
What to investigate (symptoms, verify the mechanism yourself — don't assume my guess):
1. The state machine still leaks a transient multi-leg / over-gross book on trend-cross REVERSAL bars. Your should_enter closes the orphan ETH leg and defers entry one bar, and _submit_entry re-checks _eth_dir()!=0 — but the detonation days coincide with reversals, so a stale ETH leg (or a double-counted SOL leg) is almost certainly still being marked-to-market alongside the fresh pair for at least one bar. Trace the exact cache state on 2021-07-24 and 2024-02-25: how many open positions per instrument, what side, what quantity.
2. Check whether the exit-then-reenter across bars ever leaves BOTH a closing and an opening leg live within the same bar's PnL snapshot (the base template gates only the primary SOL leg; the manual ETH _submit_entry_instrument / _submit_exit_position ordering may not settle within one bar).
3. Add an explicit invariant/assert: at end of every bar the book is EITHER fully flat OR exactly one SOL leg + one opposite-side ETH leg of equal notional. Log a violation rather than silently detonating.
Acceptance criteria before re-submitting for review: (a) NO single-day return exceeds ~±25%; (b) annualized_volatility falls to a neutral-book range (~15-40%, not 116%); (c) return_kurtosis and skew drop to sane values (kurtosis < ~20). Only then is the reported edge real enough to be worth optimizing.
Outcome Summary
SolEthDollarNeutralRatioTrendPair took the factory's one repeatedly-validated edge — trend-following — and pointed it at the SOL/ETH log-ratio rather than an outright asset, holding equal-notional opposing legs on Binance USD-M perps to strip out market beta. It survived five coding iterations (fixing leg-stacking on reversal days, then two rounds of Layer-3 wall-clock performance work) and cleared the backtest-review gate with a verdict of 'optimize' on the strength of +317.7% total return, 64 clean trades and a beta of 0.198, despite an acknowledged weak Sharpe of 0.387 and a 63.5% max drawdown. Optimization confirmed the reviewer's stated fear: the best-of-225 configuration reached only Sharpe 0.467 against a 1.2866 luck bar, with DSR 0.0001, PBO 0.672, and a walk-forward whose in-sample 0.590 fell to -0.277 out-of-sample, the most recent window at -1.520. The analyst abandoned it as a textbook PSR-vs-DSR selection-inflation trap — the ratio-trend 'edge' was really two outlier years of SOL outperformance carrying an otherwise-losing track.
Outcome Summary
Transplanting a validated mechanism (TS-momentum) onto a new target (the SOL/ETH ratio) does not inherit its promotability — with return kurtosis of 768 and profits concentrated in the 2021 and 2024 dispersion waves while 2022/2023/2025 all lost, a clean sensitivity surface measures consistency, not statistical significance or forward generalization.
Outcome Summary
The analyst abandoned it after optimization: deflated Sharpe was 0.0001 against a 225-trial expected-max-luck bar of 1.2866, PBO was 0.672, is_overfitted was TRUE, and sharpe_ci_low (-0.3002) straddled zero — the holdout 'pass' was spurious because its ratio of 0 was measured against a negative walk-forward OOS baseline. Sensitivity was clean (0 cliffs), but the entire grid sat at ~0.33-0.42 Sharpe, uniformly below the significance bar, so there was no robust region to tune toward.
Outcome Summary
Apply the factory's validated time-series trend/momentum mechanism to the log(SOL/ETH) price ratio as a dollar-neutral long-short pair of Binance USD-M perps on daily bars, stripping out market beta while riding persistent SOL-vs-ETH dispersion waves.
Outcome Summary
The base backtest over 2,003 days returned +317.7% with a Sharpe of 0.387 (CI -0.51 to 0.80), 64 trades, 48.4% win rate, profit factor 1.14, and a 63.5% max drawdown; optimization improved the point metrics to Sharpe 0.467, +358.3% return, 72 trades, profit factor 1.34 and 43.0% max drawdown. Walk-forward told a different story: average in-sample Sharpe 0.590 collapsed to average out-of-sample -0.277 across windows [1.108, -0.420, -1.520].
Backtest and paper results are hypothetical. Trading involves risk of loss.