Strategies
XRP Trend-Pullback Continuation, Long-Short (XRPUSDT.BINANCE USD-M, 4H entry + 1D trend filter) — buy the DIP inside a confirmed uptrend / sell the RIP inside a confirmed downtrend, entering on momentum RE-acceleration off a fast EMA rather than on a breakout, ATR-trailing exit, 3-parameter
Outcome: Abandoned
XrpTrendPullbackContinuationLS
Outcome Summary
A gross-negative (PF<1) signal can't be optimized above costs, and an equal-weighted per-trade capture above the fee floor is misleading when USD expectancy is negative.
Hypothesis
Implementation
XRPUSDT.BINANCE USD-M perpetual, long-short, 4H entry with a 1-DAY trend confirm. A daily trend direction (sign of the close/close[-daily_lookback] return) sets the only side allowed. On the 4H leg the strategy computes a continuous ATR-normalised distance from a fast EMA, dev = (close - EMA_fast)/ATR, every bar. It enters ONLY after price has first pulled back against the trend (min dev over the last pullback_window bars <= -pullback_atr for longs, mirrored for shorts) and then RE-ACCELERATES: close back on the trend side of the EMA (dev > entry_dev) with a higher high (lower low for shorts). Exits are an ATR trailing stop (give back trail_atr_mult x entry ATR from the best close since entry, which is also the initial stop) or the daily trend flipping against the position; a dip below the EMA is NOT an exit because that dip is the setup. Sizing is risk-first (equity * risk_pct / trailing-stop distance) capped at max_notional_frac * equity * leverage, so the requested 2x leverage is genuinely consumed.
Verification Results
No change required. If earlier first-entry is ever desired, seed _bar_count from len(self._bars) at first calculate_signal call rather than counting from zero.
min_bars_required() is overridden and shadows the base method. This is deliberate and safe here (it drives both the base warm-up gate and the strategy's own should_enter gate), but note the effect: the base template already gates trading until len(self._bars) >= min_bars_required (~41 bars), AND should_enter re-checks self._bar_count < min_bars_required. Because calculate_signal only runs post-base-warm-up in backtests, the strategy effectively double-warms (~82 4H bars / ~13 days) before the first entry. Not a defect — just conservative; entry cadence (~40/yr in sandbox) confirms it still trades.
Backtest Review
- Sharpe
- 0.04
- Total return
- 2.71%
- Max drawdown
- 19.68%
- Trades
- 264
- Win rate
- 36.7%
- Profit factor
- 0.99
Reliable, decisive sample: 264 trades over 6.7 years of XRP 4H history; metrics_reliable=true.
Trades faithfully implement the hypothesis (264 signaled = 264 submitted, balanced 126 long / 138 short, ATR-trailing exit, daily-trend gate) — this is a fair test of the pullback-entry mechanism, not a coding bug.
Equal-weighted avg_trade_return_pct 0.663% nominally clears the 0.15% Binance USD-M fee floor.
Profit factor 0.987 < 1.0 — the signal is GROSS-negative before even considering costs; commission is only 3.69% of gross, so this is edge-absent, not fee-fragility.
Negative expectancy: avg_trade_pnl_usd -$5.76, expectancy -5.76 — losers carry larger notional than the 0.663% equal-weighted capture implies (avg_loss $698 across many, avg_win $1187 across few; win_rate 0.367).
Sharpe 0.045 with CI [-0.658, 0.772] straddling zero; Sortino 0.056; recovery_factor -0.073; CAGR -0.23%; calmar -0.011.
Headline +2.71% total_return is inflated by end_unrealized_pct 4.23% (open MTM at last bar) — realized track record is NEGATIVE (~-1.5%).
Regime split is INVERTED vs the trend-continuation intent and time-decaying: profitable only in the 2020-2022 bull (annual +6.9/+2.6/+11.0), then loses every year since (2023 -4.8, 2024 -3.3, 2025 -6.2, 2026 -6.4); bleeds in the calm tercile (-12.6%, Sharpe -0.75). QA's edge concern is borne out on full history.
The better-fill thesis (pullback entry lifts capture above cost) is not supported: capture exists per-trade equal-weighted but the book still loses money net of size and direction.
Outcome Summary
Abandoned at pre-optimization backtest review — analyst verdict 'abandon' for negative expectancy / edge-absent; profitable only in 2020-2022 bull, losing every year since and bleeding in calm regimes.
A long-short XRPUSDT.BINANCE USD-M strategy (4H entry + 1D trend filter) that entered on a pullback-and-resume off a fast EMA inside a confirmed daily trend rather than on a breakout, aiming for a better fill that lifts per-trade capture above fees.
Over 264 trades / 6.7 years: profit factor 0.987 (gross-negative before costs, commission only 3.69% of gross), size-weighted expectancy -$5.76/trade, Sharpe 0.045 (CI [-0.658, 0.772]), win rate 36.7%; the +2.71% headline is negative once the +4.23% open-position unrealized is stripped.
Backtest and paper results are hypothetical. Trading involves risk of loss.