Building and Evaluating a Market-Neutral Pairs Trading Strategy on the National Stock Exchange of India

The evolution of algorithmic trading within the Indian financial markets has reached a pivotal juncture, shifting from basic trend-following models to sophisticated statistical arbitrage frameworks. A recent comprehensive study conducted by analyst Shant Tandon provides a rigorous blueprint for implementing a market-neutral pairs trading strategy across the National Stock Exchange (NSE). By examining the performance of 25 large-cap stocks across the Banking, Information Technology, Pharmaceutical, Cement, and Auto sectors, the project highlights the challenges and technical requirements for developing institutional-grade trading systems in a high-volatility environment.
The Mechanics of Statistical Arbitrage
Pairs trading, a foundational strategy in the quantitative finance toolkit, relies on the principle of mean reversion. When two assets demonstrate a historical cointegrated relationship—meaning their price spread tends to return to a long-term average—a trader can exploit temporary deviations from this equilibrium. The strategy involves simultaneously taking a long position in the undervalued asset and a short position in the overvalued asset, effectively neutralizing broader market exposure.
Tandon’s research, covering the period between January 1, 2015, and June 30, 2025, serves as an academic case study in mitigating common pitfalls. Many retail-level algorithmic strategies fall victim to look-ahead bias, where information from the future inadvertently leaks into the model, or inadequate control for false discoveries, where random price fluctuations are mistaken for trading signals. To address these, the study utilized a walk-forward optimization methodology, employing a 252-day training window followed by a 21-day test period.
Technical Framework and Methodology
The methodology employed a stringent statistical filter to identify viable pairs. By utilizing Ordinary Least Squares (OLS) to estimate the hedge ratio and the Augmented Dickey-Fuller (ADF) test to confirm residual stationarity, the strategy ensured that only robust relationships were traded. To further refine the selection process and control for the multiple testing problem, the Benjamini-Hochberg False Discovery Rate (FDR) was applied at a 5% significance level.
This rigorous filtering process yielded three primary pairs that exhibited consistent cointegration: HDFC Bank vs. Kotak Bank, Hero MotoCorp vs. UltraTech Cement, and HCL Tech vs. ICICI Bank. By applying a z-score-based signal generation logic, where positions are entered when the absolute z-score exceeds 1.5 and exited upon mean reversion, the strategy maintained a disciplined approach to risk. Crucially, the implementation factored in transaction costs of 5 basis points per leg, reflecting a realistic assessment of the friction costs inherent in the Indian market.

Performance Analysis and Statistical Outcomes
The backtest results, covering the period from January 2016 to June 2025, offer a sobering look at the realities of statistical arbitrage. On a capital base of ₹15,00,000, the strategy executed 271 trades, achieving a win ratio of 63.47%. The total profit generated stood at ₹1,65,544.97, representing a cumulative return of 11.04% over the decade-long observation window.
However, the annualized return of 0.30% paired with an annualized volatility of 13.34% highlights the difficulty of maintaining consistent alpha in a competitive market environment. The maximum drawdown of -34.31% serves as a critical indicator of the risks involved in pairs trading, particularly during regime shifts where the historical correlation between assets may break down. The Sharpe ratio of 0.089 suggests that while the strategy is theoretically sound, it requires significant optimization to compete with broader market indices or more diversified quantitative portfolios.
Implications for Market Participants
The findings from this study carry significant implications for the broader quantitative trading community in India. First, the data underscores that simple mean-reversion models are highly sensitive to market regimes. In a period characterized by significant structural shifts—such as the COVID-19 market crash of 2020 or the subsequent recovery—the divergence between historical cointegrated pairs can widen beyond the capacity of standard z-score models to recover.
Furthermore, the research highlights the necessity of "institutionalizing" retail strategies. The transition from a backtested model to a live trading environment requires more than just statistical significance; it demands dynamic position sizing, robust stop-loss mechanisms, and a survivorship-bias-free universe. The fact that this project excluded survivorship bias by using a static list of large-cap stocks suggests that the performance metrics might be optimistic compared to a real-world implementation that accounts for stocks entering and leaving the Nifty 50 index.
Strategic Recommendations for Future Development
To bridge the gap between academic research and commercial viability, the study proposes several paths for advancement. One of the most critical is the move toward information-criterion-based lag selection. By moving away from the ADF(0) test in favor of the Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC), traders can better distinguish between true cointegration and spurious statistical noise.
Additionally, the concentration of the portfolio in only three pairs introduces significant idiosyncratic risk. Expanding the universe to include mid-cap stocks and more diverse sectors such as Energy and Metals could potentially lower the portfolio’s correlation to individual sector shocks. The recommendation to introduce volatility-scaled sizing—such as the Kelly Criterion or inverse-volatility weighting—aligns with modern portfolio theory, which seeks to maximize the utility of capital by allocating more to higher-conviction, lower-risk signals.

Finally, the inclusion of adaptive exit thresholds and hard stop-loss rules is paramount. As noted in the analysis, a maximum drawdown of over 34% is often unacceptable for institutional mandates. By incorporating regime-switching models—which adjust entry thresholds based on whether the market is in a high-volatility or low-volatility state—traders can effectively protect capital during periods of structural instability.
Industry Context and Educational Pathways
The work of Shant Tandon, completed as part of the Executive Programme in Algorithmic Trading (EPAT), reflects a broader trend toward professionalizing quantitative finance education. The proliferation of programs focusing on Python-based backtesting, machine learning, and risk management is fostering a new generation of traders capable of navigating the complexities of the NSE.
Experts in the field, including Dr. Ernest P. Chan, have long emphasized that the "holy grail" of trading is not a single predictive model, but a robust risk-management framework. As the Indian market becomes increasingly integrated with global financial systems, the demand for such disciplined, data-driven approaches will only grow. For aspiring quantitative traders, the journey from building a prototype to executing a profitable, risk-adjusted strategy involves a continuous cycle of hypothesis testing, failure analysis, and iterative refinement.
In summary, while the documented pairs trading strategy provides a clean and defensible baseline for academic inquiry, its real-world application requires a shift toward more adaptive, risk-conscious modeling. The study acts as a vital reference point for the industry, illustrating that while the mathematical foundations of arbitrage are well-understood, the mastery of the strategy lies in the ability to manage the unforeseen volatility inherent in global equity markets. By addressing the identified limitations—survivorship bias, static thresholding, and limited diversification—practitioners can refine these models to better capture alpha in the evolving landscape of Indian finance.







