Skip to content

View original

XrpWeeklyRangePositionLongDaily

Hypotheses

XRP Weekly Range-Position Long on Daily Bars

Hypotheses

A minimal long-only swing strategy on XRPUSDT perpetual futures using daily (1D) bars. Uses ONLY OHLCV data — no funding rates, no L/S ratios, no liquidations, no pairs — to keep verification fast and deterministic. The strategy buys XRP when it pulls back to the lower portion of its weekly (7-day) range AND the medium-term trend is still neutral-to-up. The hypothesis: XRP exhibits a strong weekly seasonality of 'sell into Friday/Saturday weakness, recover into mid-week' driven by a unique mix of Asia-Pacific retail flow concentration and weekend exchange illiquidity that other majors (BTC/ETH) do not display as cleanly. By only entering when XRP is in the bottom 30% of its 7-day range while still above its 30-day SMA, the strategy avoids both blow-off tops and outright downtrends. Exits are simple: a fixed 4% take-profit (well above the ~0.10% RT futures fee) OR a fixed 3% stop-loss OR a 7-bar time stop. Total free parameters: 5 (range_lookback=7, range_position=0.30, trend_sma=30, take_profit=0.04, stop_loss=0.03). XRP is chosen because (a) it has been a top-5 crypto by liquidity since 2017 with deep futures markets, (b) it is uncorrelated to ETH-ecosystem catalysts (no L1/L2/DeFi exposure), giving portfolio diversification, and (c) it has historically shown the cleanest weekly mean-reversion behavior of any large-cap.

Hypotheses

Implements the hypothesis exactly with its 5 free parameters. calculate_signal computes the weekly range_position continuously every bar (0.5 - range_position plus a small trend tilt) so Layer-2 frozen-signal detection passes, while the discrete two-part entry gate (bottom-30%-of-range AND above-30-day-SMA) is evaluated in should_enter from cached components — keeping the signal continuous rather than gated behind a constant. Exits are the specified 4% TP / 3% SL / 7-bar time stop, all implemented in should_exit via get_position_pnl_pct and a bar counter reset when flat. Venue routing: the strategy is long-only, unleveraged, and its edge is weekly OHLCV mean-reversion (NOT funding-based), so per the routing rule it belongs on BINANCE_SPOT (CASH) rather than futures — this avoids paying for a margin account it doesn't use, and because only one position is held at a time (flat between entries via the TP/SL/time exit) the spot stable-balance equity is intact at each sizing call, so equal-risk sizing is correct. I overrode the hypothesis's 'perpetual futures' wording for this reason and note it here. leverage=1.0 (spot hard cap) and is not referenced in sizing, so the leverage-set-but-unused gate is not triggered. Sizing is capital-relative (2% equity risk against the 3% stop ≈ 0.67x equity notional, capped at 0.95x cash) and never returns a hardcoded tiny qty; size precision is read from the instrument. XRPUSDT spot is a top-5-liquidity symbol with deep daily history since 2017, avoiding data_unavailable. The 4% take-profit is far above the ~0.20% spot round-trip fee, giving positive expected per-trade edge net of costs.

Hypotheses

Correctly-implemented weekly range-pullback strategy with NO edge on XRP daily: profit_factor 0.68, Sharpe -2.71, expectancy -$594/trade, total return -41% over 8 years, negative in 7 of 9 years (73-trade, 9-year sample, so this is a fair read, not noise). Win rate 39.7% with avg_win ($3,198) ≈ avg_loss ($3,093) is a structural loser — a ~1:1 payoff at a sub-40% hit rate cannot profit — and the tight 3% stop gets whipsawed on XRP's daily vol (10 consecutive losses) while commissions eat 8.6% of gross. The 'buy the lower weekly range while above the 30-day SMA, recover mid-week' premise simply does not hold for XRP: buying dips-in-uptrend repeatedly catches continued weakness. The failure is in the signal, not the parameters — there is no positive base or robust region for optimization to build on, and tuning to 73 trades would merely overfit the lone 2021 bull year and then fail DSR/holdout. Not worth 2 hours of optimization. NOTE for research: the claimed XRP weekly seasonality edge is not present in daily OHLCV; a different timeframe or an explicit day-of-week signal would be a separate hypothesis, not an iteration of this one.

Implementation

Minimal long-only swing strategy on XRPUSDT (BINANCE_SPOT) daily bars using only OHLCV. It buys XRP when it pulls back into the bottom 30% of its 7-day (weekly) high-low range AND the close is still above its 30-day SMA (trend neutral-to-up), capturing XRP's weekly mean-reversion while avoiding blow-off tops and outright downtrends. Positions exit on a fixed 4% take-profit, 3% stop-loss, or a 7-bar time stop. Five edge parameters: range_lookback (7), range_position_max (0.30), trend_sma (30), take_profit (0.04), stop_loss (0.03). Fixed-fractional risk sizing (2% equity vs the stop), capped at 95% of cash.

Backtest Review

Mechanism correctly implemented and matches the hypothesis: 73 long range-pullback entries, two-part gate, clean diagnostics.

Backtest Review

Minimal 5-parameter design with adequate sample (73 trades over 9 years) and low exposure (8%) — a fair, clean read on the edge.

Backtest Review

Worked in the 2021 bull (+17%) — the dip-buy fires correctly when XRP trends up.

Backtest Review

No edge: profit_factor 0.68, Sharpe -2.71, expectancy -$594/trade, total return -41% over 8 years, max_drawdown 46%.

Backtest Review

Negative in 7 of 9 years — structural, not a single-regime artifact; only 2021 meaningfully positive.

Backtest Review

Win rate 39.7% with ~1:1 avg_win/avg_loss is a guaranteed loser; the tight 3% stop gets whipsawed (max_consecutive_losses 10) on XRP's daily volatility.

Backtest Review

Fee drag: commission_pct_of_gross 8.6% on a non-existent gross edge.

Backtest Review

The weekly-seasonality / mean-reversion premise does not hold for XRP daily — buying lower-range pullbacks repeatedly catches continued weakness.

Outcome Summary

XrpWeeklyRangePositionLongDaily bet that XRP's alleged 'sell into weekend weakness, recover mid-week' seasonality would make daily lower-range pullbacks profitable buys while the 30-day trend held. The mechanism was cleanly implemented over a fair 9-year, 73-trade sample, but it lost decisively — profit factor 0.68, Sharpe -2.71, -41% return, negative in 7 of 9 years — with its tight stop whipsawed by XRP's daily volatility and fees consuming 8.6% of gross. The analyst abandoned it at backtest review after one iteration, judging the failure to be in the signal rather than the parameters: the weekly-seasonality premise doesn't hold in daily bars, so optimization would only overfit the lone 2021 bull year. The note for research is that any genuine XRP seasonality edge would need a different timeframe or an explicit day-of-week signal.

Outcome Summary

The claimed XRP weekly mean-reversion seasonality is simply not present in daily OHLCV, and a ~1:1 reward/risk setup at a sub-40% win rate is a structural loser; testing the premise properly would need a different timeframe or an explicit day-of-week signal as a separate hypothesis, not a re-tuning of this one.

Outcome Summary

The analyst issued an 'abandon' verdict at the pre-optimization backtest-review gate: the mechanism was correctly implemented over an adequate sample, so the loss was a clean read of a signal/premise failure — buying lower-weekly-range dips in an uptrend repeatedly caught continued weakness — and a ~1:1 payoff at a sub-40% hit rate cannot profit, leaving no positive base for optimization to build on.

Outcome Summary

A minimal long-only swing strategy on XRPUSDT daily bars (routed to BINANCE_SPOT) betting on a claimed XRP weekly mean-reversion seasonality: it bought when price sat in the bottom 30% of its 7-day range while still above its 30-day SMA, exiting on a 4% take-profit, 3% stop, or 7-bar time-stop, using five parameters and pure OHLCV data.

Outcome Summary

Over 9 years and 73 trades it had no edge: profit factor 0.68, Sharpe -2.71, expectancy -$594/trade, -41% total return, and a 46% max drawdown. With a 39.7% win rate and roughly 1:1 average win/loss it was a structural loser, negative in 7 of 9 years (only 2021 meaningfully positive, +17%), with the tight 3% stop whipsawed (10 consecutive losses) and commissions eating 8.6% of gross.
Strategy report

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