XrpOpenInterestConfirmedTrendLS1D
Hypotheses
XRP USD-M Open-Interest-Confirmed Trend, Long-Short (Single-Instrument BINANCE Perp, Daily Bars + Deep OI History, Trade Trends Only When Open Interest CONFIRMS the Move, Trend-Cross Exit, Low-Parameter)
Hypotheses
A LONG-SHORT, SINGLE-INSTRUMENT trend-continuation strategy on XRPUSDT.BINANCE (USD-M perpetual, DAILY bars) whose differentiator is an OPEN-INTEREST CONFIRMATION filter applied to the factory's one repeatedly-validated edge family (momentum/trend). It is the deliberate, analyst-endorsed RELOCATION of the OI-confirmation mechanism that failed twice on Hyperliquid: the HL OI strategies died on a structural data-coverage wall (HL OI history covers only a recent ~7-week tail), and the analyst's explicit note was to 'target a venue/symbol with verified multi-year OI coverage (e.g. Binance USD-M majors where the OI history is deep).' This does exactly that, on a liquid Binance USD-M major (XRP) with deep OHLCV AND deep OI history, so the walk-forward windows and the held-out recent tail span genuine multi-regime data — addressing the recent-regime NON-GENERALIZATION that killed the short-window HL impulse strategy. It is also a CONTINUATION (confirmation) design, the opposite polarity of the failed HL OI-divergence FADE, and it uses the trend-cross exit geometry of the validated trend family — NOT the inverted small-TP/large-stop payoff that broke the COIN-M Bollinger strategy. It avoids every other landmine: NOT Deribit options (broken harness), NOT HL microstructure (data wall), NOT funding-carry on decayed majors, NOT a single-symbol intraday breakout/session effect. It fills the long/short direction bucket (14.6% vs the 85.4% long-only over-weight) and diversifies the portfolio on a near-unused DATA dimension (open interest), while choosing XRP specifically because the BTC/ETH/SOL pure-price time-series-momentum-LS siblings already exist — so this is not a duplicate of them. Tiny parameter count (4), with the OI filter expressed as a robust SIGN test (not a tuned magnitude) to avoid the sensitivity cliffs that sank prior strategies.
Hypotheses
Iteration-5 fix for the backtest gate's 'metrics unreliable: 4 trades / 2433 data days'. Root cause is in the data plumbing, not the logic: the injected `open_interest` (fapi mirror) series for XRPUSDT covers only 2026-03-23 -> 2026-09-05, so the OI-confirmation gate could physically only fire in the last ~5 months of the 6.7-year window — hence 4 trades. The `metrics` feed carries the SAME open_interest column with the multi-year depth the hypothesis explicitly relocated to Binance USD-M for (2021-12 onward). The only change is inside _load_oi: it now merges both feeds, day-bucketed (last observation per day kept, real observation timestamps preserved so lookups stay strictly point-in-time and cheap). Offline replay of the exact entry/exit rules on the catalog's XRPUSDT daily bars reproduces the old 4 trades with the fapi-only series and yields 42 trades (2021-12-10 -> 2026-09-03) with the merged series — well past the >=5-trade evidence bar and spanning multiple regimes. Signal, entry gate, exit geometry, sizing, parameters and bounds are unchanged, so every earlier verification layer stays green.
Hypotheses
Negative expectancy on a reliable, decisive 42-trade / 6.5-year sample (effectively full XRP history): profit_factor 0.56, total_return -15.4%, avg_trade_return_pct -2.75% (BELOW ZERO, well under the 0.15% USD-M fee floor), Sharpe -0.38, expectancy -$388/trade. Commission is only 1.62% of gross, so this is NOT fee-fragility — the OI-confirmed trend-continuation signal is gross-negative. The trades correctly implement the hypothesis (OI-rising gate, balanced long/short trend continuation, trend-cross exit), so this is a fair test, and the premise is falsified: the strategy loses in EVERY vol regime (calm -4.9%, normal -11.0%, stressed -0.09%) and in 3 of 5 calendar years, with a 0.29 win rate and 15 max consecutive losses. QA's edge concern is borne out on full history — the OI-rising confirmation adds nothing over plain trend and is measurably net-negative. The optimizer cannot invert a PF-0.56, below-zero-expectancy signal; there is no positive gross edge to tune toward. Matches L73 (single-perp OI/funding/premium-gated directional trade — abandon rather than authorize the 3-phase run). Not worth 2 hours of optimization.
Implementation
Long-short daily trend-continuation on XRPUSDT.BINANCE USD-M perp. Trend = (SMA20 - SMA60)/SMA60 as a continuous signal; entries are taken only when OPEN INTEREST is RISING over the confirmation window (a robust sign test on point-in-time OI), i.e. fresh positioning confirms the move. Exit is the opposite SMA cross (trend-family geometry) with a wide 4xATR protective backstop. Risk-based sizing (2% of equity per ATR-stop distance), no leverage.
Verification Results
Verify the base FactoryStrategy consumes the overridden min_bars_required for warm-up gating; if not, rename to a private helper (e.g. _min_bars) and use it internally.
Verification Results
min_bars_required(self) overrides a framework method the base template also defines. Synthetic tests and the sandbox both ran and traded, so the override is behaving, but confirm the base's on_bar gating honors the strategy's value rather than the base default.
Verification Results
The sandbox here is NOT a short truncated smoke test — it spans 2399 data days (~6.5y, effectively the full XRP history) with 42 trades, and the numbers are uniformly poor: total_return -15.4%, Sharpe -0.39 (CI [-1.18, 0.35]), profit_factor 0.58, avg_trade_return_pct -2.75%, and NEGATIVE returns in every vol regime (calm -4.4%, normal -11.2%, stressed -0.4%). avg_loss (1261) is close to avg_win (1631) but win_rate is only 0.31, and 15 max consecutive losses. This is the unoptimized default param draw, so the optimizer may find a better region, but the OI-confirmation continuation edge is measurably weak/absent on the default parameterization across all regimes — the analyst should weigh whether the OI-rising gate adds anything over plain trend before spending 2h optimizing. Commission is only 1.58% of gross, so this is an edge problem, not a fee problem. Flagging for the backtest reviewer; not a code fault.
Backtest Review
OI merge fix worked mechanically: 42 trades over 2433 data days, balanced long/short (19/23), 95% exposure, entries fire across the full multi-year window (the '4 trades' data-coverage problem is resolved).
Backtest Review
Trades implement the hypothesis: OI-rising-confirmed trend continuation, balanced long+short, trend-cross exit geometry — no mechanism mismatch, so this is a fair test of the premise.
Backtest Review
Not a fee problem: commission only 1.62% of gross.
Backtest Review
Negative expectancy on a reliable 42-trade / 6.5-year sample: profit_factor 0.56, total_return -15.4%, avg_trade_return_pct -2.75% (BELOW ZERO, far under the 0.15% USD-M fee floor), Sharpe -0.38 (CI [-1.16, 0.35]), expectancy -$388/trade.
Backtest Review
The OI-confirmation gate is measurably falsified: NEGATIVE in every vol regime (calm -4.9%, normal -11.0%, stressed -0.09%) and negative in 3 of 5 calendar years (2022 -2.1%, 2023 -11.3%, 2024 -11.1%). Win rate 0.29 with 15 consecutive losses.
Backtest Review
This is the single-perp supplementary-gated directional trade signature (L73): OI/funding/premium gates have repeatedly failed to add robustness — this one is gross-negative before optimization can even help.
Backtest Review
avg_win ($1725) barely exceeds avg_loss ($1234) but the 29% win rate makes the payoff net-negative — the OI-rising gate does not select winning trends over plain trend.
Analysis
Backtest gate:
- metrics unreliable: 4 trades / 2433 data days is too little evidence (need >=5 trades over >=10 days) — increase signal frequency or widen the window
Iteration History
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: XRPUSDT.BINANCE-1-DAY-LAST-EXTERNAL, Bars processed: 2327
Diagnostics: should_enter() returned a side 0 times over 2266 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] Not a profitability doubt — the single-BTC sandbox is strong (total_return ~1040%, PF 2.62, Sharpe 0.88, avg_trade_return_pct 11.9%) and the trend mechanism is clearly sound on BTC. The block is purely that the implementation under-covers the hypothesis's stated instrument scope. If the pipeline formally re-scopes this run to a single-asset BTC spot trend overlay (updating the hypothesis text), the code would pass cleanly.
- Instrument-scope mismatch. The hypothesis is a MULTI-INSTRUMENT, three-asset fixed-weight overlay across BTCUSDT, ETHUSDT and SOLUSDT on BINANCE_SPOT, and its risk thesis explicitly depends on holding all three sleeves simultaneously ('diversified across three names so no single asset dominates') and on filling the 'multi-instrument scope' bucket. The code implements only ONE sleeve: config.instrument_id is BTCUSDT.BINANCE_SPOT with empty extra_instruments/extra_bar_types, and the class holds BTC alone. Two of the three named assets (ETH, SOL) and the diversification property that is load-bearing in the hypothesis are absent, so a 3-asset diversified-basket hypothesis would be validated by a 1-asset backtest. The developer's reason is legitimate (the iteration-1 multi-leg CASH-spot book hit a real engine equity-aggregation artifact producing impossible +22,716% days, and the analyst endorsed isolated single-instrument sleeves as a diagnostic), but as submitted the code does not implement the hypothesis as written.
- Static analyzer flags divisions by sma and px. Both are guarded (sma<=0 returns None; px falsy/<=0 returns Decimal(0)). False positives — no fix needed.
Backtest and paper results are hypothetical. Trading involves risk of loss.