Welcome to Crypto Pairs Trading: Part 2 — Verifying Mean Reversion with ADF and Hurst Tests. Building on the insights from Part 1: Foundations of Moving Beyond Correlation, here we apply robust statistical methods like the Augmented Dickey-Fuller (ADF) test and the Hurst exponent to confirm whether your chosen spreads truly revert to a stable mean. In one line: We validate the statistical backbone of your pairs strategy by proving that identified relationships aren’t just stable, but reliably mean-reverting.
At this stage, you know that cointegration provides a stable, long-term equilibrium for a pair of assets. However, having a cointegrated pair isn’t enough by itself. To confidently trade mean reversion, you must confirm that the spread formed by these assets truly returns to its average level over time. This requires verifying that the spread is stationary, ensuring it doesn’t drift endlessly but instead consistently “snaps back” toward its mean.
A stationary series is one whose statistical characteristics—mean, variance, and autocorrelation structure—do not change as time progresses. If the spread is stationary, you can trust that when it deviates from its historical mean, it’s likely to revert. Without stationarity, the concept of a “mean” becomes meaningless, as the baseline could be moving, preventing any reliable prediction of a return.
To determine whether a time series is stationary, statisticians and quantitative traders commonly use the Augmented Dickey-Fuller (ADF) test. The ADF test checks for the presence of a “unit root,” a mathematical condition that signals non-stationarity.
While the ADF test answers, “Is this series stationary or not?”, the Hurst exponent provides deeper insight into the series’ underlying dynamics, telling you how the series behaves with respect to mean reversion or trending patterns.
To illustrate the above, imagine three example series, each with its own chart:
1. Stationary, Mean-Reverting (H < 0.5):
A series that oscillates around a stable mean, passing the ADF test with a low p-value and showing a Hurst exponent below 0.5. This is your ideal scenario—a spread that truly snaps back like a stretched rubber band.
2. Random Walk (H ≈ 0.5):
A series that fails the ADF test, indicating non-stationarity. It drifts aimlessly without a stable reference point. Even if it occasionally returns to some level, there’s no statistical reason to expect it to keep doing so.
3. Trending (H > 0.5):
A non-stationary series that also trends over time. The ADF test suggests it’s not anchored to a mean, and H > 0.5 means it persistently moves in one direction. Mean reversion signals here are unreliable, as the series lacks a natural pull back to a fixed average.
Just as cointegration ensures a long-term equilibrium, the ADF test and Hurst exponent confirm that this equilibrium is meaningful and exploitable. By validating stationarity with ADF, you establish that a stable mean exists, and by checking H, you ensure the series actively returns to that mean rather than drifting or trending away. This reduces guesswork and risk, making your pairs trading strategy more robust and reliable in the volatile and unpredictable world of crypto assets.
With stationarity and mean-reversion tendencies confirmed, you have a solid statistical footing. This sets the stage for integrating more advanced elements—like hedge ratios, transaction costs, and dynamic stop losses—into your strategy, further increasing your chance of success in the ever-changing cryptocurrency landscape.
Stabilizing with Logarithms:
Cryptocurrency prices can vary by orders of magnitude, and their volatility often grows with the price level. Taking the logarithm of prices helps level the playing field by stabilizing variance and making relationships more linear. This transformation:
For instance, if Asset A trades at $10,000 and Asset B at $0.10, their raw prices differ enormously. Logging them narrows this gap, helping ensure that statistical tests and regressions are not unduly skewed by extreme values. In crypto markets, where an asset’s price might range from a fraction of a cent to tens of thousands of dollars, logs often prove indispensable.
Enforcing Bounds with Hedge Ratio Limits:
The hedge ratio determines how many units of one asset you need per unit of the other to form your spread. If the hedge ratio is extremely large or small, it might signal a spurious relationship. Consider a scenario where you need 1000 units of Asset B for every unit of Asset A—this might indicate that the model is forcing a relationship that isn’t genuinely stable.
By imposing reasonable limits on the hedge ratio, you ensure the pair’s relationship is both statistically sound and practically viable. A sensible hedge ratio suggests a well-defined equilibrium and reduces the risk that your strategy hinges on unrealistic position sizes.
Identifying Trading Opportunities with Z-Scores
Even after confirming stationarity and mean reversion, you need a systematic way to determine when to enter or exit trades. This is where Z-scores come in. The Z-score measures how many standard deviations the current spread is from its rolling mean:
Visual Demonstrations and Comparisons:
Imagine three sets of charts:
1. Original vs. Log Prices:
The original prices may show wildly different scales and increasing variance. The logged prices appear more stable and linear, aiding regression-based estimation of the hedge ratio.
2. Unhedged vs. Hedged Spreads:
Without applying the hedge ratio, the spread may still drift or show no clear mean. Once you apply a sensible hedge ratio (e.g., from cointegration results), the hedged spread becomes more stable and visibly mean-reverting, making it suitable for trading decisions.
3. Z-Score Chart of the Hedged Spread:
A Z-score plot highlights when the spread deviates far from its mean. Horizontal lines at ±2 standard deviations serve as thresholds for potential trade entries. When the Z-score crosses these lines, it’s like a warning signal that conditions might be ripe for a mean-reversion trade.
Interpretation:
In volatile crypto environments, sudden jumps or crashes can distort raw price relationships. Using logs normalizes these effects, and careful control of the hedge ratio keeps your model grounded. Z-scores translate statistical insights into clear trading signals, helping you respond systematically rather than emotionally to market extremes.
By combining log transformations, sensible hedge ratio constraints, and Z-score-based thresholds, you refine your pairs trading approach into a balanced, data-driven strategy. This measured approach helps ensure that when you act, you do so with greater confidence, aligning your trades more closely with the statistical realities underpinning mean reversion.
With mean-reversion statistically confirmed, you’re equipped with the confidence that your spreads are anchored by genuine equilibrium dynamics. Coming up in Part 3 — Constructing Your Strategy with Logs, Hedge Ratios, and Z-Scores, we’ll translate these findings into actionable tools—selecting pairs, refining with logs, setting hedge ratios, and using Z-scores—so you can systematically identify and capitalize on trading signals in live markets.
Turn validated insights into actionable strategies. Contact Amberdata now to access premium crypto market data and analytics, and optimize your approach to pairs trading.
The information contained in this report is provided by Amberdata solely for educational and informational purposes. The contents of this report should not be construed as financial, investment, legal, tax, or any other form of professional advice. Amberdata does not provide personalized recommendations; any opinions or suggestions expressed in this report are for general informational purposes only.
Although Amberdata has made every effort to ensure the accuracy and completeness of the information provided, it cannot be held responsible for any errors, omissions, inaccuracies, or outdated information. Market conditions, regulations, and laws are subject to change, and readers should perform their own research and consult with a qualified professional before making any financial decisions or taking any actions based on the information provided in this report.
Past performance is not indicative of future results, and any investments discussed or mentioned in this report may not be suitable for all individuals or circumstances. Investing involves risks, and the value of investments can go up or down. Amberdata disclaims any liability for any loss or damage that may arise from the use of, or reliance on, the information contained in this report.
By accessing and using the information provided in this report, you agree to indemnify and hold harmless Amberdata, its affiliates, and their respective officers, directors, employees, and agents from and against any and all claims, losses, liabilities, damages, or expenses (including reasonable attorney’s fees) arising from your use of or reliance on the information contained herein.
Copyright © 2024 Amberdata. All rights reserved.