Strategies
LTC/BCH Bybit perpetual log-ratio convergence, window-robust EWMA anchor, fee-floored entry, one-leg volume-shock veto (4H, dollar-neutral)
Outcome: Abandoned
LtcBchBybitLogRatioEwmaConvergence
Outcome Summary
This hypothesis applied three rules from a quant.stackexchange answer to an LTC/BCH Bybit perp convergence trade: an anchor that holds across window lengths, an absolute 6% fee floor for entry, and a volume-asymmetry breakdown veto. Over 3 iterations the developer reworked the per-bar volume and median logic for speed in iteration 2 and fixed a leverage-parameter config consistency issue in iteration 3. The strategy still timed out in the Layer 3 sandbox backtest (over 300s on ~20000 4H bars) and was abandoned in the verification loop. Backtesting, optimization, analyst review and risk review were never reached, so the trading thesis remains untested.
Hypothesis
The source is a concrete pair-trading mechanism on crypto perps, so it is classified (a). It is refined per the source's best answer: no selection of the window by p-value, an explicit fee floor, and a breakdown veto. Bybit is used because it sits under its venue quota (2.0% vs 5% or more). The design is long/short and dollar-neutral, filling the under-represented long_short bucket (15%). LTC and BCH are essentially unused in the corpus. It is not the same-asset cross-venue spread (SOL Bybit/OKX, DOGE Bybit/OKX, HYPE spot/perp) that keeps dying as a speed and fee contest. Predictions are modest because the pre-study t-stat is about 1-2.
verification_loop: sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of LTCUSDT.BYBIT-4-HOUR-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Implementation
Dollar-neutral pair trade on the LTC and BCH Bybit perps using 4H bars. It trades the gap between log(LTC/BCH) and its EWMA anchor (half-life 60-180 bars). It enters only when the absolute gap is at least 6%, a fixed fee floor, shorting the expensive leg and buying the cheap one. An optional veto skips the entry when only one leg has an unusual 24h volume spike. A trade exits when the gap closes back through exit_dev, widens against the position to stop_mult*entry_dev, or reaches the maximum holding time.
Iteration 3 fixes only the Layer-1.5 failure. The optimization_plan fixes `leverage` at 2.0 as a parameter, so the parameters now include leverage=2.0 as a float, matching the plan and config.leverage=2.0, and position_size reads it. Before submitting I checked the parameters with src.optimization.domains.validate_domains against the plan, and it passed. All other fixed values match the plan exactly, including their types: exit_dev 0.0, stop_mult 2.0, leg_fraction 0.25, cooldown_bars 6, volume_asym_ratio 1.8, volume_short_bars 6 and volume_median_bars 180. The starting values of the tunable parameters are within their allowed ranges: entry_dev 0.06, volume_veto 'on', max_hold_bars 42 and anchor_halflife_bars 120. Maximum gross notional is 2 legs x 0.25 x 2.0 = 1.0x equity. The signal, entry and exit logic is unchanged.
Verification Results
sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of LTCUSDT.BYBIT-4-HOUR-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).
Iteration History
Verification failed (Layer 1.5 — hypothesis/config consistency) [class=hypothesis_mismatch]: - optimization_plan fixes leverage at 2.0
Outcome Summary
Two-leg strategies with rolling-median volume windows need to be profiled against the ~20k-bar sandbox budget before submission, because a performance-only rewrite (running sums and bisect-maintained sorted windows) still did not get it under the 300s limit.
It was abandoned in a verification loop. The Layer 3 sandbox smoke test went over the 300s wall-clock limit on a ~20000-bar window (2400 days of LTCUSDT.BYBIT 4-hour bars), so it never reached backtest review, analyst, or risk review.
A dollar-neutral 4H pair trade on LTCUSDT.BYBIT vs BCHUSDT.BYBIT perps that fades deviations of log(LTC/BCH) from an EWMA anchor, entering only when the absolute deviation is at least 6% (a fee floor) and standing aside when one leg's 24h volume shock exceeds the other's by more than 1.8x (an idiosyncratic-news veto).
There are no performance numbers: the backtest report is empty and optimization never ran, so no return, Sharpe or trade count exists.
Analysis
Pair trading - history length for spread calculation
Backtest and paper results are hypothetical. Trading involves risk of loss.