Pair Trading
Conduct statistical arbitrage scanning using cointegration, Augmented Dickey-Fuller tests, and z-score divergence analysis.
Pair Trade Screener
The Pair Trade Screener unlocks institutional statistical arbitrage. It completely ignores fundamental valuation and broad market direction, instead using advanced quantitative mathematics to identify when two tightly correlated stocks temporarily diverge, allowing you to execute a market-neutral trade to profit when they snap back together.
What is Statistical Arbitrage (Stat Arb)?
If the stock market crashes 20% tomorrow, 95% of traditional retail traders will lose money. Statistical arbitrage traders will not.
Stat Arb (specifically "Pairs Trading") is a market-neutral strategy. You find two assets that historically move in lockstep (for example, Coke and Pepsi). Because they are in the same sector, subject to the same macroeconomic forces, their prices are highly correlated. Mathematically, they are cointegrated.
Occasionally, this relationship breaks. A random news event or a massive institutional block trade might cause Coke to shoot up 3% while Pepsi drops 3%. The "spread" between their prices artificially widens. A pairs trader immediately exploits this inefficiency by Shorting the overpriced asset (Coke) and going Long the underpriced asset (Pepsi).
It does not matter what the stock market does next. If the S&P 500 goes up, down, or sideways, the pair will eventually revert back to its historical mean correlation. When the spread closes, the trader pockets the difference, completely immune to the broader market direction.
The Pair Trade Screener skill runs the extreme mathematical compute engine required to find and size these exact trades.
How Pierce AI Executes It
When you ask Pierce to check a pair of stocks for statistical arbitrage, it runs a heavy Python-backed quantitative analysis:
- Historical Array Extraction: Pierce pulls 1-2 years of daily closing prices for both Target A and Target B to establish the baseline relationship.
- The Cointegration Test: Correlation is not enough. Pierce executes an Ordinary Least Squares (OLS) regression and an Augmented Dickey-Fuller (ADF) test on the spread residuals. This proves mathematically whether the two stocks are statistically anchored to one another, generating a definitive p-value.
- Z-Score Calculation: Pierce measures the exact current distance between the two stocks. It calculates the Z-score (standard deviation from the mean). If the Z-score pushes beyond +2.0 or -2.0, Pierce triggers an actionable trading signal.
- Hedge Ratio Construction: You do not just buy 100 shares of A and short 100 shares of B. Pierce calculates the exact Hedge Ratio (e.g., you must short 1.3 shares of Asset A for every 1 share of Asset B you buy) to ensure the trade is perfectly mathematically balanced.
- The Half-Life Estimate: Pierce tells you exactly how long you will likely be in the trade by calculating the spread's historical mean-reversion half-life.
Key Metrics & Deliverables
By running the Pair Trade Screener, Pierce provides a complete quantitative battle plan:
- The Statistical Validity Verdict: Pierce explicitly states whether the pair is actually cointegrated (must have a p-value < 0.05) or if the correlation is just a random illusion.
- Comparative Watchlist Tables: When evaluating multiple pairs, Pierce generates a comparative table ranked by a Composite Score that represents statistical strength and entry suitability:
- Pair Trade Score (0-3 passes): Total passed checkpoints (Cointegration p-value < 0.05, signal divergence |z-score| >= 1.5, and reversion speed half-life <= 45 days).
- Composite Score (0-100 weighted index):
- Cointegration Significance (40%): 1.0 point if
p_value < 0.01, 0.6 points if0.01 <= p_value < 0.05, else 0.0. - Signal Divergence (35%): 1.0 point if
2.0 <= |zscore| < 3.0(optimal entry range), 0.5 points if1.5 <= |zscore| < 2.0or3.0 <= |zscore| < 4.0, else 0.0. - Reversion Half-Life (25%): 1.0 point if
half_life <= 15days, 0.6 points if15 < half_life <= 45days, else 0.0.
- Cointegration Significance (40%): 1.0 point if
- The Execution Signal: Is there a trade today? Pierce will instruct you exactly which asset to short and which to long based on the current Z-score deviation.
- The Capital Allocation Matrix: The exact hedge ratio sizing required to execute the trade safely.
- The Stop-Loss / Invalidation Level: Pierce explicitly defines at what Z-score the historical relationship appears structurally broken, forcing you to exit the trade to avoid catastrophic risk.
Example Prompts & Use Cases
You can actively push Pierce to run advanced quantitative analysis using these specific prompts:
- "Check Visa and Mastercard for cointegration. Are they a valid pair trade?"
- "Run a stat arb analysis on the spread between MSFT and AAPL."
- "I noticed XOM and CVX are diverging today. What is their current Z-score? Is it a short/long setup?"
- "Calculate the hedge ratio and half-life for a pair trade between AMD and NVDA over the last year."
By providing two related tickers, you activate the heavy computational backend.
Methodology Notes & Limitations
Pairs trading is mathematically sound, but requires extreme capital discipline to execute properly:
- Margin Requirements: You are explicitly shorting a stock in a pairs trade. You must have a margin account with sufficient capital to maintain the short leg of the trade, even if it temporarily moves against you while the spread continues to widen.
- The Relationship Can Permanently Break: A low p-value proves the pair has been historically linked. It does not guarantee they will be linked forever. If one company invents a revolutionary new technology and the other company goes bankrupt, the spread will never close. You must still use the Stop-Loss.
- Execution Slippage: Because you are executing two trades simultaneously (a buy and a short sell), you will pay double the spread. Ensure the divergence is wide enough to cover execution costs before entering the trade.
Built for the Market-Neutral Operator
You don't need to predict whether we are entering a bull market or a recession to make money. The Pair Trade Screener completely eliminates directional market risk from your portfolio. By mathematically measuring the elasticity between two linked assets, you ensure that as long as financial gravity exists, the trade will eventually revert to the mean.
Note: The Pair Trade Screener requires high-load Python statistical compute and is highly computationally intensive. It is included exclusively in the Pro tier.
Try this skill in the app
Execute the recommended prompt directly in the Pierce app using real-time market data.