Strategies
KO/PEP Cointegration Pairs Reversion — Dollar-Neutral Long-Short Stat-Arb on Commission-Free US Equities: Trade the Mean-Reverting Spread Between Two Cointegrated Consumer-Staples Large Caps, Z-Score Entry, Convergence Exit, Divergence Stop (KO.USEQ + PEP.USEQ, Daily Bars, 3-Parameter)
Outcome: Abandoned
KoPepCointegrationPairsReversionLS
Correctly dollar-neutral: beta 0.029, benchmark_correlation 0.14, benchmark_meaningful false — the market-neutral construction works as designed
Hypothesis
No significant edge and a decayed mechanism — not worth optimizing. Full-sample Sharpe is 0.106 with a bootstrap CI [-0.163, 0.380] that straddles zero, information_ratio is negative (-0.385), and total_return is ~1%/yr over 54 years. Critically, the KO/PEP spread edge has decayed: every year from 2023 through 2026 is negative and rolling Sharpe has fallen to -4.26, so the walk-forward's recent OOS window and the last-20% holdout both sit in the losing regime and would fail. This is not fee-limited (avg_trade_return_pct 0.476% clears the USEQ floor) — it is the known USEQ market-neutral / KO-PEP-pairs zero-survivor pattern (already iterated to death twice). Optimizing a barely-positive, statistically-insignificant, actively-decaying cointegration spread would only curve-fit the historical windows and die at holdout.
Implementation
Dollar-neutral long-short pairs stat-arb on the KO/PEP cointegrated spread, USEQ daily bars. Each session it fits a rolling OLS hedge ratio of log(KO) on log(PEP) over a 45-session window, forms spread = log(KO) - beta*log(PEP), and returns the z-score of that spread as the signal. z <= -1.8 goes LONG KO / SHORT PEP, z >= +1.8 goes SHORT KO / LONG PEP; both legs open together at equal dollar notional (25% of equity each, beta-scaled on the hedge leg, whole shares). Positions close on convergence (z back through 0), a divergence hard stop at |z| >= 3.5 against the position, or a 40-session time stop, and both legs are always closed together. The PEP leg is only submitted after the KO leg is confirmed working, and any orphaned hedge leg found while the primary is flat is closed immediately, so the book never carries a naked directional position.
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.
No code change; ensure full-history window is used so each WF window and the holdout carry enough completed round trips.
Modest sandbox trade count (42 over ~4.5yr, ~9/yr) — inherent to pairs cadence, NOT a measurability blocker since the full backtest runs on decades of KO/PEP daily history (hundreds of trades). Flagged so the analyst checks per-window walk-forward/holdout counts.
Backtest Review
- Sharpe
- 0.11
- Total return
- 53.91%
- Max drawdown
- 13.65%
- Trades
- 445
- Win rate
- 58.0%
- Profit factor
- 1.18
Correctly dollar-neutral: beta 0.029, benchmark_correlation 0.14, benchmark_meaningful false — the market-neutral construction works as designed
avg_trade_return_pct 0.476% clears the USEQ cost floor (not a fee failure)
Well-controlled risk: max_drawdown 13.6%, both legs same-venue so no injection problem
445 trades over a very long history — adequate sample count
Sharpe 0.106 with CI [-0.163, 0.380] straddling zero — no statistically significant edge even in-sample
total_return only 53.9% over 54 years (~1%/yr) with information_ratio -0.385 and profit_factor 1.18
Edge is decayed: every year 2023–2026 is negative and rolling Sharpe has collapsed to -4.26 — the KO/PEP spread has stopped reverting profitably
The holdout (last ~11 years) and most recent walk-forward OOS window fall inside the negative recent regime, so optimization would fail OOS/holdout
Matches the known USEQ market-neutral / KO-PEP-pairs zero-survivor failure pattern (already died twice)
Iteration History
Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['z_exit', 'z_entry', 'beta_max', 'beta_min', 'lookback', 'hard_stop_z', 'per_leg_pct', 'min_notional', '_param_bounds', 'max_hold_bars'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000) - steady_downtrend: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000) - flat_ranging: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000) - volatility_spike: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000) - zero_volume: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000) - price_gap: TypeError: FactoryStrategy._bar_ts() takes 1 positional argument but 2 were given (bar timestamp: 1735689600000)
Backtest and paper results are hypothetical. Trading involves risk of loss.