Skip to content

View original

BtcCmInverseHourlySqueezeExpansionBreakoutLS

Hypotheses

BTC COIN-M Inverse Perp Post-Squeeze Volatility-Expansion Breakout, Long-Short (Single-Instrument BTCUSD_PERP.BINANCE_CM, 1h Bars, Enter the Break Direction Only After a Bollinger-in-Keltner Volatility Squeeze, Asymmetric Trailing Exit, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument directional breakout on the Binance COIN-M inverse perpetual BTCUSD_PERP.BINANCE_CM (BTC-margined, ~0.06% round-trip taker, OHLCV-only). The edge is NOT a mean-reversion fade (the class that has died repeatedly this session with inverted reward/risk: many small wins, few large losses) but its OPPOSITE reward/risk profile: buy/sell the EXPANSION out of a volatility contraction and let winners run against a tight stop. Mechanism on 1h bars: (1) SQUEEZE DETECTION — flag a compression regime when the Bollinger Bands (20-period, 2sigma) sit ENTIRELY INSIDE the Keltner Channels (20-period, 1.5xATR), the standard 'TTM squeeze' condition, which identifies coiled low-volatility ranges. (2) BREAKOUT — while a squeeze is active (or in the bar it releases), go LONG when close breaks above the squeeze-window high, SHORT when close breaks below the squeeze-window low. (3) One directional confirmation only: require the close to also be on the correct side of a fast EMA(20) so we take the break WITH the immediate impulse, not a fakeout tick. This is routed to COIN-M specifically to (a) fill the under-represented BINANCE_CM venue bucket (3.3% vs >=5% quota) and (b) exploit the LOWER 0.10% fee floor, which makes intraday BTC expansion moves (routinely >0.8-1.5% on a 1h break) clear costs with margin to spare. Single-instrument, OHLCV-only, so it carries none of the multi-leg CM funding/mark data-unavailability risk (L20/L34) — only BTCUSD_PERP klines are needed and those span multi-year in the catalog. Three tunable parameters only (squeeze lookback, ATR stop multiple, trailing multiple) to resist the overfitting that killed the momentum/rotation families.

Hypotheses

Iteration 2 makes the two smallest changes the QA review points at, leaving the squeeze detection, continuous signal, ratcheting exit and inverse-contract sizing (all of which passed Layers 1–3 and worked mechanically) untouched. (1) Fee margin: entries previously fired on any close a tick beyond the prior channel, so marginal pokes — the breaks least likely to expand — were included and dragged avg_trade_return_pct down to 0.119%, only ~1.2x the 0.10% COIN-M floor. The break must now clear the channel by 0.30×ATR, which removes the shallowest, lowest-expansion entries and should lift the per-trade margin; it is a structural constant, not a fourth tunable, so the 3-parameter discipline in the hypothesis holds. (2) Leverage: 2.0 → 1.0, since the review is right that amplifying an insignificant edge only widened the 26.5% drawdown (CI to 48%); sizing still reads self.config.leverage so the notional cap tracks the config. Honest assessment: I recommend ABANDON. Sharpe 0.133 with CI [−0.92, 1.24] and IR −0.20 is a base rate that no threshold change lifts past the 0.5 OOS floor — single-instrument directional OHLCV on one BTC contract has its Sharpe as a ceiling, and the fakeout filter can plausibly add a few basis points per trade but cannot manufacture risk-adjusted significance. I have implemented the improvement so the reviewer has a concrete run rather than a re-submission of identical code.

Hypotheses

Marginal, not-significant single-perp breakout in the L30/L63 graveyard — not worth 2 hours of optimization, despite having the correct reward/risk shape. Over 381 trades: Sharpe 0.451 with bootstrap CI [-0.331, 1.192] straddling zero, PSR 0.86 (<0.95), profit_factor 1.14, total_return +54% over 5.8 years (CAGR 3.3%). The reward/risk is correctly asymmetric (RR ~2.2, positive expectancy +$53.9/trade — unlike the RR-inverted mean-reversion fades), so it is not fee-dead in the usual sense, but avg_trade_return_pct 0.121% clears the ~0.10% COIN-M floor by only ~1.2x (commission 8.84% of gross) and the base Sharpe of 0.45 is the ceiling the ~225-trial deflation only lowers. It is regime-dependent — 2023 (+22.7%) and 2024 (+13.3%) carry it while 2021 (-11.3%), 2022 (-5.1%) and 2026 (-3.9%) are negative, rolling Sharpe fell to ~-7 by mid-2026, and both the calm and stressed vol regimes are negative — so the last-20% holdout is weak/negative and the deflated-Sharpe/holdout gates would predictably reject it. The developer's own iteration-1 was 'statistically empty Sharpe 0.133' and the fix only reached a CI-straddles-zero 0.45. Failure pattern: no_edge/overfit single-perp channel breakout, marginal and not significant (L30/L63).

Implementation

Long-short TTM-squeeze release breakout on the BTC coin-margined inverse perpetual (BTCUSD_PERP.BINANCE_CM, 1h bars, pure OHLCV). A compression regime is flagged when Bollinger(20, 2σ) sits entirely inside Keltner(EMA20, 1.5×ATR20); while that squeeze is active or on the bar it releases, a close that clears the prior 30-bar high by 0.30×ATR (and sits above EMA20) goes long, and the symmetric downside break goes short. The signal is the continuous normalized position within the prior channel, (close − mid)/half-width, recomputed every bar. Exit is asymmetric: a tight 1.5×ATR initial stop that ratchets into a wider 3.0×ATR chandelier trail from the best close since entry, plus a 48-bar hold cap. Sized to risk 1% of equity against the initial stop, capped at 40% gross, floored to whole $100 inverse contracts, unlevered.

Verification Results

CLEAN RESTART 2026-09-04 — this run's verdict history and learning records were removed and it was restarted from verification. Its previous abandonment came from the pipeline, not from the market: the Layer-2 harness mis-bound @staticmethod helpers (fixed), QA issued terminal performance verdicts on an unoptimized smoke test (removed — QA now judges correctness only), and sandbox timeouts came from backtest-slot starvation (fixed). The hypothesis and the strategy code are unchanged. Verify the code on its merits; performance is decided later by the full backtest and the optimizer.

Verification Results

Analyst to confirm per-trade net margin on the full backtest; a squeeze-gated breakout needs the expansion leg to average well above ~0.10% net, which this window does not show. Likely abandon per the developer's recommendation.

Verification Results

Fee viability is marginal-to-negative: avg_trade_return_pct 0.024% is below the ~0.10% COIN-M round-trip floor, commission 13.29% of gross over 131 trades. The 0.30x-ATR breakout buffer is meant to lift per-trade margin but the sandbox still shows sub-fee per-trade. The edge does not clear costs in this window. Not a code defect.

Backtest Review

Correct reward/risk asymmetry (avg_win $1312 > avg_loss $606, RR ~2.2) and positive expectancy (+$53.9/trade) — not the RR-inverted mean-reversion failure mode

Backtest Review

Measured sample (381 trades over 5.8 years); clean 3-parameter OHLCV construction, correct inverse-contract sizing, contained DD (25.8%), no liquidation

Backtest Review

avg_trade_return_pct 0.121% nominally clears the ~0.10% COIN-M floor

Backtest Review

Not significant: Sharpe 0.451 with CI [-0.331, 1.192] straddling zero, PSR 0.86 (<0.95), PF 1.14; base Sharpe is the ceiling the deflation only lowers

Backtest Review

Fee-marginal: per-trade edge clears the floor by ~1.2x, commission 8.84% of gross; CAGR only 3.3%

Backtest Review

Regime-dependent: 2023/2024 carry it; 2021/2022/2026 negative; rolling Sharpe to -7 by mid-2026; last-20% holdout weak/negative; calm and stressed regimes both negative

Backtest Review

L30/L63 single-perp channel-breakout graveyard

Iteration History

Verification failed (Layer 4 — QA review) [class=no_edge]: - NO PROMOTABLE EDGE + razor-thin fee margin. Sharpe 0.133 with CI [-0.92, 1.24] straddling zero — statistically indistinguishable from no-skill, far below the 0.5 OOS floor — and information_ratio -0.20 vs buy_hold. Per-trade economics marginal: avg_trade_return_pct 0.119% clears the 0.10% CM floor by only ~1.2x (below the 0.15% general threshold), which the developer flagged as 'the tightest part of that margin'; any OOS degradation/slippage pushes it sub-fee. Mildly positive alpha (+0.025), PF 1.199, +9.66% over 728 days (end_unrealized -8.3%) do not amount to a durable edge. Single-instrument directional-OHLCV squeeze-breakout where base Sharpe is the ceiling, so no parameter change lifts a 0.13 base past the floor and the fee margin can't survive deflation. - Directional-OHLCV squeeze-breakout is a repeatedly-dead family; leverage 2.0 amplifies the 26.5% drawdown (CI to 48%) without buying a significant edge. The asymmetric-exit design is sound (avg_win > avg_loss) but that mechanical property alone doesn't create risk-adjusted edge on a single BTC instrument.

Iteration History

Verification failed (Layer 4 — QA review) [class=no_edge]: - avg_trade_return_pct 0.0244% is 4x BELOW the 0.10% COIN-M fee floor — fee-nonviable. The iteration-2 ATR-buffer fix worked mechanically but made per-trade margin worse (0.119% → 0.024%). Sharpe -0.072, total_return -0.39%, PF 1.033, 131 trades. The only per-trade-margin lever moved the wrong way. - Risk-adjusted edge absent and structural: Sharpe CI [-1.19, 1.05] spans zero, IR -0.32. Single-instrument pure-OHLCV directional squeeze-breakout — the 0%-survival family (L7) whose base Sharpe is a hard ceiling below the 0.5 OOS floor.
Strategy report

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