How to Screen for Cointegrated Stock Pairs
Quick Answer
To screen for cointegrated stock pairs: (1) Select a universe of stocks from similar sectors, (2) Calculate correlation coefficients to find highly correlated pairs (>0.70), (3) Run cointegration tests (Augmented Dickey-Fuller or Engle-Granger) on correlated pairs, (4) Filter results by p-value (<0.05), and (5) Evaluate additional metrics like half-life and spread stability. This process identifies pairs with statistically significant long-term relationships.
Why Screening Matters
Not all correlated stock pairs make good trading candidates. Cointegration is the key statistical property that separates profitable pairs from those that merely move together temporarily. A proper screening process helps you identify pairs with genuine long-term relationships.
Without systematic screening, you might waste time and capital on pairs that:
- Have spurious correlations that disappear over time
- Don't revert to their mean reliably
- Have poor risk-reward characteristics
- Contain hidden sector or market biases
The 4-Step Screening Process
Select Your Stock Universe
Start by choosing a group of stocks to analyze. The best approach is to focus on:
- Same sector stocks: Banks, tech companies, energy stocks, etc.
- Index constituents: S&P 500, NASDAQ 100, Russell 2000
- Similar market cap: Large-cap with large-cap, mid-cap with mid-cap
- Liquid stocks: High daily volume to ensure you can enter/exit positions
💡 Pro Tip: Testing 500 stocks creates 124,750 possible pairs. Start with 50-100 stocks from 2-3 sectors.
Calculate Correlation Coefficients
Correlation measures how closely two stocks move together. Calculate the Pearson correlation coefficient for each potential pair using historical price data (typically 1-2 years).
Correlation Formula:
Where ρ is correlation, Cov is covariance, and σ is standard deviation
⚠️ Important: High correlation (>0.70) is necessary but NOT sufficient. Correlated pairs aren't always cointegrated!
Test for Cointegration (Engle-Granger Method)
PairParade uses the Engle-Granger two-step method, which is the gold standard for testing cointegration in trading pairs. This method checks if two stocks maintain a stable long-term relationship.
Engle-Granger Test Process:
- Convert to log prices: logP₁ = ln(Price₁), logP₂ = ln(Price₂)
- Run OLS regression: logP₁ = α + β × logP₂ + ε (β is the hedge ratio)
- Extract residuals: ε = logP₁ - (α + β × logP₂)
- Run ADF test on residuals: Tests if residuals are stationary
- Check ADF statistic: More negative = stronger cointegration
📊 Why Log Prices? Using logarithms stabilizes variance and makes the relationship linear, improving the statistical properties of the test. This is standard practice in quantitative finance.
Engle-Granger Statistic Interpretation:
• EG < -4.0: Very strong cointegration ⭐⭐⭐ (passes 1% threshold)
• -4.0 < EG < -3.5: Strong cointegration ⭐⭐ (passes 5% threshold)
• -3.5 < EG < -3.3: Moderate cointegration ⭐ (passes 5% for large samples)
• -3.3 < EG < -3.0: Weak cointegration (may pass 10% threshold)
• EG > -3.0: Not statistically significant ❌
Critical values vary by sample size. For large samples (8+ years daily data): 1%=-3.90, 5%=-3.34, 10%=-3.04. Engle-Granger values are stricter than standard ADF tests.
Evaluate Additional Metrics
Beyond the p-value, examine these metrics to refine your list:
Half-Life
Time for spread to revert halfway to mean. Ideal: 5-30 days. Shorter = faster trades.
Hedge Ratio (β)
The ratio between the two stocks. More stable β = more reliable pair.
Spread Volatility
Standard deviation of spread. Higher = more trading opportunities, but higher risk.
Zero Crossings
How often spread crosses its mean. More crossings = more trading opportunities.
Screening Results Example
When you screen 70 stock pairs, you might see an ADF statistic distribution like this. Only pairs with ADF < -3.1 (approximately 5% significance) pass the cointegration test:
Top Cointegrated Pairs Example
Here's what your final screened results might look like:
| Pair | ADF Statistic | Correlation | Half-Life (days) | Status |
|---|---|---|---|---|
| JPM / BAC | -4.52 | 0.920 | 5.2 | Strong |
| XOM / CVX | -3.87 | 0.880 | 7.1 | Strong |
| KO / PEP | -3.45 | 0.790 | 9.3 | Good |
| AAPL / MSFT | -3.12 | 0.850 | 12.5 | Moderate |
💡 Reading the Table: JPM/BAC has the strongest cointegration (ADF = -4.52) with a short half-life (5.2 days), making it an excellent trading candidate. More negative ADF statistics indicate stronger mean reversion.
Key Formulas (Engle-Granger Method)
1. Convert to Log Prices
Natural logarithm transformation stabilizes variance and makes relationships linear
2. OLS Regression for Hedge Ratio
Where β (hedge ratio) = (n×ΣXY - ΣX×ΣY) / (n×ΣX² - (ΣX)²)
The residuals ε represent the deviation from the long-term relationship
3. ADF Test on Residuals
ADF Statistic = β / SE(β). More negative values indicate stronger mean reversion
4. Calculate Half-Life
Where λ = -β from the AR(1) regression. Typical range: 5-30 trading days
5. Z-Score for Entry Signals
Where Spread = logP₁ - β × logP₂. Enter trades when |Z-Score| > 2
Common Screening Mistakes to Avoid
❌ Mistake: Using only correlation
Many pairs with 0.90+ correlation are NOT cointegrated. Always run the ADF test.
❌ Mistake: Mixing different sectors
Pairing tech stocks with energy stocks rarely works, even with high correlation.
❌ Mistake: Using too short a time period
Use at least 1 year of daily data. Less data leads to false positives.
❌ Mistake: Ignoring transaction costs
High-frequency mean reversion might not be profitable after commissions and slippage.
❌ Mistake: Not re-testing periodically
Cointegration relationships can break down. Re-test every 3-6 months.
Skip the Manual Work—Screen Pairs Instantly with Pair Parade
Running cointegration tests manually requires programming skills, statistical knowledge, and hours of computation time. PairParade automates the entire screening process with institutional-grade algorithms, giving you results in seconds.
✓ Automated ADF Tests
Every pair tested daily with live data
✓ Pre-Screened Universe
Thousands of pairs analyzed continuously
✓ Ready-to-Trade Signals
Get alerts when opportunities appear
Common Questions
What's the difference between correlation and cointegration?
Correlation measures if two stocks move together in the short term. Cointegration tests if they maintain a stable long-term relationship. Two stocks can be highly correlated without being cointegrated, which means the relationship might be temporary and unreliable for trading.
How many pairs should I test?
Start with 50-100 stocks (which creates 1,225-4,950 possible pairs). Testing the entire S&P 500 creates 124,750 pairs—computationally intensive but possible with automated tools. Most traders focus on 2-3 sectors to keep the universe manageable.
Do I need programming skills to screen for pairs?
Traditional screening requires Python or R knowledge plus statistical libraries. However, platforms like PairParade eliminate this requirement by providing pre-screened pairs with all the statistical tests already run for you.
How often should I re-screen for new pairs?
Re-test existing pairs monthly and conduct full rescreening quarterly. Market conditions change, companies evolve, and cointegration relationships can break down. Regular screening ensures you're trading the most reliable current pairs.
What ADF threshold should I use?
The standard threshold is ADF < -3.1 (approximately 5% significance level). Conservative traders use ADF < -3.5 for stronger confidence. Avoid pairs with ADF > -2.9 as they lack statistical significance. PairParade uses -3.1 as the default threshold.