Skip to content
All library documents

Cointegrated Pairs Trading with Walk-Forward Testing in Indian Equities

Article QuantInsti blog

Summary

This project develops a market-neutral mean-reversion strategy for pairs drawn from 25 large-cap NSE stocks across several sectors. It estimates hedge ratios with ordinary least squares, tests spread residuals for stationarity using a lag-zero ADF procedure, and applies a 5% Benjamini–Hochberg false discovery rate to control pair selection. A rolling walk-forward process uses a 252-day training window and 21-day test step; spread z-scores drive entries and exits, with lagged rolling statistics intended to avoid look-ahead bias. The backtest includes stated transaction costs and equal capital allocations per active pair.

Three pairs passed the selection process. Across the stated out-of-sample period, the portfolio recorded positive total PnL but low annualized return, a low Sharpe ratio, and substantial maximum drawdown. The project identifies important limitations and proposed improvements, including lag selection, concentration, fixed thresholds and sizing, missing stop-losses, and survivorship bias from a fixed stock universe. The results are an academic baseline and do not establish robust live performance.

Key ideas

  • Pair selection uses training-window OLS hedge ratios, residual stationarity tests, and false discovery rate control.
  • Walk-forward evaluation separates 252-day training windows from 21-day test steps.
  • The strategy enters and exits spread positions using z-score thresholds and lagged rolling statistics.
  • The reported portfolio had positive total PnL but low annualized return and a large maximum drawdown.
  • The fixed universe, lag-zero ADF approximation, pair concentration, and static risk rules limit confidence in the backtest.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.