Skip to content

View original

BtcCoinMFourHourBollingerSqueezeRangeExpansionBreakoutLS

Hypotheses

BTC Coin-Margined Volatility-Squeeze Breakout, Long-Short (Single-Instrument BTCUSD_PERP.BINANCE_CM, 4h Bars, Trade the Range-Expansion Only After a Confirmed Bollinger-Bandwidth Contraction, Pure OHLCV, 3-Parameter, BTC-Denominated)

Hypotheses

A LONG-SHORT, single-instrument volatility-REGIME strategy on the deepest coin-margined inverse perpetual, BTCUSD_PERP.BINANCE_CM, using nothing but its own 4h OHLCV. It deliberately fills three under-represented buckets at once without touching any known death-trap: BINANCE_CM venue (3.1% vs >=5% target), LONG-SHORT direction (14.3% vs the push for less long-only), and pure_ohlcv/no_supplementary_data (the single best-surviving tag family). It is NOT a plain trend-follower (which dies no_edge) and NOT a mean-reversion fade (which dies with inverted reward/risk): it only arms after a genuine volatility contraction and then trades the directional break of the compressed range — a documented volatility-autocorrelation effect (squeezes precede expansions) that produces infrequent, high-follow-through signals. Coin-margined execution (~0.06% RT taker, 0.10% fee floor) plus multi-bar holds keeps fee drag minimal, and returns are naturally BTC-denominated. Deliberately LOW-PARAMETER (squeeze percentile, breakout confirmation, ATR-stop) to stay clear of the overfit graveyard (233 deaths). No supplementary feed, no cross-venue leg, no basket — so it cannot die to the 'instrument/venue swap' verification loop, the liquidation-data wall, or the cross-sectional-spread fee arithmetic that killed the recent siblings.

Hypotheses

I recommend ABANDON; the only change is a docstring recording the evidence, because re-tuning would be noise selection rather than a fix. QA's verdict was that the result is BTC beta plus open-position markup, not skill, and I tested the mechanism's premise directly rather than arguing about metrics. Conditioning the real BTCUSD_PERP 4H history on this code's own definitions and comparing ARMED breaks against otherwise-identical breaks with NO prior squeeze: up-breaks with a squeeze return +0.61% / +0.73% / +1.35% at 6 / 12 / 24 bars, while up-breaks WITHOUT a squeeze return +0.46% / +1.28% / +1.84%. The unarmed set is as good or better beyond the 6-bar horizon, so the squeeze - the entire hypothesis - carries no incremental information. The short side is worse than neutral: armed down-breaks scored for the short give +0.09% / -0.10% / -0.76% at the same horizons with win rates 52% / 47% / 41%, which is exactly the engine's short_win_rate of 0.35 and explains why the short leg is a drag rather than the market-neutralising half of the book. That leaves the long leg, which at +1.35% over 24 bars is indistinguishable from BTC's unconditional drift on this sample - consistent with the reported beta 0.41, benchmark_correlation 0.87, alpha -0.0011 and information_ratio -0.66 versus buy-and-hold. My earlier structural sweep had already found nothing above roughly 0.00% per trade anywhere in the parameter space, and this conditional test explains WHY: the gate does not select better breakouts. I also accept QA's point that the +157% headline is inflated by a +91.4% terminal unrealized position and that a 45% max drawdown sits behind it. A long-only variant would simply be levered BTC beta with a negative information ratio, so there is no honest salvage inside this hypothesis.

Hypotheses

Negative-alpha closet-beta breakout whose hypothesized signal is proven to carry no information — not worth 2 hours of optimization. The developer conditioned the real BTCUSD_PERP 4H history on this code's own definitions and found armed (post-squeeze) breakouts follow through no better than unarmed breakouts at every horizon beyond 6 bars (24-bar: armed +1.35% vs unarmed +1.84%), i.e. the squeeze gate that IS the hypothesis adds no incremental information, and the short leg has negative expectancy (24-bar down-break -0.76%, short_win 0.35). The engine confirms it: alpha -0.0016 (negative), beta 0.41, benchmark_correlation 0.87, information_ratio -0.79 — the long leg is BTC beta and the short leg is a drag. It is not significant risk-adjusted (Sharpe 0.733 with bootstrap CI [-0.115, 1.508] straddling zero) and carries a 45.4% drawdown (CI to 61%), in the L30/L63 single-instrument breakout graveyard with deeply negative stress windows (FTX -4.9, LUNA -3.4) and a -19.8% 2022. The developer pre-registered that there is no change left to make and that any positive parameter cell would be noise selection. No optimization salvages a mechanism whose core conditioning variable has no incremental information over unconditioned breakouts. Failure pattern: no_edge single-instrument squeeze breakout, negative alpha / closet beta, conditioning variable uninformative (L30/L63).

Implementation

Long-short Bollinger-squeeze range-expansion breakout on the BTC COIN-M inverse perpetual (BTCUSD_PERP.BINANCE_CM, 4-hour bars, pure OHLCV). It arms only after bandwidth falls into the lowest quartile of its own 120-bar distribution, freezes the compressed 20-bar range, and then trades a break of that range confirmed by a wide (>= 1.5x ATR) bar - long on an upside break, short on a downside break - exiting on a 4x ATR stop, a 5x ATR chandelier trail, or a 48-bar time stop. Sizing risks 2% of equity against the ATR stop, capped at 0.75x equity, in whole $100-face inverse contracts. Iteration 2 changes only the module docstring, which now records the measured refutation of the strategy's own premise.

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

Move the disarm to a post-fill hook (position-opened event) rather than position_size(), so arm state cannot desync from whether an order was actually sized/submitted.

Verification Results

position_size() has a side effect: it calls _arm_consumed() to disarm the squeeze once a break is taken. On the inverse path, if contracts_for_notional() rounds to 0 contracts it returns Decimal(0) WITHOUT calling _arm_consumed(), so the setup stays armed and can re-fire until a fillable size appears. With 2% risk / 0.75x cap on BTC this effectively never triggers (sizes are hundreds of contracts), so not a live bug, but arm/disarm state living inside the sizing method is fragile.

Backtest Review

Clean 3-parameter pure-OHLCV construction, correct inverse-contract sizing, low fee drag (3.27% of gross); measured sample (199 trades)

Backtest Review

Developer did honest on-data conditioning work and reported the negative finding transparently

Backtest Review

The squeeze gate (the hypothesis) carries no incremental information — armed breakouts follow through no better than unarmed at every horizon beyond 6 bars (developer's own conditioning study)

Backtest Review

Negative alpha (-0.0016), beta 0.41, benchmark_correlation 0.87, information_ratio -0.79 — closet BTC beta; short leg has negative expectancy (24-bar -0.76%, short_win 0.35)

Backtest Review

Not significant: Sharpe 0.733 with CI [-0.115, 1.508] straddling zero; max_drawdown 45.4% (CI to 61%) above the promotion floor

Backtest Review

L30/L63 single-instrument breakout graveyard; deeply negative stress windows (FTX -4.9, LUNA -3.4, rate-shock -1.7); 2022 -19.8%

Iteration History

Verification failed (Layer 4 — QA review) [class=no_edge]: - NO DEMONSTRABLE RISK-ADJUSTED EDGE — the positive per-trade figure is BTC beta plus open-position markup, not skill. Sandbox: alpha -0.0011 (~zero), information_ratio -0.66 vs buy_hold, beta 0.41 with benchmark_correlation 0.87, and Sharpe 0.61 with CI [-0.04, 1.24] straddling zero. Leg split confirms directional BTC exposure: long_win_rate 0.52 vs short_win_rate 0.35 — the long leg rides the bull sample, the short leg is a drag. The +157% headline is ~58% unrealized open-position markup (end_unrealized_pct +91.4%). Crucially, the DEVELOPER'S OWN wide structural sweep 'never exceeded roughly 0.00% per trade' and the shipped defaults are 'the best-behaved cell' at -0.02%/trade full-history — the parameter space is exhausted, no plausible fix remains. avg_trade_return_pct 0.583% clears the fee floor on paper but is beta-contaminated and inconsistent with the developer's broader measurement. - Headline inflation and drawdown: end_unrealized_pct +91.4% (large terminal open position lifts total_return and Sharpe); max_drawdown 45.4% (CI to 63%). Not a code bug, but the sandbox headline overstates the realized, risk-adjusted result.

Iteration History

Verification failed (Layer 4 — QA review) [class=premise_falsified]: - The hypothesis's core mechanism — 'a volatility-bandwidth squeeze precedes a tradeable directional range-expansion' — is empirically refuted on the strategy's own instrument and definitions, not merely underperforming. The developer conditioned the real BTCUSD_PERP 4H history on THIS code's exact gate and found up-breaks WITH a squeeze (+0.61%/+0.73%/+1.35% at 6/12/24 bars) do no better than up-breaks with NO prior squeeze (+0.46%/+1.28%/+1.84%) — the gate carries no incremental information. - The short leg is negative-expectancy (armed down-breaks scored for the short: +0.09%/-0.10%/-0.76%, win 52/47/41%, matching engine short_win 0.35). Down-breaks revert on an up-drifting asset, so the short is a drag not a neutralizing leg. What remains is closet BTC beta (beta 0.41, corr 0.87, alpha -0.0011, IR -0.66). - 157.6% headline is dominated by 91.4% unrealized open markup behind a 45.4% DD; Sharpe 0.61 CI [-0.04, 1.24] straddles zero. avg_trade_return_pct 0.58% clears the CM fee floor — fees are not the constraint, the absence of edge is.
Strategy report

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