Skip to content

View original

BnbDualTimeframeMomentumConfluence4HLS

Hypotheses

BNB Dual-Timeframe Momentum Confluence, Long-Short (Single-Instrument BNBUSDT.BINANCE USD-M Perp, 4H Primary + 1D Trend Confirm, Flat on Disagreement, ATR-Trailing Exit, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument, pure-price momentum-confluence trend follower on BNBUSDT.BINANCE (USD-M perpetual), 4H primary bars with a 1D trend confirmation. It is a deliberate, evidence-driven re-application of the ONLY archetype that has survived this factory's full pipeline to paper: dual-timeframe momentum confluence long-short (promoted on ADAUSDT Sharpe 1.60 and BTCUSDT Sharpe 1.99). The mechanism takes a directional position ONLY when the fast (4H) momentum and the slow (1D) trend AGREE, and stands flat when they disagree. BNB is chosen precisely because it is NOT the over-mined BTC/ETH/SOL series and has an independent fundamental driver (exchange-token / BNB-chain flows), so its multi-day trend regime is not just another correlated copy of the majors' price path — yet it is deep enough in liquidity that market impact (the killer of the SOL/ETH dollar-neutral pairs trade) is negligible for single-instrument directional sizing. This is NOT the volume-confirmed variant (L91) and carries NO regime/efficiency/volatility gate bolted onto momentum (L92): the confluence of two horizons IS the mechanism, and it is the exact structure that already generalized across two distinct majors (ADA and BTC), which is the empirical warrant for a third liquid major.

Hypotheses

Implements the hypothesis exactly: single-instrument, pure-price, long-short momentum confluence on BNBUSDT.BINANCE USD-M perp with a 4H primary and a 1D trend confirmation, flat on disagreement, ATR trailing exit, three tunables. No volume confirmation and no regime/efficiency/volatility gate is bolted on (per L91/L92) -- the two-horizon confluence IS the mechanism, matching the structure that already generalized to paper on ADA (Sharpe 1.60) and BTC (Sharpe 1.99). The daily leg is supplied via extra_instruments/extra_bar_types with BNBUSDT.BINANCE listed positionally alongside the 1-DAY bar type (the resolver pairs them by index), and since 1-DAY is slower than the 4H primary the base template's same-timeframe alignment barrier does not stall primary bars. calculate_signal returns the raw ATR-normalized EMA spread every bar (continuous, never gated behind the entry condition); the entry decision lives in should_enter. Only ema_ratio, daily_lookback and trail_atr_mult are optimizer-visible -- the fast EMA, ATR period, risk fraction and notional cap are read under underscore-prefixed keys that the walk-forward and sensitivity engines skip, holding the effective search surface at 3 dimensions to keep PBO down; the declared _param_bounds mirror the in-code clamps exactly and sit on the robust plateau the ADA sensitivity map identified. leverage=2.0 is genuinely consumed: the notional cap is max_notional_frac * equity * self.config.leverage. Futures venue is correct because the strategy takes short positions. All state is incremental (EMAs, bounded ATR deque, deque of daily closes), so per-bar work is O(1) and the 300s smoke budget is safe; entry fires whenever the 4H spread and the 18-day daily return share a sign, which on 4H BNB bars is a routine, multiple-times-per-month event, not a rare conjunction.

Hypotheses

analyzing_stuck_3_timeouts

Implementation

Long-short dual-timeframe momentum confluence on BNBUSDT.BINANCE USD-M perpetual. Primary 4H bars produce a continuous, volatility-scaled trend read spread = (EMA12 - EMA34)/ATR14; an extra 1-DAY BNB leg produces daily_dir = sign(18-day return). A position is taken ONLY when the two horizons agree (spread>0 and daily_dir>0 -> long; spread<0 and daily_dir<0 -> short) and the strategy stands FLAT on disagreement. Exits on any of: an ATR trailing stop (give-back of trail_atr_mult x entry ATR from the best close since entry), a daily-trend flip against the position, or a 4H spread flip against the position. Risk-first sizing: qty = equity * 1.5% / (trail_atr_mult * ATR), capped at 25% of equity x 2x leverage of notional, so per-trade risk stays ~1.5% of equity regardless of the equity path.

Verification Results

Acceptable as-is. No change needed for measurement.

Verification Results

should_exit() infers _side from the live signal when _side==0 (restart recovery). In a clean backtest _side is always set by should_enter before an open position exists, so this branch is inert here; it is a defensive guard for live restarts and does not affect backtest correctness.

Verification Results

Sandbox Sharpe is a modest 0.58 (CI [-0.19, 1.37] straddles zero) and win_rate is 0.35 with short_win_rate 0.31 vs long_win_rate 0.38 — the edge is asymmetric and right-tail dependent (largest_win 17959 vs avg_win 2851). The BNB port is the third re-application of the ADA/BTC dual-TF confluence archetype; per-trade return 0.94% clears the fee floor comfortably and 454 trades over 2399 days is decisively measurable, so this is not a blocker — flagging for the analyst to confirm the short leg carries its weight on full-history optimization rather than the long leg alone.

Backtest Review

Numerically viable on a decisive sample: 454 trades over 2399 days (2020-2026), metrics_reliable=true, entry_diag shows 454 signaled = 454 submitted with 0 drops.

Backtest Review

avg_trade_return_pct 0.94% clears the Binance USD-M 0.15% fee floor with wide margin; commission is only 5.0% of gross and impact only 8.0% (capacity ~$15.8M) — this is NOT fee/impact-fragile.

Backtest Review

profit_factor 1.30 (>1), positive total_return +110.6%, CAGR 11.5%, recovery_factor 5.97, max_drawdown a controlled 17.0%.

Backtest Review

Trades implement the hypothesized mechanism: balanced long/short (243 long / 211 short), 4H+1D confluence entries, ATR-trailing exits, ~3.6d holds — a fair test of the dual-TF archetype (the one class that has reached paper: ADA 1.60 / BTC 1.99).

Backtest Review

Profitable in all three vol terciles (calm 0.81, normal 0.41, stressed 0.74) and every calendar year positive.

Backtest Review

Sharpe 0.59 (CI [-0.16, 1.35] straddles zero) and PF 1.30 sit well BELOW the ADA/BTC survivor tier (Sharpe>=1.5, PF>=2.0). The prior BNB dual-TF port at 0.67/1.37 went optimize->abandon-overfit — the class prior warns this likely dies in the 3-phase deflation.

Backtest Review

Edge is asymmetric and right-tail dependent: short_win_rate 0.30 vs long_win_rate 0.39, largest_win 17959 vs avg_win 2792, return_kurtosis 7.6 — QA's concern that the short leg may not carry its weight is a real open question for the optimizer to resolve.

Backtest Review

Modest win_rate 0.348 with max_consecutive_losses 10 and a 405-day max-DD duration.

Outcome Summary

BnbDualTimeframeMomentumConfluence4H-0d3feb3d04

Outcome Summary

This strategy re-applied the only archetype to have reached paper in this factory — dual-timeframe momentum confluence, long-short — to BNBUSDT, chosen as an independent liquid major beyond the over-mined BTC/ETH/SOL. The initial backtest was economically viable (454 trades, +110.6% return, PF 1.30, 0.94% per-trade return, 17% max DD) and passed the backtest-review gate with an 'optimize' verdict, but its Sharpe of 0.59 sat well below the ADA/BTC survivor bar. Optimization confirmed the class prior's warning: the run was flagged overfitted (PBO 0.52, deflated Sharpe 0.07) and failed the holdout with a negative out-of-sample Sharpe. It never reached a final analyst decision — the ANALYZING stage stalled and the run was abandoned after three timeouts, so the promote/iterate/abandon call was made by the pipeline's stuck-stage safeguard rather than on the merits.

Outcome Summary

A dual-timeframe momentum port whose initial Sharpe (~0.59) and PF (~1.30) sit far below the ADA/BTC survivor tier tends to fail deflation — here confirmed by the overfit flag, PBO ~0.52 and negative holdout — so weak initial edge on a slow strategy is unlikely to survive optimization scrutiny.

Outcome Summary

The backtest-review gate returned an 'optimize' verdict and the 3-phase optimization ran, but the post-optimization ANALYZING stage never produced a verdict — it was abandoned after the analyst stage stalled with three timeouts (abandon_reason: analyzing_stuck_3_timeouts).

Outcome Summary

A long-short, single-instrument momentum-confluence trend follower on BNBUSDT (Binance USD-M perp) that takes a directional position only when 4H fast momentum and 1D trend agree, standing flat on disagreement and trailing winners out with an ATR stop, re-applying the dual-timeframe archetype that previously reached paper on ADA and BTC.

Outcome Summary

The initial backtest was numerically viable over 454 trades (2020-2026) with +110.6% total return, CAGR 11.5%, profit factor 1.30, 17.0% max drawdown and avg_trade_return_pct 0.94% (well clear of the 0.15% fee floor), but Sharpe was only 0.59 with a CI of [-0.16, 1.35] straddling zero. Optimization then exposed fragility: PBO 0.52 (flagged overfitted), deflated Sharpe 0.07, walk-forward OOS Sharpe 0.29, and a failed holdout (holdout Sharpe -0.25, ratio -0.857).
Strategy report

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