| Market | Stocks, Crypto, Forex |
|---|---|
| Timeframe | 1h, 4h, Daily |
| Indicators | Z-score of spread, Moving Averages |
| Style | Mean reversion/statistical arbitrage |
| Skill level | Intermediate |
| Typical holding time | Intraday to Swing |
| Risk per trade | 0.5–1% |
How It Works
- Identify two assets with historically high correlation or cointegration.
- Monitor their price spread or ratio for deviations from the norm (mean).
- When the spread widens beyond a preset threshold, simultaneously long the undervalued leg and short the overvalued one.
- Profit if the spread reverts toward its historical average.
- Market-neutral exposure reduces overall beta risk.
The statistical edge exists because short-term dislocations in asset pricing often revert to historical relationships due to fundamental or arbitrage factors. These divergences happen most frequently during periods of temporary order-flow imbalances, sector rotation, or event-driven dislocations, then revert as mean reversion sets in.
This approach works best in liquid markets with relatively stable correlations, and is less effective during structural breaks or major news events causing fundamental regime shifts.
Strategy Rules (Step-by-step)
Setup:
- Pair Selection: Screen assets for historical cointegration using tests like Augmented Dickey-Fuller (ADF) and rolling correlation over 120 days ≥ 0.8.
- Spread Calculation: At each bar, compute the spread: Spreadt = PriceA – β•PriceB (β via linear regression), or use log(price) ratios for ratio-based pairs.
- Normalize: Calculate Z-score: Zt = (Spreadt – MeanN) / StdN, where N is the lookback period (e.g., 60 bars).
- Confirmation: Only act if daily volume > average and spread divergence is not news-driven.
Entry:
- Enter at the close of the first candle when |Z| ≥ 2.0 (Z-score threshold). Go long the leg that is underpriced and short the overpriced leg based on the Z-sign (for Z > 2, short spread leg A and long B; for Z < –2, reverse).
Stop-loss:
- Hard stop if Z-score exceeds 3.5 in the same direction after entry.
- Optional: Stop if combined loss hits –1.5R.
Take profit:
- Close both legs when Z-score reverts to 0 (mean) or within 0.25 of mean.
- Alternatively, use a fixed target at Z=0.5.
Trade management:
- Move stop to breakeven when Z-score retraces halfway to mean.
- Optional: Scale out 50% at Z=1.0, remainder at full mean reversion.
Settings and Parameters
- Indicator settings: Z-score lookback = 60; correlation window = 120 bars; minimum cointegration p-value < 0.05.
- Timeframes tested: 15m, 1h, 4h, daily for stocks/crypto; 1h or higher for forex.
- Assets tested: Highly correlated equities (e.g., MSFT/AAPL, KO/PEP), pairs of major crypto assets (e.g., ETH/BTC), or related FX pairs (EUR/USD & GBP/USD).
- Session/Hours: Liquidity hours—stock market open, crypto 24/7, forex London/NY overlap.
When It Works vs. When It Fails
Works best:
- Stable or reverting markets where historical relationships persist.
- High liquidity and low volatility spikes.
- Seasonal or sector-based correlations hold.
Struggles:
- Sudden regime changes, earnings releases, major macro news.
- Periods of structural break in correlation or cointegration.
- Illiquid or low-volume markets.
Filters to avoid bad conditions:
- Skip around earnings, major economic reports, or during volatility spikes (e.g., using ATR filter).
- Monitor rolling correlation and avoid pairs whose correlation drops by more than 0.2 from the trailing mean.
- Apply volatility filter: skip trades if spread standard deviation triples vs. normal.
Risk Management (Beginner-safe)
- Position sizing: Risk 0.5–1% of account equity per pair trade (total exposure, both legs combined).
- Max open risk: No more than 2% total open exposure across all pairs.
- Daily loss limit: Cease trading after two consecutive losing trades or ≥2R daily drawdown.
- Fees/slippage note: Factor in roundtrip commissions and potential execution delays, as slippage is common in rapid spread moves.
Example Trade (Walkthrough)
- Pair/Asset: Microsoft (MSFT) and Apple (AAPL)
- Timeframe: 1-hour
- Setup snapshot: Over the last 120 hours, MSFT/AAPL spread has been cointegrated (ADF p=0.01) and correlation is 0.89. Spread Z-score is –2.15, pushed lower by recent MSFT underperformance.
- Entry: At next candle close, initiate long MSFT and short AAPL of dollar-equivalent value (hedged) because Z < –2.0. Entry prices: MSFT $320.00, AAPL $195.00.
- Stop-loss: If Z-score drops to –3.5, or if aggregate position loss equals 1.5x risk (e.g., $150 per $100 risked).
- Take profit: As soon as Z-score returns to greater than –0.25, both trades are closed. This occurs after 7 hours, with MSFT up $1.70/share, AAPL down $0.80/share; net P/L: +1.2R.
- Outcome: Trade meets target; lesson—mean reversion requires patience, avoid trading around earnings week.
Pros and Cons
Pros:
- No directional market bias needed
- Statistically testable/quantifiable edge
- Clear exit logic and systematic entry
- Often lower drawdowns than outright trend trading
Cons:
- Edge reliant on stable correlations/cointegration
- Regime shifts can cause large losses (“blowups”)
- Execution, slippage, and fees can erode profits
- Potential for false signals during volatile news
Common Mistakes
- Taking trades during earnings/news announcements
- Choosing pairs with weak/no cointegration
- Improper sizing (not dollar/volatility neutral)
- Over-leveraging on low-volatility pairs
- Chasing every short-term spread move
Tips and Variations
- Enhance with volatility-adjusted position sizing using 14-period ATR of spread
- Use rolling correlation or beta filter to adapt pairs list
- Add sector or market index overlay to reduce broad market moves
- Set up alerts when Z-score breaches thresholds
- Experiment with time of day or day of week filters
Tools You Can Use
- Charting: TradingView, Thinkorswim, QuantConnect, Python/matplotlib for custom dashboards
- Screeners/Alerts: Finviz (stocks), Custom Excel/Python screeners, TradingView alerts
- Journaling: Edgewonk, TraderSync, Notion
- Backtesting: QuantConnect, Backtrader, pandas/NumPy (Python), Tradestation
FAQs
Does it work on crypto? Yes, provided the assets (e.g., BTC/ETH or DeFi tokens) have sufficient liquidity and historical cointegration.
What timeframe is best? 1h or 4h for most asset pairs; lower for high liquidity, higher for less liquid or noisier markets.
What win rate to expect? Generally 55%–65% on well-selected pairs, but expectancy depends on edge and execution discipline.
Can I automate it? Yes, with most brokers or custom scripts; historical data testing is crucial before live deployment.
Glossary
- EMA: Exponential Moving Average, a weighted moving average emphasizing recent prices.
- ATR: Average True Range, measures volatility.
- R-multiple: A unit of risk/reward measuring returns relative to initial risk.
- Drawdown: Peak-to-trough loss in account or strategy equity over a period.
Disclaimer: Educational only. Not financial advice. Past performance ≠ future results.

