Strategies
XRP Hyperliquid 3-Day Return-Shock Continuation, Long-Short, Fixed 6-Day Clock Exit (XRPUSD.HYPERLIQUID 12H, pure OHLCV, ~30% time-in-market)
Outcome: Abandoned
XrpHlReturnShockContinuation12H
Outcome Summary
XrpHlReturnShockContinuation12H tested whether large 3-day XRP return shocks on Hyperliquid keep drifting for 6 days in either direction. Its single backtest looked good at first, with +125.9% and a 2.75% average trade, but the median trade was negative (-0.43%), the edge disappeared once the three biggest 2024-rally winners were removed, shorts lost money and the drawdown reached 65%. The analyst abandoned it at backtest review in iteration 1, so optimization, the post-optimization analyst and risk review never ran. The review also flagged a metrics artifact: paired cancelling prints in daily_returns inflate the volatility and VaR figures.
Hypothesis
This implements the hypothesis directly: L=6, a 120-bar vol window, z=1.5, H=12, long and short on the HL perp (a futures venue is needed for shorts). The exit clock is anchored to position.ts_opened (calendar time), so it survives restarts and matches paper replay. Per-bar cost is O(120) over a bounded deque, so it does not grow with history length. Entry frequency: |z|>1.5 fires on ~13% of bars; with the 12-bar lockout that gives ~20-30 trades/year and ~30% time-in-market, consistent with the hypothesis. The hypothesis specifies no stop-loss, so none is added and the fixed clock is the only exit.
premise_falsified: 3-day return-shock continuation on XRP HL 12H shows no detectable edge on an adequate full-history sample. 62 trades, median trade -0.43%, t-stat 1.22. The mean is ~0.01%/trade once the 3 largest winners (all in the 2024 XRP rally) are removed. Short-side continuation loses (-1.76%/trade), and 2025 is -53%. PF 1.22 and base Sharpe 0.93 are below the optimize bar. Max drawdown is 65% (on the equity curve itself) against a 20% futures default. Funding drag is -$22k, confirming the QA concern. Optimization cannot turn a three-trade outlier result into an edge. Separately flagged: daily_returns carries paired cancelling prints on flat days (engine metrics artifact, mechanism unverified), which inflates vol/VaR.
Implementation
XRPUSD.HYPERLIQUID 12H perp, long-short. The signal is computed every bar: the 6-bar (3-day) log return divided by (the 120-bar std of 12H log returns x sqrt(6)). When flat and |z| > 1.5, it enters at market in the shock's direction on the bar close (~next open). It exits on a fixed calendar clock 12 bars (6 days) after the fill timestamp and takes no new signals while in a position. Size is 95% of equity notional at 1x leverage.
Verification Results
Return a small value such as shock_bars+2 from min_bars_required() and let the internal guard 'n < vol_bars' gate signals. Alternatively, require n >= vol_bars inside calculate_signal so the vol window is always the full 120 bars.
min_bars_required() returns 122. The base template does NOT call calculate_signal() on the bars below that, so the return deque only starts filling at bar ~122. The first signal then comes ~20 bars later, and until ~240 bars have passed the std uses a 20-to-120-return window rather than the stated 120-bar/60-day one. This only shortens the effective history slightly and does not bias the signal, because it only reads past data.
Consider a vol-targeted fraction with an explicit clamp, or a disaster stop declared in the hypothesis, if the risk floors require it. Do not add one silently, because that would change the pre-registered design.
Each trade is sized at 95% of current equity x leverage, with no stop and no per-trade risk cap (see lesson L148). This is not an always-in design: it is flat ~69% of the time, the clock exit bounds each trade, and gross notional is capped at 0.95 x equity x 1.0, well under the HL max leverage. It matches the hypothesis, which specifies no stop, so it is not a defect. It does, however, produce the ~63% drawdown seen in the sandbox, and the risk stage will probably flag it.
Optional: compute the std over rets[:-shock_bars] if the pre-shock vol was intended.
The 120-bar std includes the 6 shock returns themselves, so a very large shock partly inflates its own denominator. This is a standard, conservative choice and has no look-ahead. The hypothesis's 'trailing 60-day std' is ambiguous on the point.
Sandbox (one unoptimized draw, 1271 days): +148% but max DD 63% (CI 46-93%), Sharpe 0.62 with CI [-0.50, 1.63], PF 1.27 on 62 trades. The ledger is internally consistent: 2.75% x 62 = ~171% implied vs 148% actual, and 124 orders = 62 round trips on one leg. That is not enough trades to separate this from noise. The positions are 95% of equity with no stop, and each trade is sized off the compounded equity path, so drawdowns scale with the equity peak. Funding is NOT folded in (funding_folded=false, funding_events_available=0). A 6-day hold on a HL perp pays or receives ~12-18 hourly-accrued funding windows, and continuation trades are usually on the crowded side, which pays funding. Check funding-adjusted per-trade return first. Also note that selection across 7 names is disclosed as an uncounted degree of freedom.
Backtest Review
- Sharpe
- 0.93
- Total return
- 125.91%
- Max drawdown
- 65.42%
- Trades
- 62
- Win rate
- 48.4%
- Profit factor
- 1.22
Trades implement the hypothesis: 62 entries, 32 long and 30 short, each held about 6 days on the fixed clock, about 31% time in market, direction follows the shock.
Headline avg_trade_return_pct is 2.75%, far above the HL fee floor. Commission is only 1.8% of gross. end_unrealized_pct is 0.12, so the result is realized.
No statistically detectable edge. Per-trade pnl_pct (detail file) has mean 2.22%, MEDIAN -0.43%, sd 14.4%, t-stat 1.22 on 62 trades. Drop the 3 best trades (+59.7%, +43.9%, +33.6%, mostly the Nov-2024 XRP rally) and the mean is 0.01%. The whole result rests on three trades from one regime.
The mechanism is absent on one side. SHORT continuation trades average -1.76%/trade; LONGs average +5.96%, driven by XRP's 2024 re-rating. The long-short premise is not supported. Keeping only the long side would be a post-hoc cut.
Year-by-year the edge is decaying: 2022 +6.1%/trade, 2023 +0.8%, 2024 +4.0%, 2025 -2.9% (annual return 2025 -53%).
Max drawdown 65.4%, confirmed on the equity curve itself; the drawdown lasted 380 days. That is over 3x the 20% futures default. Sizing at 95% of compounded equity with no stop.
PF 1.22 and base Sharpe 0.93 are both below the pre-optimization bar (Sharpe >= 1.0 and PF >= 1.5). The Sharpe CI [-0.11, 2.01] straddles zero.
Funding is now folded in: -$22.1k total, about 18% of the $126k net P&L. The QA concern that continuation trades sit on the paying side is borne out.
Metrics artifact, to flag for the engine owners: daily_returns contains periodic paired prints on flat days (e.g. -17.74% then +21.57% every ~5 days in Apr-Jun 2024, -30.08/+43.01 in Jul 2025). They cancel exactly, and the sampled equity_curve is flat (135,556.30) on the same dates. This inflates annualized_volatility (174%), var_95 (17.74 = the artifact print) and cvar, and it distorts the MTM Sharpe. Mechanism not verified; it does not change this verdict.
Outcome Summary
A high average trade return can come from a few outlier trades in one regime, so check the median trade, the t-stat, the result without the top trades and each side separately before believing a continuation edge.
The backtest-review analyst abandoned it before optimization as premise_falsified. Without the 3 largest winners, all from the 2024 XRP rally, the mean falls to about 0.01%/trade. Short-side continuation lost (-1.76%/trade), 2025 returned -53%, and Sharpe, PF and drawdown all missed the optimize bar.
A long-short event trade on XRPUSD.HYPERLIQUID 12H bars: when the vol-scaled 3-day return was beyond +/-1.5 z, enter in the direction of the shock and exit after a fixed 6 days, betting that slow capital keeps pushing a large multi-day move for about a week.
Over 1,271 days (2022-02 to 2025-07), the initial backtest made +125.9% total return on 62 trades (32 long, 30 short), with Sharpe 0.93, PF 1.22, avg_trade_return_pct 2.75% and a 65.4% max drawdown that lasted 380 days. The median trade was -0.43%, the trade t-stat was 1.22 and the Sharpe CI of [-0.11, 2.01] included zero.
Backtest and paper results are hypothetical. Trading involves risk of loss.