DogeAdaDailyCointegrationPairsLongShort
Hypotheses
DOGE-ADA Daily Engle-Granger Cointegration Pairs Trade with 60-Day Rolling Window
Hypotheses
A dollar-neutral, daily-bar pairs trading strategy on DOGEUSDT.BINANCE and ADAUSDT.BINANCE perpetual futures using proper ENGLE-GRANGER COINTEGRATION testing. This responds to two pieces of accumulated session evidence: (1) the analyst's repeated recommendation to pursue 'pairs trading with proper cointegration testing' as an under-explored mechanism class, and (2) the empirical observation that DOGE and ADA bars are TESTABLE in the current data infrastructure (proven by the recent pipeline additions DOGEVolContractionSqueezeLong, DOGEVolatilityTargetedLong, and BollingerBandMeanReversionWithTrendFilterDOGEADA all backtesting successfully), while the major-basket symbols (BTC, ETH, SOL, BNB, AVAX, LINK, XRP) have widespread audit_stale failures across both 1H and 4H bar files. My prior BTC-ETH cointegration pairs trade failed at Layer 3 due to auto-collected SOL/BNB dependencies hitting audit_stale — a DOGE-ADA pairs trade avoids those dependencies entirely. Mechanism (Engle-Granger 1987, Nobel 2003; Gatev-Goetzmann-Rouwenhorst 2006; Vidyamurthy 2004): on each daily bar close, run a 60-day rolling OLS regression of DOGE_close vs ADA_close to estimate the time-varying hedge ratio β. Compute the residual series ε[t] = DOGE[t] - α - β × ADA[t]. Run the Augmented Dickey-Fuller (ADF) test on the residual series; if p-value ≤ 0.10, the pair is cointegrated this window. Z-score the latest residual. When z > +2.0 (DOGE rich vs ADA), enter SHORT DOGE + LONG ADA (sized by β to be dollar-neutral on the spread). When z < -2.0, enter LONG DOGE + SHORT ADA. Exit when |z| < 0.5 (mean reversion confirmed) or max 14 days. Both assets are memecoin-adjacent / mid-cap altcoins with similar narrative drivers (retail attention, low institutional concentration, high speculative volatility) — making cointegration more empirically likely than ETH-BTC where structural divergence has weakened the relationship. Fills FOUR critical gaps: (1) long-short direction (14.9% → toward 45%), (2) pairs scope (extends 19.2% pairs category), (3) proven-testable instruments (avoids audit_stale failure mode that killed 4+ strategies this session), (4) explicit analyst-recommended mechanism class.
Hypotheses
Implements the analyst-recommended pairs/cointegration mechanism class with a proper two-step Engle-Granger procedure: step 1 is a rolling OLS hedge (DOGE on ADA) producing the residual spread; step 2 is an Augmented Dickey-Fuller stationarity test on that residual (implemented in numpy via an OLS unit-root t-stat with a constant and adf_lags augmenting differences, compared against the ~10% critical value -2.57, since statsmodels is not permitted). Entries only fire when the residual is both cointegrated AND |z|>=2, exits at |z|<=0.5 or a 14-day stop — a genuine mean-reversion edge, not a directional bet. Timestamp alignment uses the SyncedBuffer helper (committing a (DOGE, ADA) sample only when both legs report the same ts_ns), which avoids the index-misalignment trap of independently trimmed arrays; the base class's same-timeframe sync barrier further guarantees the ADA bar is present when the DOGE primary bar is processed. The two legs are managed directly as a basket inside calculate_signal (guarded with try/except so the Layer-2 proxy, which calls calculate_signal without a live engine, never crashes), with the single-instrument hooks left inert; an _active flag prevents duplicate submissions across fill latency. calculate_signal always returns the continuous residual z-score so the Layer-2 signal varies every bar. Instruments are DOGE/ADA specifically to avoid the major-basket audit_stale failures noted in the hypothesis, and there are no auto-collected extra dependencies beyond the two named legs. Venue is BINANCE USD-M futures because the spread shorts one leg (requires a margin account); leverage is 1.0 (not inert) since the dollar-neutral ~60% gross exposure fits within 1x equity, so position sizing deliberately does not multiply by leverage.
Hypotheses
Structurally too-sparse cointegration pairs trade with no validatable edge — every decisive gate fails after best-of-225 selection. The base config is already a coin flip (Sharpe 0.31, profit_factor 1.034, +3.28% over 6 years, carried by outliers with kurtosis 69 and a -12.2% 2024). Optimization confirms there is nothing to find: deflated_sharpe 0.0 (vs 0.95 bar) with expected-max 9.79 over 225 trials, is_significant=false, Sharpe CI [-7.31, +17.1] straddling 0, PBO 0.60; sensitivity FAILED with 5 cliffs spanning the entire core signal (exit_z, window, entry_z, adf_crit, max_hold_bars); walk-forward is_overfitted=true with avg IS Sharpe 8.03 collapsing to avg OOS 0.0 across ALL three windows (no OOS trades fire); and the holdout FAILED with zero trades. The optimizer drove the config to just 4 trades (total_return -3.33%, Sharpe -2.59, PF 0.42), the over-selection-toward-sparsity signature. Not iterate (attempt 1 of 2): no robust parameter region exists when every core param is a cliff, DSR is literally 0.0, OOS is all zeros, and the optimizer already emptied the signal — a second sweep re-finds another near-zero-trade artifact. Not revise_hypothesis: cointegration pairs MR has no promoted sibling to redirect to (the developer's prior BTC-ETH cointegration pairs trade also failed), and the DOGE-ADA residual does not reliably mean-revert (base PF 1.03), so there is no working mechanism to point at a different pair. FAILURE PATTERN: daily Engle-Granger + ADF cointegration pairs MR on a mid-cap alt pair (DOGE-ADA) fires too rarely (~36 base trades, z>2 AND ADF-stationary) to validate out-of-sample — the residual barely mean-reverts (base PF 1.03, flat 6-yr return), and best-of-225 selection tightens the ADF/z filters until OOS and holdout windows produce ZERO trades (OOS Sharpe exactly 0.0 x3), fails deflated Sharpe (0.0), and is_overfitted=true. Cointegration pairs trades on crypto alt pairs are structurally too sparse and too weak to clear multiple-testing deflation and one-shot holdout validation.
Implementation
Dollar-neutral daily Engle-Granger cointegration pairs trade on DOGEUSDT.BINANCE (leg A) and ADAUSDT.BINANCE (leg B) USD-M perps, pure OHLCV. Each day, over a 60-day timestamp-aligned window, it runs an OLS regression DOGE = alpha + beta*ADA, forms the residual spread, and applies an ADF test (constant + 1 lag); the pair is cointegrated when the ADF t-stat <= -2.57 (~10% level). It z-scores the latest residual and, when cointegrated, SHORTS DOGE + LONGS ADA on z>+2 (DOGE rich) or LONGS DOGE + SHORTS ADA on z<-2 (DOGE cheap), equal dollar notional per leg (dollar-neutral). Exits when |z|<0.5 or after 14 days. Both legs are managed as a basket inside calculate_signal, which returns the continuous residual z-score. Leverage 1.0 (short-capable futures venue; ~60% gross fits within 1x equity).
Backtest Review
Correct, careful implementation: Engle-Granger rolling OLS + ADF stationarity gate, timestamp-aligned SyncedBuffer (avoids cross-leg misalignment), perfectly balanced 18 long / 18 short legs.
Backtest Review
Genuinely dollar-neutral and well-behaved: beta -0.03, no blow-up, no liquidation, returns realized (end_unrealized_pct -1.1), benchmark_meaningful correctly false for a market-neutral spread.
Backtest Review
Tests the analyst-recommended, under-explored pairs/cointegration mechanism class on instruments that backtest cleanly (avoids the audit_stale failure mode).
Backtest Review
Edge is near-zero: profit_factor 1.034 (fees consume almost all the gross spread), Sharpe 0.31, total return only +3.28% over ~6 years (CAGR 0.84%), sharpe_ci_low -1.71 (CI straddles 0).
Backtest Review
Thin sample: 36 trades -> ~12 per walk-forward window; raising entry_z in optimization risks zero-trade windows (the sparsity profile that fails DSR/holdout).
Backtest Review
No durable edge across regimes: 2024 -12.2%, 2025 -2.1% — DOGE-ADA cointegration is at best weakly/intermittently present.
Backtest Review
thin for walk-forward but workable
Backtest Review
+3.28% over 6 years — barely break-even after fees
Analysis
Correctly implemented dollar-neutral pairs trade (beta -0.03, benchmark_correlation -0.19) with proper Engle-Granger + ADF cointegration gating and balanced long/short entries (18/18)
Analysis
Low fee drag (commission_pct_of_gross 0.88%) — costs are not the cause of failure
Analysis
No edge in the base config: Sharpe 0.31, profit_factor 1.034, total_return +3.28% over 6 years (flat), max_drawdown 31.3% — a coin-flip spread carried by lumpy outliers (kurtosis 69, a +15.8% day vs a -15.5% day)
Analysis
Deflated Sharpe 0.0 (vs 0.95 bar), expected-max 9.79 over 225 trials, is_significant=false, Sharpe CI [-7.31, +17.1] straddles 0, PBO 0.60
Analysis
Sensitivity FAILED with 5 cliffs spanning the entire core signal (exit_z, window, entry_z, adf_crit, max_hold_bars) — no robust parameter region exists
Analysis
Walk-forward is_overfitted=true: avg IS Sharpe 8.03 collapses to avg OOS 0.0, with all three OOS windows exactly 0.0 (no out-of-sample trades fire)
Analysis
Holdout FAILED with zero trades (holdout_sharpe 0.0); optimized backtest is a net loser (total_return -3.33%, Sharpe -2.59, PF 0.42, only 4 trades) — optimization drove the signal to near-zero frequency
Analysis
Structurally too sparse: 36 trades over 6 years in the base config, and the cointegration+z>2 filter rarely fires, so the optimizer over-selects toward sparsity and empties the OOS/holdout windows
Outcome Summary
This strategy was the cleaner retry of a failed cointegration pairs idea, run on DOGE-ADA specifically because both backtest without the audit_stale dependency failures that killed the earlier BTC-ETH version. It was correctly implemented and genuinely market-neutral with proper Engle-Granger+ADF gating, earning an 'optimize' verdict — but the base edge was a coin flip (+3.28% over 6 years, Sharpe 0.31, PF 1.034) carried by outliers. Optimization confirmed there was nothing to find: deflated Sharpe 0.0, five sensitivity cliffs across the whole signal, walk-forward OOS and holdout both producing zero trades, and an optimized config that lost money on just 4 trades. The analyst abandoned it at the analyzing stage on the first iteration as a structurally too-sparse mechanism with no robust region and no promoted sibling to point at a different pair, so it stopped before risk review.
Outcome Summary
Daily Engle-Granger + ADF cointegration pairs trades on crypto alt pairs are structurally too sparse and too weak to validate — the residual barely mean-reverts (PF ~1.03, flat 6-year return) and best-of-N optimization tightens the z/ADF filters until OOS and holdout windows produce zero trades, failing deflated Sharpe and every robustness gate; a prior BTC-ETH cointegration attempt failed the same way, so there's no working sibling to redirect to.
Outcome Summary
It cleared the backtest-review gate with an 'optimize' verdict, but the post-optimization analyst abandoned it: deflated Sharpe 0.0 (vs 0.95) against an expected-max 9.79 over 225 trials, is_significant false, a CI straddling zero, PBO 0.60, sensitivity failed with 5 cliffs spanning every core parameter, walk-forward overfitted (avg IS 8.03 → OOS exactly 0.0 across all three windows), and a holdout that failed with zero trades — best-of-N selection tightened the filters until the signal stopped firing out-of-sample.
Outcome Summary
A dollar-neutral daily-bar Engle-Granger cointegration pairs trade on DOGEUSDT/ADAUSDT Binance futures (1.0x leverage) — running a 60-day rolling OLS of DOGE on ADA, gating on an ADF stationarity test, and fading the residual z-score (short DOGE/long ADA at z>+2, long DOGE/short ADA at z<-2; exit at |z|<0.5 or 14 days) — chosen on two mid-cap alts that backtest cleanly to avoid the audit_stale failures that killed a prior BTC-ETH attempt.
Outcome Summary
The base config was essentially break-even — 36 trades (18 long / 18 short), +3.28% total over ~6 years (CAGR 0.84%), Sharpe 0.31, profit factor 1.034, 47.2% win rate, 31.3% max drawdown — genuinely dollar-neutral (beta -0.03) but carried by lumpy outliers (kurtosis 69), and the optimized config was a 4-trade net loser (-3.33%, Sharpe -2.59, PF 0.42).
Backtest and paper results are hypothetical. Trading involves risk of loss.