About this question

Engle-Granger Cointegration Test

Easy · time_series · Quant Researcher interview question · time-series, cointegration, ols, adf, pairs-trading, statistics

The Engle-Granger two-step procedure tests if two time series are cointegrated, meaning they share a common stochastic trend. This is crucial in quantitative finance for identifying mean-reverting spreads in pairs-trading and statistical-arbitrage strategies. The test first estimates a long-run relationship via OLS and then applies a unit-root test to the residuals to confirm cointegration. Task Implement the function solution(x: list, y: list) -> list to perform the Engle-Granger two-step coin