Skip to content

View translation

LtcBchCorrGatedLogRatioBollingerPairsMRLS

Hypotheses

LTC–BCH Cointegrated Ratio Mean-Reversion — Market-Neutral Pairs Spread on Two Classic Correlated Payment-Coin Perps (Both BINANCE USD-M), Log-Ratio Bollinger z, Correlation-Gated to Skip Broken-Pair Regimes (4H Bars, Long-Short, 3-Parameter)

Hypotheses

A MARKET-NEUTRAL, LONG-SHORT statistical-arbitrage pair on two structurally-linked, highly-correlated mid-cap payment coins: LTCUSDT.BINANCE and BCHUSDT.BINANCE (both USD-M perps, both BTC-fork 'digital-cash' assets that have co-moved for years). It is bar-driven and COMPUTATIONALLY TRIVIAL by design — the entire signal is an incrementally-updated rolling mean/std and rolling correlation of two price series (a few scalars per bar, NO per-bar full-history rescans, NO sorted()/min() over long lists) — directly avoiding the Layer-3 timeout / 'float not callable' infra failures that just killed the options sleeves. It is deliberately DISTINCT from the pending SOL–ETH pair: different assets, a different signal construction (log-price-RATIO Bollinger z-score rather than a rolling-beta regression residual), and an explicit CORRELATION GATE that only trades when the pair is currently behaving as a pair — the single most important fix for the classic pairs death (a cointegration break that turns reversion into a runaway trend). It avoids every dead class: NOT single-asset momentum/trend (0/213, L56), NOT funding carry/differential (L57), NOT cross-sectional baskets (dead), NOT options (infra-fragile right now), NOT a liquidation/quarterly feed (L58). Fills the under-represented long-short direction bucket (14% vs the ≤55% long-only ceiling that is currently at 86%). Exactly 3 tunable parameters: entry z-threshold, exit z-threshold, and the rolling lookback (which also sets the correlation window).

Hypotheses

QA failed this on fee viability (avg_trade_return_pct -0.36%, PF 0.57), not on structure — iteration 2's rolling-OLS residual, AR(1) gate and beta-weighted sizing were accepted as the right fix and are left completely untouched here, as are the imports, class shape, signal path and compute profile that passed Layers 1-3 (re-ran StaticAnalyzer on this file: passed, guarded-division warnings only). I changed only entry/exit TIMING, because the reported loss shape names the defect precisely: a mean-reversion book that wins just 42.5% of the time with avg_loss 1468 > avg_win 1125 is not suffering from a bad spread definition, it is entering while the divergence is still widening and then holding until a stop or a fixed 42-bar clock closes it at the worst point. (1) Reversion confirmation: |z| >= entry_z now only arms the trade; entry requires the next bar's |z| to be smaller on the same side, i.e. the spread has turned. This gives up a little of the move in exchange for not catching the falling knife, and — importantly for not regressing Layer 3 — it delays entries rather than eliminating them (every extreme eventually stops widening), so trade frequency stays near the 40 already observed. (2) Cost-aware target gate: the trade's own expected reversion (|z|-exit_z)*sd/(1+beta) must clear 2.5x the 0.10% round-trip taker cost, which is the direct, auditable answer to QA checklist #7 — a 2-sigma reversion on a quiet spread that is worth less than the fees is now skipped rather than traded. (3) Half-life-scaled hold: with phi measured every bar, allowing 3 half-lives (clamped [6,42]) releases a dead trade long before it ages into the next oversized loss. Supporting tightenings: exit_z 0.3 -> 0.5, stop_z 3.2 -> 2.8, max_ar1 0.96 -> 0.95. One honest caveat, since the Analyst owns the call: two iterations have now produced negative gross expectancy (the -0.36% per trade is worse than the ~-0.10% fee drag alone), so if this timing fix does not flip profit_factor above 1.0 the conclusion is that the LTC/BCH residual simply does not revert profitably at 4H and the pair should be abandoned rather than iterated a fourth time — I have implemented the fix as asked rather than pre-empting that decision.

Hypotheses

No-edge, capacity-dead market-neutral pairs mean-reversion (L45 0/84) — not worth 2 hours of optimization. profit_factor is 1.034 (break-even), total_return 7.77% over 6.6 years (CAGR 1.85%), Sharpe 0.43 with bootstrap CI [-0.35, 1.19] straddling zero, PSR 0.69, win_rate 50%; the iteration-3 timing fixes lifted PF from 0.57 only to ~1.0, so no edge was created. Critically it is capacity-dead: impact_cost_pct 66.95% (market impact consumes two-thirds of gross PnL) with capacity_usd only $223k — LTC/BCH mid-cap perps are too thin for this spread size, so any edge exists only at toy scale (a hard promotion blocker). The result is also one-regime and fat-tailed: the positive total is entirely the stressed-vol regime (+34.9%) while calm (-28.4%) and normal (-14.4%) are deeply negative, annualized_volatility is 102%, downside_deviation 158, max_drawdown CI runs to 95.7%, and the correlation gate did not prevent a -20.4% yen-carry deleveraging window (Aug 2024); 2024 was -7.0%. This is the L45 market-neutral pairs family (0/84 survival), the same signature as the ETH/BTC, OP/ARB and SOL-ETH pairs abandoned this session. No tuning of entry_z/exit_z/lookback flips a PF-1.0 spread with 67% impact drag into a scalable edge, and the pair is illiquid by construction. Failure pattern: no_edge/capacity market-neutral pairs mean-reversion (L45).

Implementation

Market-neutral LTC/BCH statistical-arbitrage pair on Binance USD-M perps, 4-HOUR bars. The spread is the rolling-OLS residual s_t = log(LTC) - beta_t*log(BCH) (beta re-estimated each bar over the same lookback window), z-scored against its own rolling mean/std and returned continuously every aligned bar. Trades are gated on the pair actually behaving as a pair: rolling return correlation >= 0.65, an AR(1) coefficient on the residual <= 0.95 (finite half-life), and beta inside [0.4, 2.5]. Iteration 3 adds three entry/exit-timing fixes aimed at the observed loss shape (win_rate 0.425 with avg_loss > avg_win): (1) a reversion-confirmation trigger, so the strategy fades an extreme only once it has stopped widening rather than while it is still stretching; (2) an explicit cost-aware target gate that opens a trade only when its own expected reversion, (|z| - exit_z)*sd/(1+beta) as a fraction of gross notional, exceeds 2.5x the 0.10% round-trip taker cost; and (3) a hold clock scaled to the measured AR(1) half-life (3 half-lives, clamped to [6, 42] bars) instead of a fixed 42-bar clock. Exits on reversion (|z| <= exit_z), correlation break, AR(1) gate failure, a 2.8-sigma blow-out stop, or the half-life clock. Legs are sized beta-weighted from one gross-notional budget (N_ltc + N_bch = equity * 0.6 * leverage, N_bch = beta * N_ltc), so net estimated delta is ~0 and gross exposure is bounded. Pure OHLCV, O(lookback) per bar on a timestamp-synced buffer.

Verification Results

CLEAN RESTART 2026-09-04 — this run's verdict history and learning records were removed and it was restarted from verification. Its previous abandonment came from the pipeline, not from the market: the Layer-2 harness mis-bound @staticmethod helpers (fixed), QA issued terminal performance verdicts on an unoptimized smoke test (removed — QA now judges correctness only), and sandbox timeouts came from backtest-slot starvation (fixed). The hypothesis and the strategy code are unchanged. Verify the code on its merits; performance is decided later by the full backtest and the optimizer.

Backtest Review

Computationally trivial, no data-availability risk; 392 trades is an adequate sample so the flat result is a genuine no-edge read

Backtest Review

Correlation/AR(1) gates and beta-neutral sizing are sensible construction; no liquidation

Backtest Review

profit_factor 1.034, total_return 7.77% over 6.6 years (CAGR 1.85%), Sharpe 0.43 CI [-0.35,1.19] straddling zero — no edge net of two-leg cost

Backtest Review

impact_cost_pct 66.95% with capacity_usd only $223k — impact eats two-thirds of gross PnL; edge exists only at toy scale (hard blocker)

Backtest Review

One-regime: stressed +34.9% vs calm -28.4% / normal -14.4%; annualized_vol 102%, downside_dev 158, max_drawdown CI to 95.7%, -20.4% yen-carry window

Backtest Review

L45 market-neutral pairs family (0/84) — same signature as the ETH/BTC, OP/ARB, SOL-ETH pairs abandoned this session

Iteration History

Verification failed (Layer 4 — QA review): - Negative-edge / fee-viability failure with a STRUCTURAL (not tunable) cause (checklist #7, L6/L7). The sandbox is decisively losing: total_return -27.97%, Sharpe -0.80 (sharpe_ci [-2.32, 0.90]), avg_trade_return_pct -0.76% (deeply below the 0.15% floor and negative), profit_factor 0.65, win_rate 0.50, max_drawdown 34.9% (CI up to 61.4%), with avg_loss 3110 > avg_win 2034 and kurtosis 10 over 52 trades. The root cause is the model, not the parameters: the strategy hard-codes a UNIT hedge ratio (beta = 1) log-ratio spread, which assumes the LTC/BCH ratio is stationary. LTC and BCH have DIVERGED PERSISTENTLY since the 2017 fork, so the ratio trends rather than mean-reverts and the 'spread' is non-stationary — positions are systematically run over by the drift. The lone correlation gate at a loose 0.5 cannot protect against this: two assets can stay highly return-correlated (gate open) while their price ratio drifts apart for months, which is exactly when a unit-beta spread bleeds. The developer flagged this precise risk as a caveat; the -28% / 35%-drawdown result is that risk realized.

Iteration History

Verification failed (Layer 4 — QA review): - Negative-edge / fee-viability failure — second iteration, structural fix correctly applied but the edge is still absent (checklist #7, L6/L7). Iteration 1 (unit-beta log ratio) lost -27.97% with avg_trade_return_pct -0.76%; QA failed it and identified the non-stationary unit-beta spread as the cause. This iteration correctly replaces it with a rolling OLS hedge ratio (spread = regression residual), an AR(1) half-life stationarity gate, and beta-weighted sizing — exactly the fix requested. The result improves but remains a losing book: total_return -14.63%, Sharpe -0.63 (sharpe_ci [-2.21, 1.05]), avg_trade_return_pct -0.36% (negative, below the 0.15% floor), profit_factor 0.57, win_rate 0.425, avg_loss 1468 > avg_win 1125, over 40 trades. The rolling-beta residual + AR(1) gate cut the loss roughly in half but did not flip expectancy positive: LTC/BCH does not mean-revert profitably at 4H after fees.

Iteration History

Verification failed (Layer 4 — QA review): - Fee-viability failure — third iteration, edge has converged to breakeven BELOW the fee floor (checklist #7, L6/L7). The entry/exit-timing fixes worked in the intended direction (win_rate 0.425 -> 0.60, book flattened from -14.63% to ~breakeven) but did not produce an edge: avg_trade_return_pct is +0.065%, still below the 0.15% viability floor and below what the analyst abandons at; Sharpe -0.11 (CI [-1.72, 1.46] straddles zero); total_return +0.23% (flat); profit_factor 1.02 (statistical breakeven); avg_loss 1311 still > avg_win 893; only 20 trades. The per-trade progression across the three iterations is -0.76% -> -0.36% -> +0.065%: each change helped, but the series is converging to breakeven under the fee line, not to a tradable edge. The LTC/BCH rolling-OLS residual does not revert profitably at 4H after costs.
Strategy report

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