About this question
Hard · statistical_analysis · Quant Researcher interview question · cointegration, time_series, regression, statistics
Pairs trading strategies utilize cointegration to identify assets that maintain a long-term equilibrium relationship despite individual non-stationarity. The Engle-Granger two-step method validates this relationship by testing the stationarity of residuals derived from a linear regression between two asset price series. This statistical approach is fundamental for detecting mean-reverting signals in quantitative finance. Task Implement a function to perform the Engle-Granger cointegration test