Strategies
BTC Perp 4H Open-Interest Crowding Reversal (Single-Instrument USD-M, Long-Short, Trapped-Positioning Unwind)
Outcome: Abandoned
BtcOpenInterestCrowdingReversalLS
BTC Perp 4H Open-Interest Crowding Reversal (Single-Instrument USD-M, Long-Short, Trapped-Positioning Unwind)
Hypothesis
Implements the trapped-positioning-unwind hypothesis exactly: OI is signal-only (never a credited cash flow), the crowding gate (og>0 and oi_z>=oi_surge_z) is what distinguishes this from generic mean reversion, and the falling-OI skip delivers the positive-skew profile. Iteration-4 fix for the Layer-3 timeout: the previous revision merged the full-history `metrics` stream (hundreds of thousands of 5-min OI rows back to ~2020); loading and parsing that payload blew the 300s smoke wall-clock. This revision references only the lighter-weight `open_interest` supplementary stream, which loads fast and covers the recent smoke/backtest window — all trading logic, gates, z-scoring, sizing, and the one-time bisect index are unchanged, so Layers 1 and 2 stay green while the smoke backtest completes well under the limit. Stays on the clean single-instrument USD-M path (BINANCE futures, MARGIN, long+short) required to short; leverage kept at 1.0 (referenced in the notional cap but not amplifying, so no leverage_set_but_unused flag).
verifying_stuck_3_timeouts
Implementation
Single-instrument long-short reversal on BTCUSDT.BINANCE USD-M perpetual 4-HOUR bars. Uses open-interest (supplementary) as the structural crowding signal and price action for P&L. When OI surges (rising AND z-score above threshold) alongside a sharp price extension, it fades the exhausted move (short into OI-fueled rallies, long into OI-fueled flushes), betting the trapped leveraged positions unwind. Moves on falling OI (healthy de-leveraging) are skipped for a positive-skew forced-unwind payoff. OI is indexed once and looked up per bar via bisect (O(log n)).
Verification Results
Iteration History
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 and paper results are hypothetical. Trading involves risk of loss.