EthOpenInterestDivergenceContrarianShort1D
Hypotheses
ETH Open Interest Divergence Contrarian Short (Daily)
Hypotheses
A minimal short-biased single-instrument contrarian strategy on ETHUSDT perpetual futures using daily (1D) bars and open interest as the auxiliary signal. The hypothesis is that when open interest builds rapidly during a price advance (i.e., OI rises >X% over N days while price also rises >Y%), the rally is being driven primarily by leveraged long entries rather than spot accumulation — a textbook setup for a long-squeeze unwind. The strategy enters short on this divergence and covers when either OI mean-reverts (deleveraging completes) or price drops below a defined floor. Distinct from every existing pipeline strategy (none use OI) and every failed hypothesis (none used OI; no failure was a divergence/squeeze setup; no failure was a contrarian short on ETH). Deliberately uses ETH rather than SOL/XRP/BNB because (1) ETH has the cleanest, deepest OI history at scale, (2) prior funding-based shorts on SOL/XRP failed, and (3) ETH's perpetual market is the second-most-traded crypto perp globally — squeeze dynamics are highly visible. Three parameters total: OI rise threshold, price rise threshold, and lookback window.
Hypotheses
Iteration-3 fix for the Layer-3 'no trades produced' failure (should_enter never returned a side). Root cause diagnosed against real data: the ETHUSDT open_interest history covers only ~45 days, over which the maximum 10-day OI rise is ~14% — so the previous +30% OI / +10% price gate was physically unreachable and produced zero triggers. The OI list-parsing, nanosecond timestamp alignment, and signal/exit logic that already passed Layers 1-2 are unchanged; the only change is recalibrating the three edge thresholds to the data's real scale: lookback_window 10->5, oi_rise_threshold 0.30->0.04, price_rise_threshold 0.10->0.04. I verified the fix by replaying the REAL OI parquet rows and REAL ETH daily closes through the strategy's exact _oi_at/_divergence alignment: the new thresholds fire 5 entry triggers (first on 2026-04-01 at OI +5.2% / price +7.4%, comfortably above the 4% gates), guaranteeing >=1 short trade while still expressing a genuine OI-price co-rise divergence. I also promoted 'open_interest' to the first key checked in _row_val to match the actual parquet column name exactly.
Hypotheses
Structural data-insufficiency wall, not a tunable/fixable-code problem: the strategy produced only 3 trades across 2360 bars / ~6 years, all clustered in 2026, because the open_interest supplementary series only aligns to bars in a thin recent window — it fired zero times across the 2020-2021 OI-fueled leverage rallies that are the exact setup this hypothesis targets. That confirms the ETH OI history in the factory lacks the historical depth a daily OI-divergence mechanism needs; it is not a threshold problem (the developer already lowered the gate from +30%/+10% to +4%/+4% after a Layer-3 zero-trade result and still only reached 3 trades, because lowering thresholds cannot manufacture missing OI history). With metrics_reliable=false, data_days=19, profit_factor 0.023 and Sharpe -5.15 on a 3-trade sample, there is no statistical basis and a 2-hour optimization sweep would fit parameters to 3 noise points. Not iterate: no parameter or code change creates historical OI coverage; the alignment logic is already correct. Re-evaluate only if/when multi-year ETH open-interest history spanning the 2020-2021 and 2024 leverage cycles becomes available so the divergence mechanism can actually be exercised and validated.
Implementation
Short-biased contrarian fade on ETHUSDT.BINANCE 1-DAY futures using open interest. Enters SHORT when OI rises >=4% AND price rises >=4% over the same 5-day window (leveraged-long buildup during an advance = long-squeeze-unwind setup). Covers on OI normalization (current OI < 0.85x peak-since-entry), 5% take-profit, 4% stop-loss, or a 7-bar time stop. BINANCE USD-M futures (margin venue required for shorting), leverage 1.0, sized at 30% of equity notional.
Verification Results
Verification failed (Layer 3 — sandbox backtest): No trades produced
Bar type used: ETHUSDT.BINANCE-1-DAY-LAST-EXTERNAL, Bars processed: 2336
Diagnostics: should_enter() returned a side 0 times over 2322 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds.
Ensure your strategy produces trades with the given data and parameters.
Backtest Review
OI parsing is implemented carefully and correctly (list-of-row-dicts handling, ns normalization, identity-cached series, lag-tolerant alignment)
Backtest Review
Sound short-only single-instrument design that avoids the multi-instrument/cross-venue failure modes; the OI-divergence squeeze thesis is coherent
Backtest Review
Where OI data exists, the signal fires and submits (3/3 entries submitted, no min-notional/size drops) — the code is functioning
Backtest Review
Only 3 trades across 2360 bars / ~6 years, all clustered in 2026 — the open_interest series aligns to bars only in a thin recent window
Backtest Review
Zero triggers across 2020-2021, the very OI-fueled leverage rallies the hypothesis targets, confirming historical OI depth is absent, not merely a threshold issue
Backtest Review
metrics_reliable=false, data_days=19; profit_factor 0.023, expectancy -902, Sharpe -5.15 — a 3-trade sample carries no statistical signal
Backtest Review
Optimization would fit parameters to 3 data points = pure noise; the developer already lowered thresholds once and still only reached 3 trades
Outcome Summary
EthOpenInterestDivergenceContrarianShort1D set out to short ETH when open interest and price rose together, treating that divergence as a leveraged long-squeeze setup, with carefully implemented list-based OI parsing and lag-tolerant alignment. In backtesting the code functioned correctly — every one of its signals submitted — but it produced only 3 trades in a thin 2026 window (19 data_days, Sharpe -5.15, profit factor 0.023, metrics_reliable=false), because the factory's ETH open-interest history lacks the depth needed to trigger during the 2020–2021 leverage rallies the thesis targets. The analyst abandoned it at backtest review after 3 iterations rather than optimize parameters to 3 noise points, noting that neither threshold nor code changes can create missing OI coverage. It is flagged for re-evaluation only if multi-year ETH open-interest history spanning the 2020–2021 and 2024 leverage cycles later becomes available.
Outcome Summary
An auxiliary-signal hypothesis is only testable if that signal has multi-year historical depth: lowering entry thresholds (here from +30%/+10% to +4%/+4%) cannot manufacture missing OI history, so future OI-dependent strategies should first confirm the supplementary series spans the target regimes before coding.
Outcome Summary
It was abandoned at the pre-optimization BACKTEST_REVIEW gate (analyst verdict 'abandon', never reaching optimization or analysis) because the open-interest series only aligned to bars in a thin recent window and fired zero times across the 2020–2021 OI-fueled rallies the hypothesis targets — a structural data-insufficiency wall, not a tunable-code problem.
Outcome Summary
A short-biased, single-instrument contrarian fade on ETHUSDT daily perpetual futures that shorts when open interest and price both rise past thresholds over a lookback window — reading rapid OI buildup during an advance as leveraged-long positioning primed for a long-squeeze unwind — and covers when OI mean-reverts, on PnL stops, or on a time stop.
Outcome Summary
The initial backtest was statistically empty: only 3 short trades fired across 2,360 bars / ~6 years, all clustered in 2026, over just 19 data_days, producing a 33% win rate, profit factor 0.023, expectancy -902, total return -2.71%, and Sharpe -5.15 with metrics_reliable=false.
Iteration History
Verification failed (Layer 2 — synthetic scenarios):
Parameters used: ['per_leg_pct', 'min_notional', 'stop_loss_pct', 'oi_lag_seconds', 'lookback_window', 'take_profit_pct', 'max_holding_bars', 'oi_rise_threshold', 'price_rise_threshold', 'oi_normalize_threshold']
Check that __init__ sets all attributes from self.parameters.get().
- steady_uptrend: TypeError: EthOpenInterestDivergenceContrarianShort1D._row_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690440000)
- steady_downtrend: TypeError: EthOpenInterestDivergenceContrarianShort1D._row_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690440000)
- flat_ranging: TypeError: EthOpenInterestDivergenceContrarianShort1D._row_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690440000)
- volatility_spike: TypeError: EthOpenInterestDivergenceContrarianShort1D._row_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690440000)
- zero_volume: TypeError: EthOpenInterestDivergenceContrarianShort1D._row_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690440000)
- price_gap: TypeError: EthOpenInterestDivergenceContrarianShort1D._row_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735690440000)
Backtest and paper results are hypothetical. Trading involves risk of loss.