Skip to content

View original

XrpEthRelativeMomentumRotationLS

Hypotheses

XRP-vs-ETH Relative-Momentum Rotation, Dollar-Neutral Long-Short (Two-Instrument XRPUSDT.BINANCE + ETHUSDT.BINANCE Perps, Daily Bars — Long the Stronger / Short the Weaker on XRP/ETH Ratio MOMENTUM, Highest-Dispersion Pair for Fee Viability, Deadband-Gated, Pure OHLCV, 2-Parameter)

Hypotheses

A MARKET-NEUTRAL (dollar-neutral) LONG-SHORT, two-instrument, pure-OHLCV relative-momentum strategy that rotates between XRP and ETH based on the MOMENTUM of the XRP/ETH ratio: long XRP / short ETH dollar-neutral when XRP is trending stronger, flip to long ETH / short XRP when ETH leads. It completes the relative-value sleeve with the HIGHEST-DISPERSION liquid pairing available — XRP's episodic, explosive, largely idiosyncratic moves (regulatory catalysts, retail-driven pumps) make the XRP/ETH ratio swing 30-80% across regimes, far more than ETH/BTC (too correlated, fee_edge risk) or even SOL/ETH — so each relative-momentum leg captures a large move that clears the two-leg fee with the widest cushion of any pair. It is the evidence-driven survivor of this session's exhaustive search: single-name DIRECTIONAL edge has been falsified on every alt and every construction (momentum, breakout, reversion, confirms), and even routing BTC's proven signal to alts overfits (lead-lag, basket both died) — because all of those carry crypto BETA, which overfits and whipsaws. This MARKET-NEUTRAL construction HEDGES OUT that beta, isolating the relative XRP-vs-ETH trend, and trades WITH the ratio's regime drift (the momentum sign, not the reversion that died fighting it). It is NOT the L32-banned 8-major rotation (a minimal 2-asset construction), stays entirely in PURE OHLCV (the only reliably measurable, coverage-complete data — supplementary feeds hit coverage ceilings), and is DELIBERATELY 2-PARAMETER to resist the overfit that has killed the directional strategies. Daily bars + a wide deadband keep turnover low for fees yet frequent enough (~40-80 rotations over multi-year history) to be measurable. It fills the under-target LONG-SHORT (13.6%), market-neutral, and pairs-scope buckets.

Hypotheses

This implements the hypothesis as specified — minimal two-asset, pure-OHLCV, dollar-neutral rotation on the SIGN of ratio momentum, two parameters — and it deliberately reuses the construction that has already cleared Layers 1-3 on the sibling ETH/BTC rotation, with the pair-specific details fixed. Five decisions carry the risk. (1) Alignment: prices live in day-index-keyed dicts per leg and the ratio series is rebuilt from their intersection, so there are no parallel arrays to trim independently (the documented multi-instrument killer) and a day missing on either leg is absent rather than paired with a mismatched timestamp; all stores are pruned, so the per-bar rebuild is ~80 entries. (2) The stop is expressed in the SAME normalized sigma as the signal rather than as a percentage, and this matters specifically because of the pair choice: a 6% adverse ratio move is a routine day on XRP/ETH and a regime break on ETH/BTC, so a hardcoded percent cap cannot transfer between pairs and would need re-fitting. stop_sigma=1.0 risks one horizon-sigma to capture the multi-sigma swings the thesis is about, and it self-scales as XRP's episodic volatility comes and goes. (3) The stop is checked against the worst-case INTRABAR ratio of the completed bar, not just the close — on daily bars a close-only check lets a reversal that blew through the cap intraday run a further day, which is exactly the tail-containment gap flagged on the sibling. It is conservative rather than look-ahead: the bar is complete when the check runs and the fill is at the close, a worse price than a real resting stop. (4) Execution avoids the two failure modes I have already paid for: no on_bar override and no zero-arg super() on any event path (the synthetic verifier rebinds methods onto a proxy that is not an instance of this class, so super() raises TypeError there), with hedge reconciliation running from calculate_signal and on_extra_bar as an idempotent state machine — open the missing mirror leg, flatten a same-side leg, close a leg left alone — so the worst-case unhedged window is one event and _position degrades to 'flat' if a proxy exposes no cache. (5) Per-symbol execution constants: XRP's step is 0.1 and ETH's is 0.001, with minimum notionals of $5 and $20, so a single shared precision would truncate or over-precise a leg — this is where multi-symbol sizing silently breaks. Honest caveat for the Analyst: the same relative-momentum mechanism on ETH/BTC has just been measured net-negative, and the defence of this instance is entirely the dispersion argument — XRP/ETH must swing enough that trend persistence in the ratio outruns its whipsaw. If it comes back negative too, the conclusion should be that ratio momentum does not persist in crypto generally, not that another pair is worth trying.

Hypotheses

Not worth optimizing on both risk and edge grounds. max_drawdown is 65.5% (CI to 90%) — a catastrophic, promotion-disqualifying drawdown that DD>50% experience shows never survives — while the edge is fee-marginal (profit_factor 1.07, Sharpe 0.336 with CI [-0.287, 0.968] straddling zero, expectancy only +$186/trade) and inconsistent (negative in 3 of 7 years incl. 2023 -42%). The 'dollar-neutral' premise is not holding: a beta-hedged XRP/ETH pair at 30%-per-leg gross cannot produce +68.7% (2024-12-22), +63.2% (2021-01-31) or +46% (2021-04-28) single-day returns — the hedge leg is frequently absent or lagging during XRP's explosive moves, so the book carries large un-hedged directional XRP exposure (the same false-neutrality that sank the ETH/BTC pairs sibling), which is exactly what produces the 65% drawdown. Optimizing the 2 parameters (mom_lookback, deadband) cannot fix a structural drawdown, manufacture edge from PF 1.07, or repair a hedge-timing/neutrality defect (a code issue, not a parameter one). Abandon rather than spend 2 hours.

Implementation

Dollar-neutral long/short rotation between XRPUSDT.BINANCE and ETHUSDT.BINANCE USD-M perpetuals on 1-DAY bars, driven by the momentum of the XRP/ETH ratio. The signal is the log-ratio change over mom_lookback days divided by that ratio's own 1-sigma horizon move (daily stdev x sqrt(lookback)) — a scale-free z returned in natural units every bar. At or above +deadband the strategy is long XRP / short ETH in equal dollars; at or below -deadband it is short XRP / long ETH; the pair closes when the signal crosses back through zero (entry at the deadband, exit at zero, so a flat zone controls turnover) or when the ratio has moved stop_sigma normalized sigma against the position since entry — checked on the close AND on the worst-case intrabar ratio of the completed bar (XRP low vs ETH high for a long, the mirror for a short). Prices are stored in separate dicts keyed by UTC day index and the ratio series is rebuilt from the intersection of days present in both legs, so the two series cannot silently misalign. The ETH leg is dollar-matched to the XRP leg and reconciled idempotently from both the primary-bar and extra-bar hooks; a hedge leg is never held alone or on the same side. Each leg is 30% of equity in notional (gross ~60%, net ~0) at leverage 1.0, floor-rounded to each symbol's own step and checked against each symbol's own minimum notional. Exactly 2 tunables: mom_lookback and deadband.

Verification Results

This is exactly what the 3-phase optimization is for: at BACKTEST_REVIEW / walk-forward, verify the edge is stable across windows (IS/OOS ratio < 3.0, OOS Sharpe > 0), that the holdout clears >=70% of WF-OOS Sharpe, and that PBO stays < 0.5 -- given it is the best of 3 pairs, apply that machinery strictly. If it does not survive OOS, the correct conclusion (per the developer's own caveat) is that ratio momentum does not persist in crypto generally and the whole family -- XRP/ETH included -- should be abandoned. Do NOT let a strong single-window headline substitute for the OOS test.

Verification Results

SELECTION-BIAS / MULTIPLE-TESTING is the PRIMARY thing the analyst must stress-test -- this is the best of THREE pairs of the same mechanism. The identical ratio-momentum-rotation construction produced ETH/BTC PF 0.674 (clear loser), SOL/ETH PF ~1.0 (marginal, sign-unstable across iterations), and now XRP/ETH PF 1.575 (strong). Presenting the best-scoring pair after two failed on the same code is textbook multiple testing, and a Sharpe of 0.886 whose CI is [-0.69, 2.40] on 40 trades is not statistically bulletproof (the low end dips below zero). THERE IS A REAL MITIGANT that keeps this from being pure pair-shopping: the results are MONOTONIC in the pre-specified dispersion variable (lowest-dispersion ETH/BTC loses, mid SOL/ETH is flat, highest-dispersion XRP/ETH wins), which matches the hypothesis's a-priori thesis rather than a random ordering -- and it is economically coherent (XRP's episodic catalyst-driven moves trend for weeks, while the tight ETH/BTC ratio oscillates). So this is not simply 'the pair that happened to work', but it is still a best-of-3 result that MUST survive walk-forward IS/OOS and the holdout before it is trusted.

Verification Results

Risk officer: treat this as a fat-tailed dollar-neutral spread; the ~1-sigma stop is appropriate but confirm the realized worst-case per-rotation loss is acceptable. Confirm the drawdown normalization engine-side.

Verification Results

FAT TAIL + IMPLAUSIBLE DRAWDOWN UNITS -- for the risk officer. Despite the healthy headline, largest_loss is -$15,620 (~comparable to largest_win $16,380) with return_kurtosis 8.38 and cvar_95 3.86, so a single adverse XRP repricing can cost as much as the best win -- the sigma-scaled + intrabar stop bounds but does not eliminate the tail on a highly episodic name. max_drawdown 19.64 (CI [9.78, 38.13]) is the session-wide >100% normalization artifact, engine-side. Capacity is genuinely strong here (capacity_usd $704M, impact 1.19%) -- deployable at real size, unlike the diluted basket sibling.

Backtest Review

Correct construction intent (two-sided rotation, 135 long / 135 short, 270 trades) on the intended XRP/ETH pair with no data trap; avg_trade_return_pct 1.37% is above the fee floor

Backtest Review

Fills a genuinely under-represented market-neutral / pairs bucket

Backtest Review

max_drawdown 65.5% (CI [43%, 90%]) — catastrophic, will never clear the promotion drawdown floor; DD>50% has no survivors

Backtest Review

Sharpe 0.336 with CI [-0.287, 0.968] straddling zero — not distinguishable from no-skill; profit_factor 1.07 means fees consume nearly all gross edge (fee-fragile)

Backtest Review

Highly inconsistent: negative in 3 of 7 years including 2023 -42%, 2022 -26%, 2020 -17%

Backtest Review

Implausible single-day swings (+68.7% on 2024-12-22, +63.2% on 2021-01-31, +46% on 2021-04-28) for a supposedly dollar-neutral 30%-per-leg pair — the hedge is frequently absent/lagging during XRP pumps, so the book is taking large directional XRP P&L, not a hedged spread; this false-neutrality also drives the huge drawdown

Outcome Summary

This strategy tried to complete the relative-value sleeve by rotating dollar-neutral between XRP and ETH on the momentum of their ratio, betting the highest-dispersion liquid pair would give the widest fee cushion. It reached the backtest stage with a decisive, genuinely two-sided sample and a per-trade return above the fee floor, but the edge was fee-marginal (PF 1.07, Sharpe CI straddling zero) and the drawdown catastrophic at 65.5%. The analyst diagnosed the root cause as false neutrality — implausible +60%-plus single-day swings for a supposedly hedged 30%-per-leg book showed the hedge leg was often absent or lagging during XRP pumps, the same defect that sank the ETH/BTC sibling — and abandoned it at the pre-optimization backtest-review gate. It was abandoned after one iteration without reaching optimization, analysis, or risk review, since two locked parameters could not fix a structural drawdown or a hedge-timing bug.

Outcome Summary

A nominally dollar-neutral pairs trade is only neutral if the hedge leg actually fills and tracks — when one leg lags during the high-dispersion asset's explosive moves, the book carries large un-hedged directional risk that produces catastrophic drawdowns, and the highest-dispersion pair maximizes exactly that hazard; this hedge-timing defect is structural, not tunable.

Outcome Summary

It was abandoned at the backtest-review gate (iteration 1): the analyst ruled it not worth optimizing on both risk and edge grounds — the 65.5% drawdown is promotion-disqualifying (DD>50% has no survivors), the edge is fee-fragile (PF 1.07, Sharpe CI straddling zero), and the huge single-day directional swings show the 'dollar-neutral' premise is not holding — the hedge leg is frequently absent or lagging during XRP's explosive pumps, leaving large un-hedged directional XRP exposure.

Outcome Summary

It ran a dollar-neutral long-short rotation between XRP and ETH — long the stronger / short the weaker on volatility-normalized momentum of the XRP/ETH ratio, deadband-gated on daily bars — deliberately choosing the highest-dispersion liquid pair so each relative-momentum leg would clear the two-leg fee with the widest cushion.

Outcome Summary

It cleared verification and backtested over a decisive two-sided sample (270 trades, 135 long / 135 short) with avg_trade_return_pct 1.37% above the fee floor, but the result was fee-marginal and risky: profit_factor 1.07, Sharpe 0.336 (CI [-0.287, 0.968] straddling zero), total_return +60.7%, a catastrophic max_drawdown of 65.5% (CI to 90%), negative in 3 of 7 years, with implausible single-day swings up to +68.7%.
Strategy report

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