Skip to content

View translation

EthFourHourOpenInterestDivergenceReversalLS

Hypotheses

ETH Open Interest Divergence Reversal

Hypotheses

A futures-specific contrarian strategy on ETHUSDT that detects divergences between price action and open interest to identify exhaustion points. When ETH price makes a new local high but open interest is declining (bearish divergence), it signals that the rally is driven by closing shorts rather than new longs opening — weak conviction that tends to reverse. Conversely, when price makes a new local low but OI is rising (bullish divergence), it signals aggressive new short positioning that often triggers short squeezes. Uses 4-hour bars for signal generation with open interest supplementary data. The strategy compares a rolling N-bar price high/low against the slope of open interest over the same window to detect divergence. This is a crypto-native edge — OI data is uniquely available in crypto futures markets and provides information about positioning that traditional markets lack. Target ~80-150 trades per year on 4H ETH, with average holding period of 2-5 days.

Hypotheses

Iteration-2 minimal fix for the Layer-2 TypeError (_to_ns() takes 1 positional argument but 2 were given). Root cause: the OI-parsing helpers were declared as @staticmethod/@classmethod, but the Layer-2 _StrategyProxy rebinds class callables onto a stand-in instance, which discards the staticmethod descriptor and passes the proxy instance as an injected first positional argument — so a 1-param staticmethod is called with 2 args and raises. The fix moves _to_ns, _row_ts, and _row_val out of the class to module-level functions (_oi_to_ns, _oi_row_ts, _oi_row_val); module functions are never bound to an instance, so no self can be injected, and _ensure_oi_series now calls them directly. Nothing else changed: imports stay clean (Layer 1 green), and the divergence/signal/entry/exit/sizing logic the harness exercised is byte-identical, so no earlier-layer regression. Venue remains BINANCE USD-M futures (long-short needs margin), leverage 1.0 (unused in amplification, so the leverage_set_but_unused gate does not trigger).

Hypotheses

Structural OI-data-coverage limitation, not a fixable strategy issue. The engine processed all 14,016 bars of 6-year history but signaled only 9 entries — ALL in March-May 2026 (annual_returns has only a 2026 entry; every daily/monthly return is 2026-03 to 2026-05). With oi_slope_thresh=0.0 the OI condition is maximally permissive, so a 20-bar new-high/new-low would fire hundreds of times over 6 years IF open-interest data were present; getting 9 trades confined to a ~2-month window means the open_interest supplementary feed only covers ~2 months of early 2026. The code is now correct (the iter-2 OI-parsing fix produces 9 trades vs the prior 0, clean entry gate), so this is a data-availability constraint, not a logic or parameter problem. The strategy has no price-only fallback (the entire edge is the OI signal), so it is untestable without multi-year OI history the factory has not collected, and 9 trades in a 2-month window cannot support walk-forward or a representative holdout. Not iterate: no code or parameter change extends the OI history — the developer cannot manufacture open-interest data the infrastructure lacks. Not revise_hypothesis: the OI-divergence mechanism has no promoted sibling to redirect, and the OI-coverage limit is factory-wide, so pointing it at another instrument would hit the same wall. FAILURE PATTERN: open-interest-divergence (and other OI/L-S-ratio supplementary-data) strategies are untestable in this factory because the OI feed has only ~2 months of recent history — a correctly-coded OI strategy with no price-only fallback can only trade that sliver (9 trades all in 2026), far too few and too time-concentrated to validate. Supp-data-dependent mechanisms whose feed lacks multi-year coverage cannot be optimized regardless of code correctness.

Implementation

Long-short price/open-interest divergence contrarian reversal on ETHUSDT.BINANCE USD-M futures, 4H bars, using open_interest supplementary data. Shorts when price makes a new 20-bar high while OI is falling (short-covering rally, weak), longs when price makes a new 20-bar low while OI is rising (aggressive new shorts, squeeze fuel). Exits on a 5% take-profit, 4% stop, or 30-bar time stop. The signal is a continuous contrarian score (price position within the rolling range, recomputed every bar); the OI-confirmed divergence is the discrete entry gate. leverage 1.0.

Verification Results

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['window', 'per_leg_pct', 'min_notional', 'max_hold_bars', 'stop_loss_pct', 'oi_lag_seconds', 'oi_slope_thresh', 'take_profit_pct'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: EthFourHourOpenInterestDivergenceReversalLS._to_ns() takes 1 positional argument but 2 were given (bar timestamp: 1735690860000) - steady_downtrend: TypeError: EthFourHourOpenInterestDivergenceReversalLS._to_ns() takes 1 positional argument but 2 were given (bar timestamp: 1735690860000) - flat_ranging: TypeError: EthFourHourOpenInterestDivergenceReversalLS._to_ns() takes 1 positional argument but 2 were given (bar timestamp: 1735690860000) - volatility_spike: TypeError: EthFourHourOpenInterestDivergenceReversalLS._to_ns() takes 1 positional argument but 2 were given (bar timestamp: 1735690860000) - zero_volume: TypeError: EthFourHourOpenInterestDivergenceReversalLS._to_ns() takes 1 positional argument but 2 were given (bar timestamp: 1735690860000) - price_gap: TypeError: EthFourHourOpenInterestDivergenceReversalLS._to_ns() takes 1 positional argument but 2 were given (bar timestamp: 1735690860000)

Backtest Review

Code is now correct: the iter-2 module-level OI-parsing fix works (9 trades vs prior 0), clean entry gate (9 signaled = 9 submitted), proper sizing (avg_position_pct 25%)

Backtest Review

Genuinely crypto-native mechanism concept (price/OI divergence)

Backtest Review

Structural data-coverage limit: all 9 trades fall in March-May 2026 — the open_interest supplementary feed only covers ~2 months, so the OI-required signal cannot fire across the other ~5.8 years of bars processed

Backtest Review

Far below hypothesized frequency (9 total vs 80-150/year) and far too few to validate via walk-forward; the holdout window would lack representative OI coverage

Backtest Review

Metrics meaningless on the sample: PF 0.75, Sharpe -1.05, Sharpe CI [-6.59, +4.39], 9 trades

Backtest Review

No price-only fallback — the entire edge is the OI signal, so the strategy is untestable without OI history that the factory does not have

Outcome Summary

This strategy implemented a genuinely crypto-native price/OI divergence reversal on ETH 4H, and its iter-2 module-level OI-parsing fix finally produced trades (9, vs zero before) with a clean entry gate and proper sizing. But all 9 trades landed in a single March-May 2026 window because the open-interest supplementary feed covers only ~2 months, leaving the OI-gated signal unable to fire across the other ~5.8 years — and with no price-only fallback the edge was untestable. The analyst abandoned it at the backtest-review gate on its second iteration as a structural data-availability constraint rather than a logic flaw — no code change manufactures the missing OI history, and the limit is factory-wide — so it never advanced to optimization or risk review.

Outcome Summary

A supplementary-data-dependent mechanism is only as testable as its feed's history — with open-interest coverage limited to ~2 months and no price-only fallback, even a correctly-coded OI-divergence strategy can only trade that sliver (9 time-concentrated trades), far too few to validate, and the gap is factory-wide so pointing it at another instrument hits the same wall.

Outcome Summary

The backtest-review analyst issued an 'abandon' verdict on a structural data-coverage limitation: the engine processed all ~14,000 bars of 6-year history but the open_interest feed only covers ~2 months of early 2026, so the OI-required signal could fire just 9 times (vs the hypothesized 80-150/year), and with no price-only fallback the strategy is untestable without multi-year OI history the factory has not collected — not a code or parameter problem.

Outcome Summary

A futures-specific long-short contrarian strategy on ETHUSDT 4H Binance futures (1.0x leverage) using open-interest supplementary data — shorting when price made a new 20-bar high while OI declined (rally on short-covering) and longing when price made a new 20-bar low while OI rose (aggressive new shorts = squeeze fuel), a crypto-native price/OI divergence edge with no price-only fallback.

Outcome Summary

The iter-2 OI-parsing fix made the code work (9 trades vs the prior 0), but all 9 fell in March-May 2026 — total return -1.11%, profit factor 0.75, Sharpe -1.05, win rate 44.4%, expectancy -$120/trade, with a Sharpe CI of [-6.59, +4.39] — metrics meaningless on so few, time-concentrated trades.
Strategy report

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