Skip to content

View translation

XrpFourHourExecDailyRangeExpansionBreakoutLS

Hypotheses

XRP Breakout on Daily Range Expansion

Hypotheses

A breakout strategy on XRPUSDT futures that trades daily range expansions. When the current day's range (high - low) exceeds the average daily range by a significant factor, it signals a directional regime shift. The strategy enters in the direction of the breakout (close near high = long, close near low = short) on 4-hour bars, capturing multi-day continuation moves. XRP is chosen because it has a distinctive pattern of extended consolidation followed by explosive moves — often driven by regulatory news, Ripple partnership announcements, or whale accumulation. This boom-bust character makes range expansion a particularly effective signal. Only 3 parameters (range lookback, expansion multiplier, close position threshold), keeping it robust and easy to verify.

Hypotheses

Iteration-2 minimal fix for the Layer-3 'No trades produced' failure. Root cause: should_enter requires self._fresh, which was set only inside on_extra_bar from a separate DAILY extra-bar feed; that feed never populated in the sandbox, so _fresh stayed False and no entry ever fired across all 13,941 bars. The 4H Donchian/expansion mechanism is unchanged; I only changed the SOURCE of the daily bars: calculate_signal now reconstructs daily OHLC by aggregating the 4H primary bars within each UTC day (boundary detected via ts_init // 86_400e9, finalizing the previous day when a new day's first bar arrives) and calls the existing _process_daily expansion logic. Config drops extra_instruments/extra_bar_types (single feed). Imports stay clean (Layer 1 green), the continuous-signal scaffolding and entry/exit/sizing logic are preserved (Layer 2 green), so no earlier-layer regression while the strategy now produces long/short entries on genuine daily range-expansion regime shifts. Venue remains BINANCE USD-M futures (long-short needs margin), leverage 1.0 (unused in amplification, so the leverage_set_but_unused gate does not trigger).

Hypotheses

Optimization over-selected a healthy 204-trade strategy into a 10-trade outlier fit that fails every generalization gate — the front-loading flagged at pre-optimization proved fatal. The optimizer drove close_pos_threshold 0.70 -> 0.953 and expansion_mult up, collapsing the sample to 10 trades (exposure 1.04%, data_days 25), so the flashy optimized Sharpe 3.37 is fit to a handful of outlier breakouts. The decisive gates reject it: deflated_sharpe 0.049 (is_significant FALSE) with the optimized Sharpe 3.37 far below the expected-max luck bar 7.66 over 225 trials, PBO 0.5714, sharpe_ci_low -3.80 (CI hugely straddles 0); walk-forward is_overfitted=TRUE with avg IS 5.71 collapsing to avg OOS 0.0 and ALL three OOS windows producing ZERO trades; and sensitivity FAILED with 4 cliffs on the core params. The holdout 'passed=true' is a DEGENERATE artifact — holdout_sharpe 0.50 with ratio 0 against a zero walk-forward-OOS denominator (one lucky window, not robustness), NOT a real pass. The underlying edge is front-loaded (2020 +27.5%, 2024 +45.3%; 2021/2022/2025 negative) and does not generalize. Not promote: DSR 0.049, is_overfitted, zero-trade OOS, 10-trade config, degenerate holdout. Not iterate (attempt 1 of 2): the only high-Sharpe configs the search found are sparse outlier-fits (the heatmap shows densifying lowers Sharpe), and the base 204-trade config is itself only Sharpe 0.61 with a front-loaded, DSR-failing edge — there is no robust region to tune toward, so a second sweep re-finds another sparse over-fit. Not revise_hypothesis: single-asset front-loaded breakout edge with no proven sibling stranded on a dead target. FAILURE PATTERN: single-asset daily range-expansion breakout on XRP has a front-loaded edge (2020/2024) that, under best-of-225 selection, only yields high in-sample Sharpe by over-thinning to ~10 outlier trades — producing zero-trade walk-forward OOS windows, a degenerate holdout pass (ratio 0 vs a 0 OOS denominator), DSR 0.049, and 4 core-param cliffs. A healthy base trade count does not survive optimization when the edge is regime-concentrated and the optimizer is free to chase sparse outlier fits.

Implementation

Long-short XRP daily range-expansion breakout on XRPUSDT.BINANCE USD-M futures with 4H execution, single feed. The daily bars are reconstructed by aggregating the 4H primary feed within each UTC day; when a completed day's range exceeds 1.5x the average of the prior 20 daily ranges, the close position sets direction (near high -> long, near low -> short) and a 4H entry fires in that direction. Exits on a 12% take-profit, 5% stop, daily-regime flip against the position, or a 30-bar (~5 day) time stop. The signal is a continuous daily-direction-times-expansion score plus a tiny 4H ROC term. leverage 1.0.

Verification Results

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: XRPUSDT.BINANCE-4-HOUR-LAST-EXTERNAL, Bars processed: 13942 Diagnostics: should_enter() returned a side 0 times over 13941 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds. Ensure your strategy produces trades with the given data and parameters.

Backtest Review

Healthy sample: 204 trades (~32/yr), all submitted, 0 dropped; ITER-2 daily-reconstruction-from-4H fix works — signal fires as designed

Backtest Review

Viable per-trade economics: expectancy +$290/trade (~0.67% on ~$43k notional), well above the ~0.10% RT fee floor; PF 1.165, Sharpe 0.61, Sortino 0.93

Backtest Review

Net-positive functioning edge, both directions traded (121 long / 83 short), positive in 4 of 7 years; acceptable impact (8.5%) and capacity (~$14M)

Backtest Review

Regime-concentrated: +70% total is front-loaded into 2020 (+27.5%) and 2024 (+45.3%, mostly the Nov-2024 rally); negative in 2021/2022/2025 — generalization risk for the holdout

Backtest Review

Modest risk-adjusted profile with high drawdown: max_drawdown 31.4% (CI up to 59.6%), Sharpe CI straddles 0 (-0.57 to 1.63), max_drawdown_duration ~1327 days

Backtest Review

win_rate 44% with PF 1.165 — edge depends on a few large continuation winners (largest_win $13.5k vs largest_loss -$14.3k); kurtosis 10.3

Analysis

Base strategy was implemented correctly with a healthy sample (204 trades, both directions) and a real per-trade edge (PF 1.16) — it earned the optimization pass

Analysis

Optimized config shows low impact (1.4%) and huge capacity (~$507M) — but on only 10 trades, which is meaningless

Analysis

Optimizer over-selected to sparsity: close_pos_threshold driven to 0.953, collapsing 204 trades -> 10 (exposure 1.04%, data_days 25) — Sharpe 3.37 is fit to ~10 outlier trades

Analysis

Failed deflated Sharpe: DSR=0.049 (bar 0.95) with the optimized Sharpe 3.37 far below the expected-max luck bar 7.66 over 225 trials; sharpe_ci_low -3.80 (CI hugely straddles 0); PBO 0.5714

Analysis

Walk-forward is_overfitted=TRUE: avg IS 5.71 -> avg OOS 0.0, with ALL three OOS windows producing ZERO trades (over-thinned signal does not fire out-of-sample)

Analysis

Holdout 'passed=true' is a DEGENERATE artifact: holdout_sharpe 0.50 with ratio 0 measured against a zero walk-forward-OOS denominator — one lucky window, not robustness

Analysis

Sensitivity FAILED with 4 cliffs on the core params (expansion_mult, range_lookback, take_profit_pct, close_pos_threshold)

Analysis

Underlying edge is front-loaded (2020 +27.5%, 2024 +45.3%; 2021/2022/2025 negative) and does not generalize

Outcome Summary

This strategy traded XRP daily range-expansion breakouts both directions, executing on 4H bars, and earned an 'optimize' verdict on a functioning base edge (204 trades, +70.3%, Sharpe 0.61) — though flagged as front-loaded into 2020 and 2024 with three negative years. Optimization confirmed the worry by chasing sparse outlier fits: it thinned the config to 10 trades for a flashy Sharpe 3.37 that failed deflated Sharpe (0.049), produced zero-trade walk-forward OOS windows, a degenerate holdout pass, and four core-parameter cliffs. The analyst abandoned it at the analyzing stage on its second iteration as a regime-concentrated edge with no robust region to tune toward — the only high-Sharpe configs were sparse over-fits — so it stopped before risk review.

Outcome Summary

A healthy base trade count does not survive optimization when the edge is regime-concentrated — best-of-N selection over-thins a front-loaded breakout to ~10 outlier trades that fire zero times out-of-sample, and a holdout 'pass' computed against a zero OOS denominator is a degenerate artifact, not robustness.

Outcome Summary

It cleared the backtest-review gate with an 'optimize' verdict, but the post-optimization analyst abandoned it: the optimizer over-selected to sparsity (close_pos_threshold 0.70→0.953, 204→10 trades), and the decisive gates failed — deflated Sharpe 0.049 (<0.95) far below the 7.66 expected-max, PBO 0.57, a CI deeply straddling zero, walk-forward overfitted with all three OOS windows producing zero trades, a degenerate holdout 'pass' (ratio 0 against a zero OOS denominator), and 4 core-parameter sensitivity cliffs.

Outcome Summary

A long-and-short daily range-expansion breakout strategy on XRPUSDT executed on 4H Binance futures (1.0x leverage, 0.40 position) — daily bars reconstructed from the 4H feed, signaling when a completed day's range exceeded 1.5x its 20-day average and the day's close position set direction (near high → long, near low → short), holding multi-day continuation.

Outcome Summary

The base backtest had a functioning edge — 204 trades (121 long, 83 short), +70.3% total, Sharpe 0.61, profit factor 1.165, expectancy +$290/trade (~0.67%), a 31.4% max drawdown — but was regime-concentrated (front-loaded into 2020 +27.5% and 2024 +45.3%, negative in 2021/2022/2025); optimization collapsed it to 10 outlier trades with a flashy but meaningless Sharpe 3.37.
Strategy report

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