Skip to content

View original

SolAvaxCointSpreadMarketNeutralLS4h

Hypotheses

SOL-AVAX Cointegration Spread Mean-Reversion, Market-Neutral Long-Short (Two-Instrument BINANCE USD-M Perps, 4h Bars, Rolling Hedge-Ratio Z-Score Spread, Enter on Wide 2-Sigma Dislocations Only, Pure OHLCV, 3-Parameter)

Hypotheses

A MARKET-NEUTRAL statistical-arbitrage pairs trade on two tightly co-moving high-beta L1 perpetuals, SOLUSDT.BINANCE (primary) and AVAXUSDT.BINANCE (hedge), using nothing but 4h OHLCV on both legs. It fills three of the thinnest portfolio dimensions at once — pairs scope (13.5%), long_short direction (14.2%), and market-neutral construction — with a mechanism that appears NOWHERE in the failure list: it is not a single-name fade (which dies with inverted reward/risk), not a cross-sectional rank basket (L12 fee arithmetic), not a funding/basis carry (L1 sub-fee spread), and not a supplementary-feed signal (the taker-flow/OI/premium/positioning strategies that keep dying in verification). The edge is the well-documented tendency of two same-sector L1s to revert to a stable relative-value relationship after transient dislocations. Crucially it only arms at WIDE (>=2-sigma) spread deviations, whose reversions are multi-percent relative moves that clear the ~0.20% four-fill round-trip cost with room to spare, and it holds a strict single spread position (one long leg + one short leg) with an explicit divergence stop — sidestepping the pyramiding/liquidation bug that sank the DOGE taker-flow sibling. Deliberately LOW-PARAMETER (z-lookback, z-entry, z-exit) to avoid the overfit graveyard.

Hypotheses

Iteration 2 fixes the sole Layer-2 failure: _ols_beta() was a @staticmethod called as self._ols_beta(lb, la), but the Layer-2 synthetic proxy re-binds strategy methods onto the instance, stripping the staticmethod wrapper so the call passed 3 args (self, lb, la) to a 2-arg function -> 'takes 2 positional arguments but 3 were given' in every scenario. The change converts _ols_beta into a plain instance method (self, x, y); the call site is unchanged and now binds correctly in the proxy, the backtest engine, and live. No signal, sizing, entry, exit, or plumbing logic is altered, so the Layer-1 static checks that already passed remain green and the beta-neutral spread mechanism is preserved. Leverage 2.0 is wired into position sizing (equity * risk_frac * leverage) for both legs, giving a modest ~0.8x-gross neutral book that stays within margin.

Hypotheses

Fundamentally broken, not optimizable. Negative per-trade expectancy (avg_trade_return_pct -0.497%, below fees), profit_factor 0.785 (< 1), total_return -82.76%, and max_drawdown 87.6% over 590 trades — a decisive, well-sampled loss. The core premise (SOL and AVAX stay cointegrated and revert after wide dislocations) is falsified by the data: the pair de-coupled violently in the 2021 L1 rotation (annual -73%, a -48.9% day on 2021-09-09, a +42% whipsaw on 2022-11-11, kurtosis 18), so the z-score fade paid to hold spreads that kept widening. Optimizing z_lookback/entry_z/exit_z cannot create cointegration that was absent or flip negative expectancy — it would only overfit the two outlier days. Not worth 2 hours of optimization.

Implementation

Market-neutral cointegration pairs trade on SOLUSDT vs AVAXUSDT BINANCE USD-M perps, 4h bars, pure OHLCV. A rolling OLS on log-prices produces a hedge-ratio beta; the spread log(SOL) - beta*log(AVAX) is z-scored over z_lookback bars. At a wide >=2-sigma dislocation it opens one beta-neutral spread position (long the cheap leg, short the rich leg) and closes on mean-reversion (|z|<=exit_z), a divergence stop (|z|>=stop_z), or after max_hold_bars. Exactly one long leg + one short leg at a time.

Verification Results

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['exit_z', 'stop_z', 'entry_z', 'beta_max', 'beta_min', 'risk_frac', 'z_lookback', 'min_notional', 'max_hold_bars'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: SolAvaxCointSpreadMarketNeutralLS4h._ols_beta() takes 2 positional arguments but 3 were given (bar timestamp: 1735700580000) - steady_downtrend: TypeError: SolAvaxCointSpreadMarketNeutralLS4h._ols_beta() takes 2 positional arguments but 3 were given (bar timestamp: 1735700580000) - flat_ranging: TypeError: SolAvaxCointSpreadMarketNeutralLS4h._ols_beta() takes 2 positional arguments but 3 were given (bar timestamp: 1735700580000) - volatility_spike: TypeError: SolAvaxCointSpreadMarketNeutralLS4h._ols_beta() takes 2 positional arguments but 3 were given (bar timestamp: 1735700580000) - zero_volume: TypeError: SolAvaxCointSpreadMarketNeutralLS4h._ols_beta() takes 2 positional arguments but 3 were given (bar timestamp: 1735700580000) - price_gap: TypeError: SolAvaxCointSpreadMarketNeutralLS4h._ols_beta() takes 2 positional arguments but 3 were given (bar timestamp: 1735700580000)

Verification Results

Analyst call at backtest_review (optimize/iterate/abandon). No code fix needed. If optimized, guard that the thin edge does not collapse below the four-fill cost floor and watch the avg_loss>avg_win tilt.

Verification Results

The realized edge is thin and statistically indistinguishable from zero — an analyst decision at backtest_review, not a code defect. Sandbox (metrics_reliable=true, 90 trades over 363 days, ~2.6d holds, no liquidation): avg_trade_return_pct 0.244% barely clears the ~0.20% four-fill round-trip cost of a two-leg futures pair; profit_factor 1.038 is just above breakeven; Sharpe 0.046 with CI [-1.49, +1.62] straddles zero; total_return only 3.14%. The design-level fee test PASSES (entry_z=2.0 targets multi-percent 2-sigma spread reversions >> 0.20%), so this is a realized-performance shortfall, not a fee-arithmetic design flaw. Note avg_loss ($1,894) > avg_win ($1,572): the fade wins slightly more often (55.6%) but loses a bit more per loss — a mild inverted-reward/risk tilt to watch, though PF stays >1.

Verification Results

No change required; ensure the full backtest/optimization window is long enough to accumulate >~100 trades before trusting Sharpe.

Verification Results

Trade count (90 over 363 days) is modestly below the ~100-trade measurability comfort floor for this ~1-year sandbox window. It is a genuine multi-day-hold pairs strategy so this frequency is inherent, and metrics_reliable=true; over a multi-year backtest the count should exceed 100. Flagging only so the analyst weights the sample size when judging the thin edge — the wide Sharpe CI reflects it.

Backtest Review

Clean market-neutral construction: beta -0.08, benchmark_correlation -0.31 — the book genuinely hedged out directional exposure

Backtest Review

Well-sampled (590 trades over ~5.9 years), so the negative result is statistically decisive rather than noise

Backtest Review

No pyramiding/liquidation bug; strict one-long-one-short with a divergence stop as designed

Backtest Review

avg_trade_return_pct -0.497% — NEGATIVE per-trade expectancy, below fees; profit_factor 0.785 (< 1, net loser); expectancy -$125/trade

Backtest Review

total_return -82.76% and max_drawdown 87.6% (past the 50% hard-abandon line, CI to 99.6%)

Backtest Review

Cointegration premise falsified: 2021 annual -73% with a -48.9% single day (2021-09-09) and +42% whipsaw (2022-11-11), kurtosis 18 — SOL/AVAX de-coupled instead of reverting; the stop_z did not protect

Backtest Review

Sharpe 0.166 with CI [-0.48, 0.86] straddling zero; calmar -0.90; information_ratio -0.78

Outcome Summary

This strategy sought a market-neutral edge by fading wide 2-sigma dislocations in the SOL/AVAX spread, betting the two same-sector L1 perps would revert to a stable relative-value relationship. The construction worked as designed — clean beta-neutrality, no pyramiding, a strict one-long-one-short position — but the underlying cointegration assumption was falsified: the pair de-coupled violently during the 2021 L1 rotation, producing a -73% year, a -48.9% single day, and a +42% whipsaw, so the mean-reversion fade repeatedly paid to hold widening spreads. Over 590 well-sampled trades it lost 82.76% with negative per-trade expectancy, a profit factor of 0.785, and an 87.6% drawdown. At the pre-optimization review gate the analyst abandoned it as fundamentally broken rather than optimizable, since tuning the z-score parameters could not manufacture cointegration that was absent; it never reached optimization, analysis, or risk review.

Outcome Summary

A market-neutral pairs construction can correctly hedge out beta and still lose badly if the assumed cointegration is not stable — two high-beta L1s can de-couple during sector rotations, and a divergence stop does not protect against spreads that keep widening.

Outcome Summary

The analyst abandoned it at the pre-optimization backtest-review gate because the cointegration premise was falsified — SOL and AVAX de-coupled violently in the 2021 L1 rotation (2021 annual -73%, a -48.9% day on 2021-09-09, a +42% whipsaw, kurtosis 18) so the z-score fade kept holding spreads that widened, and no parameter tuning could create cointegration that was absent or flip the negative expectancy.

Outcome Summary

A market-neutral statistical-arbitrage pairs trade on two same-sector L1 perps, SOLUSDT.BINANCE (long leg) and AVAXUSDT.BINANCE (hedge), on 4h OHLCV: a rolling OLS hedge-ratio spread is z-scored, and it opens one beta-neutral long/short spread position at wide (>=2-sigma) dislocations betting on mean-reversion, with mean-revert, divergence-stop, and time-box exits.

Outcome Summary

Over ~5.9 years and 590 trades it was a decisive, well-sampled loser: avg_trade_return_pct -0.497% (negative, below fees), profit factor 0.785, expectancy -$125/trade, total return -82.76%, max drawdown 87.6% (CI to 99.6%), and Sharpe 0.166 with a CI straddling zero — though the construction did hedge direction cleanly (beta -0.08, benchmark correlation -0.31).
Strategy report

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