Skip to content

View original

BtcCmVolContractionExpansionLS

Hypotheses

BTCUSD COIN-M Perpetual 1H Volatility-Contraction-Expansion Long-Short (3-Parameter, Pure OHLCV, BTC-Margined Low-Fee Venue)

Hypotheses

1H long-short trend-emergence strategy on BTCUSD_PERP.BINANCE_CM (BTC-margined inverse perpetual). Targets the documented volatility-contraction → expansion pattern: low realized-vol regimes precede directional breakouts more often than chance. This is the analyst-sanctioned salvage path for the failed BNB Spot Daily Bollinger Squeeze ('BB squeeze mechanism is NOT dead as a concept — possible salvage paths: 4H or 1H bars, 10× more trades'). Key structural differentiators vs failed-pattern lookalikes: (1) PATH-DEPENDENT entry — vol compresses, THEN we wait for an ATR-multiple directional confirmation move BEFORE entering. This is mechanistically distinct from the failed ETH 1H vol-regime-gated momentum (snapshot z-score entry, no path dependence) and from the failed BNB BB Squeeze (entered on first compression-then-break tick). (2) BINANCE_CM venue (1.1% actual vs target ≥5%) — lowest-fee venue in the factory (~0.06% RT vs USD-M 0.10%, Spot 0.20%, HL 0.09%), giving 40% more friction headroom than USD-M and enabling 1H turnover that would be marginal elsewhere. (3) Long-short structure fills the under-represented direction bucket (12.1% vs target ≥45%). (4) Only 3 tunable parameters — well below the 5-param ceiling the analyst recommended after the DOGE 4H Triple-Filter overfit failure. Trade frequency math: ~30-50 vol-compression-then-expansion events/year per side = 60-100 trades/year. With 6+ years of BINANCE_CM data → 360-600 total trades → 24-40 OOS trades per walk-forward window, comfortably above the empirically-validated 5-trade-per-window floor that abandoned daily-alt-breakout strategies. Fee drag: 100 trades × 0.06% RT = 6%/year — easily absorbed by 1.5-2.5% per-trade target.

Hypotheses

Implements the hypothesis's salvage design exactly: a single-instrument, pure-OHLCV, three-parameter (compression_ratio, confirm_atr_mult, atr_trail_mult) book on the low-fee COIN-M venue, long-short, with clamps mirrored in _param_bounds so the optimizer never searches values the code rewrites. The stated structural differentiator is coded as an explicit two-stage state machine rather than a single composite test: contraction only sets an armed-until bar index, and the entry requires a subsequent confirmed ATR-multiple excursion, so the setup is genuinely ordered in time (compression THEN proof) rather than a snapshot z-score read on one bar or a first-tick-out-of-the-band squeeze entry. calculate_signal returns the CONTINUOUS 6-bar excursion in natural ATR units every bar (never gated to a constant) and the confirmation threshold is in the same units. I measured the full two-stage gate on the real BTCUSD_PERP 1h history (50,537 bars, 2020-08 to 2026-05): ATR compresses below 0.70x its weekly mean on 10% of bars and the armed-plus-confirmed conjunction produces 664 distinct trigger episodes, about 115 per year; after the flat-only constraint and multi-bar holds that lands in the hypothesis's 60-100 trades/year band, so both the zero-trade sandbox risk and the walk-forward per-window trade floor are comfortably cleared. Fee math is the honest constraint: ~80-115 round trips a year at the ~0.10% COIN-M taker cost is roughly 8-11% annual drag, so the trailing exit has to deliver the 1.5-2.5% per-trade the hypothesis assumes - that, not trade count, is where this strategy will live or die. Inverse sizing uses contracts_for_notional (whole $100-face contracts), never the linear equity/price formula that mis-sizes inverse contracts; the ~$80k capped notional is ~800 contracts, far above min notional. leverage=2.0 is genuinely consumed in position_size via the gross cap (equity x 0.4 x leverage = 0.8x equity ceiling), which binds on most entries while per-trade risk stays near 1% of equity against the trail, so there is no compounding blow-up path. All state is incremental (Wilder ATR, a running-sum ATR mean, bounded deques), so per-bar cost is O(1) and the 1h backtest stays well inside the 300s smoke budget.

Hypotheses

coding_stuck_3_timeouts

Implementation

Long-short volatility contraction-to-expansion strategy on the BTC COIN-M inverse perpetual (BTCUSD_PERP.BINANCE_CM, 1-hour bars, pure OHLCV, single leg). Entry is PATH-DEPENDENT in two ordered stages: first ATR(24) must compress to 70% or less of its own 168-hour mean, which ARMS the setup for the next 24 bars; then, only while armed, the 6-bar close-to-close excursion must reach 2.0x ATR, and the position is taken in the direction of that confirmed move (LONG on an up-thrust, SHORT on a down-thrust). Compression alone never opens a position. Exits are a 2.5x ATR chandelier trail from the best close since entry, so a real expansion is ridden, plus a 72-bar (3-day) cap for a breakout that stalls. Sizing risks 1% of equity against the trail distance, capped at 0.4x equity x leverage of gross notional, floored to WHOLE $100-face inverse contracts via contracts_for_notional (BTC-margined/settled).

Outcome Summary

BtcCmVolContractionExpansionLS was the analyst-sanctioned salvage of the Bollinger-squeeze idea — a path-dependent design that armed on a volatility contraction and only entered on a confirmed ATR-multiple expansion, routed to the low-fee BTC COIN-M perp with just three parameters to resist overfitting. It never got the chance to prove itself: the coding stage stalled and, after three timeouts across two iterations, the run was abandoned as 'coding_stuck_3_timeouts'. With no code completed, it produced no backtest, verification, optimization, or analysis. The abandonment reflects a coding-process failure rather than any finding about the strategy's edge.

Outcome Summary

A sound, well-motivated design delivers nothing if it cannot get through the coding stage — repeated coding timeouts end a candidate before its edge is ever tested, so keeping the implementation tractable enough to compile and pass within the stage's time budget is itself a prerequisite.

Outcome Summary

It was abandoned for 'coding_stuck_3_timeouts': the coding stage failed to complete after three timeouts across two iterations, so the strategy never reached verification or any downstream stage. This is an infrastructure/coding-process failure, not a verdict on the mechanism.

Outcome Summary

A long-short, single-instrument, pure-OHLCV volatility contraction-then-expansion trend-emergence strategy on the BTC COIN-M inverse perp (BTCUSD_PERP.BINANCE_CM, 1H) that armed on a realized-volatility compression (ATR ratio below a threshold), then entered only on a confirmed ATR-multiple directional thrust while armed, riding it with an ATR chandelier trail — a deliberately path-dependent salvage of the Bollinger-squeeze concept.

Outcome Summary

No performance data exists — the strategy never produced a backtest. It stalled in the coding stage, and no verification, backtest, optimization, or analysis metrics were generated.

Iteration History

sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (833 days of BTCUSD_PERP.BINANCE_CM-1-HOUR-LAST-EXTERNAL). 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).
Strategy report

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