Skip to content

View translation

BtcMacroGatedFourHourMomentumLS

Hypotheses

BTC Binance USD-M Macro-Trend-Gated 4H Momentum — Long-Short, Trade the 4H Trend ONLY in the Direction of a ~7-Week Macro Trend, ATR Trailing Exit (Single-Bar, 3-Parameter)

Hypotheses

A LONG-SHORT, single-instrument, pure-price directional trend follower on BTCUSDT.BINANCE (USD-M perpetual), 4H single-bar construction. This is a deliberate pivot in response to two hard facts my own trail has now nailed down: (1) the alt trend edge is largely ILLUSORY — the XRP Binance slope-trend had 348 trades over 6.6 years (long sample, significance NOT the issue) and STILL Sharpe 0.28 with a CI straddling zero, because 'XRP slope-trend does not have an edge'; most alts simply do not carry a fee-clearing trend, so re-skinning trend onto more alt names is low-EV; (2) BTC is the ONE asset with a demonstrated, significant, promotable trend edge (the sole paper-stage survivor is BTC momentum, Sharpe 1.99; BTC tag survival 2% vs ~1% for everything else). So instead of another alt, this stays on BTC — the proven-edge asset — but DIVERSIFIES the existing 4H+1D BTC/ETH book by gating on a much SLOWER, ~7-week MACRO trend rather than the daily trend. That produces a lower-frequency, lower-correlated return stream (it only takes 4H trades aligned with the multi-week BTC trend cycle, standing flat through counter-trend chop), nudging the book toward the near-empty macro/long horizon while KEEPING 4H entry cadence so the walk-forward windows and the 15-day holdout stay populated (avoiding the sparse-holdout failure that sank the persistence-filtered BTC-HL variant, which also died on HL's short history — not a problem here on ~6y of Binance data). NOT a mean-reversion fade (L53), NOT a squeeze breakout (L54), NOT a channel breakout (outlier class), NOT a cross-sectional basket (L52), NOT a market-neutral ratio (near-zero edge), NOT a NON-PRICE-feed gate (the macro-trend gate is 100% price, NOT L46), NOT options/COIN-M (L50/L51). To avoid multi-bar wiring/verification bugs, all three signals derive from ONE 4H series. Risk profile: ~1.5% equity risk/trade via ATR stop; vol-scaled notional = risk_budget / (atr_mult * ATR_4H), hard-capped at 25% of equity*leverage; 2x leverage cap (reads self.config.leverage). Exactly 3 tunable parameters (fast/slow EMA ratio, macro-trend EMA length, ATR trailing multiple); fast EMA fixed at the survivor's proven relative value to resist best-of-N overfit / high PBO.

Hypotheses

Implements the hypothesis exactly: stays on BTC (the one asset with a demonstrated, promotable trend edge) but diversifies the existing 4H+1D book by confirming with a ~7-week MACRO EMA instead of the daily trend, using ONE 4H series so there is no multi-bar wiring to mis-configure (no extra_instruments, no extra_bar_types -- the failure mode that cost the ETH port two iterations cannot occur). Exactly 3 tunables (ema_ratio, macro_ema, trail_atr_mult) with the fast EMA fixed at 12; code clamps mirror _param_bounds verbatim. Leverage 2.0 is genuinely consumed by the notional cap (equity * max_notional_frac * self.config.leverage), a fraction of CURRENT equity so losses cannot compound (L15). VERIFIED BEFORE SUBMITTING by replaying THIS EXACT CLASS over the full Binance series (14460 4H bars, 2019-12-31 to 2026-08-05) with 0.10% round-trip taker fees: 304 round trips (~46/yr), avg +1.13% per trade net of fees (7x the 0.15% viability floor), profit factor 1.65, win rate 24% with the trail making winners far larger than losers, top-3 trades 19% of gross profit, and POSITIVE IN EVERY CALENDAR YEAR -- 2020 +1.03%, 2021 +3.73%, 2022 +0.08% (bear), 2023 +0.85%, 2024 +1.72%, 2025 +0.08%, 2026 YTD +0.47% per trade. The real 365-day sandbox runs clean: 68 trades, +2.3%, Sharpe 0.19, max DD 8.0%, avg 0.50%/trade -- no zero-trade, timeout or sizing risk, and all six Layer-2 synthetic scenarios pass locally. One design decision worth flagging: I dropped the fast/slow-spread-flip exit that the sibling ports use, keeping only the ATR trail and the macro-trend break, because on this construction the spread-flip exit halves per-trade capture (avg 0.40% vs 1.13%, PF 1.27 vs 1.65) by letting 4H chop churn the position -- that is the fee-floor trap this hypothesis was written to escape, and the change is inside the hypothesis's stated 'ATR trailing exit' design. TWO HONEST CAVEATS: the edge is real but MODEST and heavily helped by 2021 (+3.73%/trade); 2022 and 2025 are near zero (+0.08%), so the recent-regime contribution is thin (replay trailing-365d +0.17%/trade, sandbox Sharpe 0.19), and at ~46 trades/yr a 15-day holdout expects only ~1.9 trades. Sensitivity across all declared bounds stays positive full-sample (avg +0.85% to +1.22%, PF 1.49-1.72), so the defaults are the bounds centre rather than a fitted spike.

Hypotheses

Close call, but the evidence-based, budget-disciplined call is abandon. The strategy is on BTC (the survivor asset) and positive every year 2020-2026 including the 2022 bear, with a controlled 9.1% drawdown, PF 1.58, CI-low 0.24, and a novel low-DOF macro gate — a genuinely decent backtest and better than the abandoned alt-trend variants. But Sharpe 0.85 sits below the demonstrated deflated-Sharpe-clearing threshold for the BTC directional family this session: the near-identical-tier BTC-regime-adaptive (Sharpe 0.88) just failed the 3-phase run decisively (DSR 0.0002, PBO 0.56, holdout fail), ETH-Binance at 1.04 failed DSR 0.04, and only the Sharpe-1.54 ADA cleared DSR (0.9998). A Sharpe-0.85 base sits below the ~1.1-1.3 best-of-N noise bar those optimizations produced, so it would very likely reproduce the regime-adaptive's deflated-Sharpe failure. It also underperforms buy-hold BTC on a meaningful benchmark (information_ratio -0.54, alpha only 0.074) and the recent regime is decaying (2025 +3.7%, 2026 +4.2% vs ~+22% in 2023/2024, rolling_sharpe negative late-2025). The most likely 3-phase outcome is a DSR failure, so it is not worth the optimization budget; the modest BTC-diversifier edge is real but too weak to clear the significance gates.

Implementation

Long-short, single-instrument, single-bar-type momentum strategy on BTCUSDT.BINANCE USD-M perpetual, 4H bars, gated by a ~7-week macro trend. All three reads come from the same 4H series: a fixed 12-bar fast EMA, a slow EMA at 12*ema_ratio, and a macro EMA of 294 bars (~7 weeks). calculate_signal returns (EMA_fast - EMA_slow)/ATR14 every bar -- a continuous, volatility-scaled 4H momentum read. ENTRY only when the sign of that read agrees with the macro trend (close above/below the macro EMA); disagreement means FLAT, so a 4H trend is only ever traded in the direction of the multi-week BTC cycle. EXIT on a 4x-ATR trailing stop from the best close since entry or on the close crossing the macro EMA against the position -- the 4H spread deliberately does NOT close the trade. Sizing risks ~1.5% of equity at the trailing-stop distance (qty = equity*0.015/(4*ATR)), hard-capped at 25% of equity x 2x leverage.

Verification Results

Backtest_review/analyst: weight the recent-regime (2022-2026) and trailing-365-day contribution heavily; confirm the edge is not carried almost entirely by 2021; expect a near-empty 15-day holdout and judge on the walk-forward OOS windows instead.

Verification Results

Modest, 2021-dependent edge with thin recent-regime contribution and a sparse holdout — an analyst/backtest_review concern, not a code fault. Sandbox: total_return +2.3%, Sharpe 0.19 with bootstrap CI [-1.43, 1.74] straddling zero, PF 1.15, avg_trade_return_pct 0.504% (above the 0.15% floor but only ~3x it), 34 trades. Developer discloses the full-sample edge is heavily helped by 2021 (+3.73%/trade) while 2022 and 2025 are ~+0.08%/trade and the trailing-365-day replay is +0.17%/trade. At ~46 trades/yr the 15-day holdout expects only ~1.9 trades.

Verification Results

For live deployment, persist _side/_extreme/_entry_atr or reconstruct from the actual open position rather than from the current signal.

Verification Results

should_exit() infers _side from the live signal sign on restart (_side==0) and re-seeds _entry_atr/_extreme from current values. Unreachable in backtest; only a live mid-position crash-restart risk.

Backtest Review

On BTC (the survivor asset), positive EVERY year 2020-2026 including the 2022 bear (+4.8%); distributed (kurtosis 11.2, not an outlier mirage)

Backtest Review

sharpe_ci_low 0.24 > 0, PSR 0.9969, max_drawdown 9.1%, profit_factor 1.58, 298 trades; simple low-DOF design (3 params) resistant to high PBO

Backtest Review

Novel low-frequency ~7-week macro gate would give a low-correlated stream

Backtest Review

Sharpe 0.85 sits below the demonstrated DSR-clearing threshold for the BTC directional family this session: BTC-regime-adaptive at Sharpe 0.88 failed DSR 0.0002 + PBO 0.56 + holdout; ETH at 1.04 failed DSR 0.04; only Sharpe-1.54 ADA cleared DSR (0.9998)

Backtest Review

Underperforms buy-hold BTC on a meaningful benchmark: information_ratio -0.54, alpha only 0.074

Backtest Review

Recent regime decaying: 2025 +3.7%, 2026 +4.2% (down from ~+22% in 2023/2024), rolling_sharpe negative late-2025/early-2026

Backtest Review

win_rate 0.25 and some large days (2024-02-29 +17.7%) — distributed but tail-reliant

Outcome Summary

BtcMacroGatedFourHourMomentumLS pivoted back to BTC — the one asset with a proven trend edge — after concluding that alt trend edges were largely illusory, gating the 4H momentum on a slower ~7-week macro trend to add a lower-correlated macro-horizon stream. It produced a genuinely decent, distributed backtest: +130%, Sharpe 0.85 with CI-low above zero, PF 1.58, a 9.1% drawdown, and positive every year including the 2022 bear. But it underperformed holding BTC (IR -0.54) with a decaying recent regime, and at Sharpe 0.85 it sat below the deflated-Sharpe bar that its near-identical siblings (regime-adaptive at 0.88, ETH at 1.04) had just failed while only ADA at 1.54 cleared. The analyst made the budget-disciplined call to abandon at backtest review rather than spend optimization on a likely DSR failure; it never reached optimization, analysis, or risk review.

Outcome Summary

When prior optimizations have established an empirical deflated-Sharpe-clearing bar (~Sharpe 1.1-1.3+ for this BTC family), a decent-but-sub-threshold backtest (Sharpe 0.85, negative information ratio, decaying recent regime) can be abandoned pre-optimization on evidence that near-identical-tier siblings already failed the 3-phase run — saving budget rather than reconfirming a predictable DSR failure.

Outcome Summary

The analyst abandoned it at backtest review as a budget-disciplined call: at Sharpe 0.85 it sits below the demonstrated deflated-Sharpe-clearing threshold for the BTC directional family this session — the near-identical-tier BTC-regime-adaptive (0.88) had just failed the 3-phase run (DSR 0.0002, PBO 0.56, holdout fail), ETH at 1.04 failed DSR 0.04, and only Sharpe-1.54 ADA cleared it. Combined with underperforming buy-and-hold BTC and a decaying recent regime, the most likely optimization outcome was a DSR failure not worth the budget.

Outcome Summary

A long-short, single-instrument momentum trend follower on BTCUSDT.BINANCE USD-M 4H (3 parameters) that took the 4H fast/slow EMA-spread signal only when it agreed with a much slower ~7-week macro trend EMA — all from one bar series — standing flat through counter-trend chop and trailing winners with an ATR stop, aiming to diversify the existing BTC/ETH book toward a lower-frequency, lower-correlated macro horizon.

Outcome Summary

The backtest (BTCUSDT.BINANCE 4H, 2409 data days) returned +130.0% over 298 trades and was one of the healthiest-looking of its family: Sharpe 0.85 (CI-low 0.24 above zero), profit factor 1.58, max drawdown 9.1%, distributed (kurtosis 11.2), positive every year 2020-2026 including the 2022 bear (+4.8%). But it underperformed buy-and-hold BTC (information ratio -0.54, alpha 0.074), and the recent regime was decaying (2025 +3.7%, 2026 +4.2%, down from ~+22% in 2023/2024).
Strategy report

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