Skip to content

View original

OiConfirmedTrendLongBtc4H

Hypotheses

Open-Interest-Confirmed Weekly Momentum Majors Basket, Long-Only, Delta-Rebalanced (BINANCE USD-M, 5 Deep Majors, Hold Names Trending UP on RISING Open Interest — Fresh-Money Trends, Skip Hollow Short-Covering Rallies, Trade Only the Delta, 2-Parameter)

Hypotheses

A LONG-ONLY, low-turnover majors basket on 5 DEEP BINANCE USD-M perpetuals (BTCUSDT, ETHUSDT, SOLUSDT, BNBUSDT, XRPUSDT — chosen for depth to avoid the alt capacity/impact-cost death that killed the AVAX and ETH+SOL carries) whose selection signal is OPEN INTEREST confirmation of trend — a supplementary input that NO promoted or pipeline basket uses (satisfying L24's requirement for a genuinely new signal, not another relative-strength re-weight). The core insight, and the deliberate INVERSE of the OI-divergence fade that just failed (L-recent, fee_edge on 1H): a price uptrend accompanied by RISING open interest reflects fresh leveraged capital entering and committing to the move (a durable, fundable trend worth riding), whereas a price uptrend on FALLING open interest is a hollow short-covering bounce that lacks follow-through. So the basket holds only names that are simultaneously (a) trending up on price AND (b) building open interest, and stays in cash on names that fail either test. Critically, it is engineered against the two dominant killers: FEE_EDGE — weekly cadence with DELTA-ONLY rebalancing (only trade names entering/leaving the set; hold persisting names; skip sub-threshold changes) keeps turnover and commission drag minimal while weekly holds of trending majors deliver multi-percent per-trade moves far above the 0.15% futures floor; OVERFIT — only 2 free parameters (a single shared lookback and a BTC-regime MA), no per-name tuning. It fills the long-only-basket-with-a-novel-structural-signal slot rather than re-deploying momentum relative-strength (deployed) or funding carry (now demonstrably dying on alt fees/capacity).

Hypotheses

Iteration 2 fixes all three Layer-4 failures by correcting the fundamental, un-realizable premise. Investigation confirmed the engine injects `open_interest` for the PRIMARY instrument only (OI parquet exists per-symbol on disk, but only funding is expanded per-leg into a *_by_instrument dict) — so the previous 5-name basket could never receive each leg's own OI and fell back to a single shared BTC OI, collapsing the novelty into plain momentum (QA's blocking finding). The only way to genuinely realize the hypothesis's core edge — a name's own uptrend confirmed by its own rising OI — is to trade the single instrument whose OI is actually available. So: (1) NOVELTY RESTORED — the OI-rising gate now uses BTCUSDT's own OI, a real, non-collinear confirmation distinct from the regime MA, not a market-wide proxy; the strategy is no longer degenerate momentum. (2) SANDBOX FIXED — switching 1-DAY → 4-HOUR gives the sandbox a proper ≥200-bar / ~33-day window (vs the broken 2-day/2-return run), and the 30-bar OI lookback (~5 days) sits well inside it. (3) SOL PREC BUG REMOVED — no SOL leg; sizing uses BTCUSDT's correct size precision (3). The hypothesis's other design pillars are preserved: FEE_EDGE via low turnover (OI-change over 30 4h bars + multi-day trend holds; a dry-run showed only 7 entry/exit cycles over 220 bars, each a multi-day hold that clears the ~0.10% round trip); OVERFIT via just 2 free parameters (lookback, regime_ma), no per-name tuning. Venue remains BINANCE USD-M futures because OI is a perp-only construct the edge depends on; long-only, leverage 1.0 (referenced in sizing, no leverage_set_but_unused). Imports unchanged and clean; the signal is continuous (momentum ratio) with the entry decision thresholded in should_enter, and uses the clean base single-position hooks. I documented the single-instrument scope explicitly so the analyst understands it is the faithful, data-feasible realization of the per-name-OI novelty rather than the un-realizable 5-name basket.

Hypotheses

Non-diagnostic due to open-interest data coverage — not optimizable. The backtest window spans 2019-2026 (14,376 bars processed) but every trade and return falls in a single ~32-day window in 2026-04/05: annual_returns has only 2026, data_days=32, total_trades=14. The strategy is flat for ~6 years because entries require _oi_rising and the injected open_interest series only begins ~2026, so _oi_at() returns None for all earlier timestamps. This is not a wrong-key parse bug (that would produce zero trades; it produced 14 where OI exists) — the OI history genuinely covers only ~2026. As a result Sharpe 1.96, PF 1.88, and win_rate 0.50 are unmeasured noise on 14 trades (L16), and total_return 3.67% is one 2026 month with no multi-regime evidence. A 2-hour optimization cannot proceed: walk-forward needs 3 windows x 75 trials across multiple regimes and there is only ~1 month of OI-active data to fit — it would fit noise. The blocker is structural, not a code fix the developer can make: the engine injects open_interest for the primary instrument only (already forcing the 5-major basket down to single-instrument BTC, per the code's own note), and the OI history depth here is ~32 days, so the OI-confirmation signal cannot be validated over multiple regimes on this venue. Stating the symptom rather than over-claiming the collection mechanism: the OI series supplied to this backtest covers only ~2026. META-NOTE FOR RESEARCH LEAD / DATA ENGINEER: OI-gated strategies are non-diagnostic until multi-year open_interest history is confirmed available and injected per-instrument. Before any further OI-signal hypothesis is queued, verify OI coverage depth for the target instrument; do not resubmit this mechanism until a multi-year OI series is in the catalog, and note that per-name OI is unavailable to multi-instrument baskets so basket-shaped OI hypotheses are not realizable at all under the current engine.

Implementation

Long-only, single-instrument OI-confirmed trend on BTCUSDT.BINANCE USD-M perpetual, 4-hour bars. It holds a long only while the instrument's OWN price is trending up (close > close `lookback` bars ago) AND its OWN open interest is rising (OI now > OI `lookback` bars ago — fresh leveraged money committing to the move) AND price is above its `regime_ma` moving average (risk-on). It goes flat whenever any of the three tests fails (trend broke, OI stopped building — a hollow short-covering rally to skip — or regime turned off). Open interest is read from the primary instrument's own injected `open_interest` supplementary series, parsed once into sorted numpy arrays with O(log n) lookups anchored to the bar interval. Sizing is equity × position_frac × leverage / price, rounded to BTCUSDT's size precision. Only 2 free parameters: lookback and regime_ma.

Verification Results

Verification failed (Layer 4 — QA review): - The hypothesis's SOLE novelty — per-name OPEN-INTEREST confirmation (each name held only when ITS OWN price uptrend is confirmed by ITS OWN rising OI; L24 requires a genuinely new signal, and the hypothesis explicitly says this must NOT be re-deployed momentum relative-strength) — is NOT realized. The collector injects open_interest for the PRIMARY instrument only (BTCUSDT), and the code falls back to that single BTC OI series for ALL 5 names (`if ts is None or ts.size == 0: ts, val = primary_oi`). Every name shares the same BTC OI, so _oi_rising() returns an identical market-wide boolean, applied alongside the BTC-above-regime_ma gate — two correlated BTC-wide filters. The per-name discriminator collapses to plain price momentum, degrading the strategy into a BTC-OI/regime-gated majors MOMENTUM basket — exactly the deployed relative-strength mechanism the hypothesis/L24 said to avoid. The novel edge is absent for 4/5 names. - Sandbox is NON-DIAGNOSTIC/broken: data_days=2, metrics_reliable=false ('only 2 daily returns'), exposure_pct=700%, 6 trades, impossible avg_holding_period '24d 12h' in a 2-day window. A 1-DAY strategy needing 41-bar warmup cannot have meaningfully traded on 2 days. Likely the injected OI series/bar window spans only ~2 days, which also guts _oi_rising()'s 20-day lookback (reading missing data). Cannot assess performance or even correct trading from this run. - prec_map hardcodes SOL size precision = 0, rounding SOL quantity to whole coins, which can round down materially or to 0 (silently dropping the SOL leg). CLAUDE.md lists SOLUSDT size precision 3, not 0.

Verification Results

Analyst: evaluate on the full-window backtest; the OI-gated single-instrument design means fewer trades, so ensure the window is long enough to be diagnostic.

Verification Results

Sandbox is non-diagnostic: 13 days / 14 trades with Sharpe CI [-9.75, +10.31] and PSR 0.77 — cannot distinguish edge from noise. Signs are encouraging, not conclusive: total_return +3.67%, PF 1.85, avg_trade_return_pct +0.4274% (above the 0.15% futures floor NET of fees), skew +1.36.

Verification Results

Analyst: confirm avg_trade_return_pct stays comfortably above 0.15% net once turnover is measured on the full window; consider hysteresis/min-hold on the OI exit to lengthen holds.

Verification Results

Turnover higher than the hypothesis's 'low turnover / multi-day holds' promise: commission 16.16% of gross, avg hold only 1d 16h. The 3-way exit (flat when price_up OR oi_rising OR regime_on fails) on 4H bars re-enters more often than intended. Net per-trade still clears the floor (+0.4274%), but fee headroom is thinner than designed.

Verification Results

Analyst/research lead: record this is a single-instrument BTC realization, not the 5-name basket; if a basket is wanted, the data engineer must inject open_interest_by_instrument for all majors first.

Verification Results

SCOPE CHANGE (authorized): the hypothesis describes a 5-name majors BASKET, but the strategy is now SINGLE-INSTRUMENT BTCUSDT — the reframe I explicitly sanctioned in iter-1 (per-name OI is only injected for the primary instrument, so the basket collapsed to momentum). Trading only BTC realizes the OI novelty but drops the diversification/basket bucket.

Backtest Review

Coherent, genuinely novel signal (OI-confirmation of trend) faithfully implemented; correctly pivoted to single-instrument BTC given the engine injects OI for the primary instrument only

Backtest Review

Where OI data exists, mechanics work: 14 trades, avg_trade_return_pct 0.43% (above the 0.15% futures floor), long-only sizing/exits correct

Backtest Review

Only 2 parameters — low overfit surface by design

Backtest Review

Non-diagnostic sample: only 14 trades over 32 effective days — the strategy is flat for all of 2019-2025 and trades only in 2026-04/05

Backtest Review

Root cause: the open_interest series supplied to the backtest only covers ~2026, so _oi_rising is False for the entire earlier history and no entries fire

Backtest Review

Sharpe 1.96 / PF 1.88 / win_rate 0.50 on 14 trades are unmeasured noise (L16); metrics_reliable=true is misleading given data_days=32

Backtest Review

total_return 3.67% is a single 2026 month — no multi-regime evidence and cannot support a walk-forward optimization

Backtest Review

commission_pct_of_gross 16% on this tiny sample

Backtest Review

2026 only

Backtest Review

multi-year

Outcome Summary

OiConfirmedTrendLongBtc4H proposed a genuinely novel signal — open-interest confirmation of trend, the deliberate inverse of a just-failed OI-divergence fade — to hold majors trending up on rising OI while skipping hollow short-covering bounces. It was honestly pivoted from the intended 5-major basket to single-instrument BTC once the developer recognized the engine injects OI only for the primary instrument, and the mechanics were faithful where data existed. But the OI series supplied to the backtest covered only ~2026, so the strategy sat flat for roughly six years and produced just 14 trades in a single ~32-day window — a statistically meaningless sample no optimization could use. The reviewer abandoned it as non-diagnostic on structural data-coverage grounds, escalating that OI-signal hypotheses should not be resubmitted until a multi-year, per-instrument OI series is confirmed in the catalog, and that basket-shaped OI designs are simply not realizable under the current engine.

Outcome Summary

OI-gated strategies are non-diagnostic until multi-year open-interest history is confirmed available and injected per-instrument — OI coverage depth must be verified before queuing any OI-signal hypothesis, and because the engine supplies OI only for the primary instrument, basket-shaped OI hypotheses are not realizable at all under the current engine.

Outcome Summary

The backtest reviewer returned 'abandon' at the pre-optimization gate: the result was non-diagnostic due to open-interest data coverage of only ~2026, leaving one month of OI-active data across a 6.5-year window — too few trades and no multi-regime coverage to support walk-forward optimization — and the blocker was structural (the engine injects OI for the primary instrument only, already forcing the basket down to single BTC, and the OI history depth is ~32 days), not a code fix.

Outcome Summary

A long-only, open-interest-confirmed trend strategy — originally conceived as a 5-major USD-M basket but pivoted to single-instrument BTCUSDT.BINANCE (4h bars) — that held long only while price was trending up AND the instrument's own open interest was rising (fresh leveraged money committing to the move), skipping hollow short-covering rallies on falling OI, gated by a regime MA, with 2 parameters.

Outcome Summary

The backtest fired only 14 trades, all within a single ~32-day window in April-May 2026, because the injected open_interest series only covered ~2026 (so the OI-rising gate was false and no entries fired across 2019-2025). Where it traded, mechanics worked (avg_trade_return_pct 0.43% above the futures floor, profit factor 1.88, Sharpe 1.96, win rate 0.50), but on 14 trades over 32 days those are unmeasured noise with commissions at 16% of gross and total return of just 3.67% from one month. No optimization stage ran.

Iteration History

OiConfirmedWeeklyMomentumMajorsBasketLong
Strategy report

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