Skip to content

View original

BtcOiDeleveragingFlushReversalLS

Hypotheses

Deleveraging-Flush Reversal at Moderate Frequency, Single-Venue Long-Short (Single-Instrument BTCUSDT.BINANCE USD-M — Fade a Sharp 4H Price Move That Coincides With a Fast DROP in Open Interest = Forced-Liquidation Flush; MODERATE Trigger Threshold Tuned for ~100+ Measurable Trades; Reversion Target + ATR Stop + Time Exit, 3-Parameter)

Hypotheses

A LONG-SHORT, SINGLE-INSTRUMENT, SINGLE-VENUE event-driven reversal on BTCUSDT.BINANCE USD-M perpetual, deliberately engineered to occupy the ONE viable frequency niche the failure log now reveals: MODERATE turnover. The log shows a vise — fast strategies die fee_edge (212x), and low-turnover strategies die structural unmeasurability (my Donchian breakout died at ~47 trades vs a ~100-trade floor; sandbox produced only 4). So this targets ~150-400 trades over the sample (holds ~1 day, a few triggers per week), enough to validate while per-trade moves stay large enough to clear fees. The edge uses OPEN INTEREST — orthogonal to price, non-trend, and reliably populated on BINANCE USD-M (satisfies L42) — via a forced-deleveraging mechanism, NOT a momentum confluence (avoids the L41 0/213 clone class) and NOT a price-only reversal. Mechanism: when price moves sharply over a few hours AND open interest simultaneously DROPS fast, the move is being driven by forced liquidation / margin stop-outs closing positions (price-insensitive flow that overshoots), not fresh conviction. Once the leveraged cohort is flushed, price snaps back. Fade the flush: sharp down-move on collapsing OI → LONG (longs liquidated into a vacuum, bounce); sharp up-move on collapsing OI → SHORT (shorts squeezed out). Critically, the trigger threshold is set MODERATE (not extreme) precisely so the strategy fires often enough to be statistically measurable — directly fixing the too-few-trades death — while each flush still produces a >0.4% reversion that clears the 0.10% USD-M round trip. It is distinct from my six in-flight ideas (all low-turnover momentum/trend) by mechanism (forced-flow reversal), horizon (moderate frequency), and feed role (OI collapse as a flush detector, not a momentum confirm). Single-venue, single-instrument — no L44, no L43, BINANCE USD-M (not COIN-M, whose OI loops). 3 parameters. Instruments: ["BTCUSDT.BINANCE"]. venue_type: futures. data_requirements: ["ohlcv", "open_interest"].

Hypotheses

Implements the hypothesis directly. (1) Mechanism = forced-flow reversal, not momentum confluence: the joint condition is a sharp price move AND a simultaneous OI collapse, and the trade is always AGAINST the move (BUY the down-flush, SELL the up-flush), with OI acting as a flush detector rather than a momentum confirm. (2) Moderate frequency niche: with 4H bars, an 8-hour flush window, a 1.5% move gate and a 0.4% OI-decline gate, plus a ~24h max hold, the trigger fires a few times per week - targeting the ~150-400 trade band that is measurable without being fee-killed, which is the explicit fix for the too-few-trades death of the prior Donchian idea. (3) Fee viability: the ATR-scaled target (1.25x a ~1.0-1.5% 4H BTC ATR, i.e. roughly 1.3-1.9%) is an order of magnitude above the ~0.10% USD-M taker round trip, and the 1.5x ATR stop keeps the loss side comparable so the strategy does not need an implausible win rate. (4) Three core signal parameters exactly as specified (lookback, move_thresh, oi_fall_thresh); everything else is exit/risk plumbing. (5) Single instrument, single venue BINANCE USD-M (not COIN-M), no extra legs - avoiding the multi-leg/cross-venue verification-loop class. calculate_signal returns a continuous flush score every bar (-price_change_pct amplified by the OI decline ratio) so the signal varies bar to bar; the entry decision lives in should_enter. Leverage is set to 2.0 and is consumed explicitly in position_size via the cap_notional term. One note as requested: risk-based sizing here will usually bind on the risk term rather than the leverage cap, so if optimization wants larger exposure the honest lever is risk_frac, not leverage.

Hypotheses

Net loser that should not be optimized: profit_factor 0.89 (<1.0), total_return -24.8%, Sharpe -0.082 (CI [-0.70, 0.58], probabilistic_sharpe 0.40), expectancy -$47.9/trade, and information_ratio -0.73. avg_trade_return_pct is 0.146% — below the 0.15% futures fee floor — and net-negative, so there is no edge after costs. Win rate is 53% but avg_loss ($942) exceeds avg_win ($747), the classic failed-reversion signature, and the strategy is badly negative in the early years (2020 -21%, 2021 -19%) with a 43.8% max drawdown (CI high 75%). The hypothesis is a forced-deleveraging flush reversal — the fade/reversal family that is repeatedly dead here (it even references the abandoned OI-flush reversal it descends from). The 'moderate frequency' engineering successfully raised the trade count to 478 (measurability fixed), but that only produced a well-measured loser: the flush-reversal edge does not exist net of costs. A sub-fee-floor, net-negative per-trade result means there is no parameter region to tune toward — reducing frequency cannot flip a wrong-signed, cost-negative signal, and reframing the same reversal mechanism onto another instrument would lose again. Per L8 (never advance when total_return ≤ 0 or PF < 1.0), abandon at BACKTEST_REVIEW rather than spend 2 hours optimizing.

Implementation

Long-short event-driven reversal on BTCUSDT.BINANCE USD-M perpetual, 4-HOUR bars. Every bar it measures the signed price change over the last `lookback` bars (default 2 = 8 hours) and the signed change in open interest over the SAME timestamp window, using the Binance OI series (multi-year `metrics` open-interest feed preferred, `open_interest` API feed as fallback, nearest-value-at-or-before lookup with a 12h lag tolerance). A sharp move whose window coincides with a fast OI DROP is read as forced deleveraging - liquidations/margin stop-outs closing positions rather than fresh conviction - and is faded: sharp down-move on collapsing OI => BUY, sharp up-move on collapsing OI => SELL. Entry gates are moderate by design (|move| >= 1.5% over 8h, OI decline >= 0.4%) so the strategy fires a few times per week rather than a handful of times per year. Exits are a 1.25x ATR reversion target, a 1.5x ATR stop (both frozen at the ATR observed at entry), and a 24-hour calendar time stop measured from the position's own ts_opened. Sizing is fixed-fractional risk (1.5% of equity risked against the ATR stop distance) hard-capped at 1.0x equity notional (max_gross_frac 0.5 x leverage 2.0), so losses shrink subsequent size instead of compounding it. If the OI feed is unavailable for a bar's window the strategy simply does not trade - there is no price-only fallback.

Verification Results

At backtest_review run the FULL 2020-2026 history (the developer provided NO full-sample backtest, only forward-looking claims) and verify per-trade reversion exceeds the round trip with margin BEFORE the 3-phase optimization. If full-history avg_trade_return_pct stays below ~0.15%, abandon as fee_edge rather than optimize.

Verification Results

REALIZED EDGE IS WEAK/NEGATIVE IN THE SANDBOX — a backtest_review question, flagged for the Analyst, not a code fault. The 362-day sandbox is net-negative: total_return -3.3%, Sharpe -0.37 (CI [-1.97,+1.22]), profit_factor 0.87, win_rate 0.51 with avg_loss (1230) > avg_win (1025), and a realized avg trade of only +0.047% of notional — ~10x smaller than the hypothesized '>0.4% reversion' and below the ~0.10% USD-M round trip. This is NOT a code-defect signature (win_rate 0.51 not 0, PF 0.87 not 0, |Sharpe| 0.37 not >5), so it is not a polarity/exit bug — the fade polarity and gates are correct; it is a genuinely thin edge in the 2025-26 window. The structural thresholds (move_thresh 1.5%, target ~1.3-1.9%) clear fees by design, so this is not a structural fee-threshold violation. OI-confirmation/liquidation-reversal has a poor track record here (the hypothesis itself notes the naked OI breakout was thin at 0.377).

Verification Results

Confirm `metrics` open-interest coverage spans the full backtest window; if it starts mid-sample, report the effective tradable span so measurability is judged on the covered period.

Verification Results

FULL-WINDOW OI COVERAGE must be confirmed. The strategy prefers the multi-year `metrics` OI series, falls back to `open_interest`, and correctly refuses to trade any bar whose window lacks OI (no price-only fallback). The sandbox produced 43 trades so OI is present recently — but if `metrics` OI is sparse/absent in 2020-2021 the strategy is silently blind there and the full-history trade count could fall short of the ~150-400 target. Data-coverage check, not a code fault.

Verification Results

No fix needed. Minor: position_size relies on the base template's $5 min-notional check rather than the params' min_notional (5.0) — confirm the base guard is active.

Verification Results

Code correctness verified — clean, faithful, no defect. Correct fade polarity (down+OI-collapse -> BUY, up+OI-collapse -> SELL); deleveraging gate oc<=-oi_fall_thresh and sharp-move gate |pc|>=move_thresh correct; OI aligned by timestamp nearest-at-or-before with 12h lag tolerance (no look-ahead); time-stop calendar-anchored from position.ts_opened (avoids the L26 counter trap); _entry_atr_pct frozen at entry; fixed-fractional risk sizing via get_account_equity with gross cap and leverage plumbed. All static divisions guarded (price, c_past, stop_frac, oi_past, thr); 'bisect' unrecognized-import a stdlib false positive. Measurable (43 sandbox trades, metrics_reliable=TRUE). No code action required.

Backtest Review

Clean, data-safe construction: single venue/instrument, OI as an orthogonal flush detector, OHLCV + USD-M OI only; 3 tunables

Backtest Review

Successfully engineered measurable frequency (478 trades) — the too-few-trades death was fixed

Backtest Review

profit_factor 0.89 (< 1.0) — the strategy loses money; total_return -24.8%

Backtest Review

avg_trade_return_pct 0.146% is BELOW the 0.15% fee floor, and expectancy is negative (-$47.9/trade) — no edge net of costs

Backtest Review

Sharpe -0.082 (CI [-0.70, 0.58]); probabilistic_sharpe 0.40; information_ratio -0.73 — no skill

Backtest Review

win_rate 53% but avg_loss ($942) > avg_win ($747) — classic failed-reversion profile

Backtest Review

max_drawdown 43.8% (CI high 75%); badly negative early years (2020 -21%, 2021 -19%)

Backtest Review

Forced-flow/flush reversal family (repeatedly dead here, including the referenced abandoned OI-flush reversal); the moderate-frequency fix only produced a well-measured loser

Outcome Summary

This strategy was a clever attempt to escape the frequency vise the failure log had revealed — fast strategies die on fees, slow ones on unmeasurability — by deliberately tuning the OI-flush trigger to a moderate threshold that would fire ~a few times a week and produce a statistically testable sample. The engineering succeeded on that narrow axis, lifting the trade count to 478 and clearing the measurability floor with margin. But it only proved the edge was absent: the flush-reversal fade lost 24.8% at a profit factor of 0.89, with a negative per-trade expectancy below the fee floor and the tell-tale small-wins/large-losses signature of failed reversion. The analyst abandoned it at backtest review as a well-measured loser in the repeatedly-dead forced-flow reversal family — noting that fixing measurability cannot flip a wrong-signed, cost-negative signal and there was nothing to optimize toward.

Outcome Summary

Successfully engineering the measurable frequency niche does not create an edge — it only converts an untestable idea into a well-measured loser if the underlying mechanism is absent; the OI-deleveraging-flush fade remains a wrong-signed, sub-fee-floor member of the dead forced-flow reversal family regardless of how the trigger is tuned.

Outcome Summary

It was abandoned at the BACKTEST_REVIEW gate under the rule against advancing when total return ≤ 0 or profit factor < 1.0: the flush-reversal edge does not exist net of costs (sub-fee-floor, negative per-trade expectancy), so it is wrong-signed with no parameter region to tune toward. As a member of the repeatedly-dead forced-flow/flush reversal family (descending from a prior abandoned OI-flush reversal), it never reached optimization or analysis.

Outcome Summary

A long-short, single-instrument, single-venue event-driven reversal on the BTCUSDT.BINANCE USD-M perp that fades a sharp 4H price move coinciding with a fast drop in open interest (a forced-deleveraging flush closing positions into a vacuum) — buying a sharp down-move on collapsing OI and shorting a sharp up-move on collapsing OI, with an ATR reversion target, ATR stop, and time exit — deliberately tuned to a moderate trigger for ~150-400 measurable trades to occupy the one viable frequency niche between fee-edge (too fast) and unmeasurability (too slow).

Outcome Summary

The frequency engineering worked (478 trades, measurability fixed) but only produced a well-measured loser: profit factor 0.89, total return -24.8%, avg_trade_return_pct 0.146% (below the 0.15% fee floor and net-negative, expectancy -$47.9/trade), Sharpe -0.082 (CI [-0.70, 0.58]), information ratio -0.73, max drawdown 43.8% (CI to 75%). Win rate was 53% but avg loss ($942) exceeded avg win ($747) — the classic failed-reversion profile — with badly negative early years (2020 -21%, 2021 -19%).
Strategy report

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