Anti-Persistent Values of the Hurst Exponent Anticipate Mean Reversion in Pairs Trading: The Cryptocurrencies Market as a Case Study
<p>The green line shows the dependence of the median difference in <math display="inline"><semantics> <mrow> <mi>H</mi> <mi>M</mi> <mi>R</mi> </mrow> </semantics></math> between the control and treatment groups (<math display="inline"><semantics> <mrow> <mi>H</mi> <mi>M</mi> <msub> <mi>R</mi> <mrow> <mi>c</mi> <mi>o</mi> <mi>n</mi> <mi>t</mi> <mi>r</mi> <mi>o</mi> <mi>l</mi> </mrow> </msub> <mo>−</mo> <mi>H</mi> <mi>M</mi> <msub> <mi>R</mi> <mrow> <mi>t</mi> <mi>r</mi> <mi>e</mi> <mi>a</mi> <mi>t</mi> </mrow> </msub> </mrow> </semantics></math>) with <math display="inline"><semantics> <mrow> <mi>T</mi> <mi>W</mi> </mrow> </semantics></math>. The blue line shows how the number of trading signals triggered by <math display="inline"><semantics> <mrow> <mi>H</mi> <mo><</mo> <mn>0.5</mn> </mrow> </semantics></math> decreases as a function of <math display="inline"><semantics> <mrow> <mi>T</mi> <mi>W</mi> </mrow> </semantics></math>.</p> "> Figure 2
<p>Median <math display="inline"><semantics> <mrow> <mi>H</mi> <mi>M</mi> <mi>R</mi> </mrow> </semantics></math> for the treatment and control groups as a function of the co-movement (classified in five categories ordered from low level to high level of co-movement) according to several metrics: (<b>A</b>) correlation, (<b>B</b>) cointegration, (<b>C</b>) MI, and (<b>D</b>) DTW. In (<b>E</b>), the median difference in <math display="inline"><semantics> <mrow> <mi>H</mi> <mi>M</mi> <mi>R</mi> </mrow> </semantics></math> between the control and treatment groups as a function of the degree of co-movement for the four metrics are given. The co-movement metric is color-coded.</p> "> Figure 3
<p>Cumulative profit for the five strategies, plus the random version used in this work (see <a href="#sec2-mathematics-12-02911" class="html-sec">Section 2</a> for details).</p> "> Figure 4
<p>Boxplots comparing the duration of trades, where <math display="inline"><semantics> <mrow> <mi>M</mi> <mi>R</mi> </mrow> </semantics></math> actually happened, for positions opened when <math display="inline"><semantics> <mrow> <mi>H</mi> <mo><</mo> <mn>0.5</mn> </mrow> </semantics></math> and for positions opened when <math display="inline"><semantics> <mrow> <mi>H</mi> <mo>≥</mo> <mn>0.5</mn> </mrow> </semantics></math>.</p> "> Figure 5
<p>Comparison of the median <math display="inline"><semantics> <mrow> <mi>M</mi> <mi>S</mi> <mi>O</mi> <mi>T</mi> </mrow> </semantics></math> as a function of the portfolio size between the strategy including <math display="inline"><semantics> <mrow> <mi>H</mi> <mo><</mo> <mn>0.5</mn> </mrow> </semantics></math> as a trading signal and the regular case not considering <math display="inline"><semantics> <mrow> <mi>H</mi> <mo><</mo> <mn>0.5</mn> </mrow> </semantics></math>. Each panel contains the results for each co-movement metric: (<b>A</b>) Hurst, (<b>B</b>) correlation, (<b>C</b>) MI, (<b>D</b>) DTW, and (<b>E</b>) cointegration. (<b>F</b>) represents the median difference in <math display="inline"><semantics> <mrow> <mi>M</mi> <mi>S</mi> <mi>O</mi> <mi>T</mi> </mrow> </semantics></math> between the regular version of the strategy and the one considering <math display="inline"><semantics> <mrow> <mi>H</mi> <mo><</mo> <mn>0.5</mn> </mrow> </semantics></math> for the five co-movement metrics. The co-movement metric is color-coded.</p> ">
Abstract
:1. Introduction
2. Data and Methods
2.1. Data
2.2. The Hurst Exponent as a Mean Reversion Indicator
2.3. Natural Experiment
- Belonged to the same pair.
- The timestamp was within a 3 to 30-day interval around the treatment timestamp. By matching observations that are not far away in time, we minimized the variability of the environmental factors surrounding the market, along with the cryptocurrencies’ properties (such as the age of the coin). In addition, we did not match observations that were less than 3 days apart because the response variable () would have been too closely related.
- Had the same level of volatility at that timestamp. In particular, we averaged the 30-day volatility of the cryptocurrencies that formed the pair, and classified each observation into low, medium, or high volatility. We considered avg. volatility as low volatility and avg. volatility as high volatility. Otherwise, we classified the observation as medium volatility.
- Additionally, when performing the experiments where we also controlled for the degree of co-movement, we only matched pairs classified into the same co-movement category (these categories are reported in Table A2) at the timestamp when the trade was opened.
2.4. Pairs Trading Strategy
- if and , sell the pair.
- if and , buy the pair.
- The spread, s, of the pair reverted to its mean value.
- The spread, s, of the pair deviated more than two from its mean value m.
- The duration of the trade exceeded 3 days (72 h), reaching its expiration date.
- Correlation. Correlation is a statistical measure that describes the extent to which two variables are linearly related. It quantifies the strength and direction of the relationship between the variables. In that sense, the higher the correlation coefficient is, the greater the variables move in sync. We used the Pearson correlation coefficient, which is the most commonly used measure of correlation.
- Cointegration. The cointegration approach was introduced by Engle, and Granger [43] and it states that two variables X and Y are cointegrated if there exists such that the linear combination is a stationary process. We used the ordinary least squares (OLS) method to estimate the regression parameters. Then, we used the Augmented Dickey–Fuller test to verify whether the residual was stationary or not, and therefore whether the stocks were cointegrated. Thus, we selected the pairs with the lower p-values in the ADF test, since the residuals of these pairs are stationary with more probability. In contrast to correlation, which considers movements in returns and therefore is a short-term relationship, cointegration specifies co-movement of prices and it is a long-term relationship.
- Dynamic time warping (DTW). DTW is an algorithm for measuring similarity between two temporal sequences, which may vary in speed. It works by identifying an optimal match between the sequences, stretching or compressing different sections of the time series. Then, the distance measure quantifies how similar the sequences are, taking into account the alignment cost computed as the sum of absolute differences for each matched pair of indices. We used a Python implementation of FastDTW [44], which is an approximate DTW algorithm that provides optimal alignments with less time and memory complexity than DTW. The best pair will be the pair whose distance between its returns is the lowest possible, since this means that the coins move in sync and there is a high degree of co-movement between them.
- Mutual Information (MI). MI is a measure of the mutual dependence between two variables. It quantifies the amount of information obtained about one variable through the other variable. In other words, it measures how much knowing one variable reduces uncertainty about the other. MI is equal to zero if and only if the two random variables are independent, and higher values mean higher dependency. For its calculation, we used the mutual_info_regression function of the Python library scikit-learn, which relies on nonparametric methods based on entropy estimation from k-nearest neighbors distances.
- Hurst Exponent. Defined in Section 2.2.
3. Results
4. Discussion
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A. Tables
Name | Symbol | First Date |
---|---|---|
Bitcoin | BTC | 1 January 2019 |
Ethereum | ETH | 1 January 2019 |
Binance Coin | BNB | 1 January 2019 |
Solana | SOL | 11 August 2020 |
Ripple | XRP | 1 January 2019 |
Dogecoin | DOGE | 5 July 2019 |
Cardano | ADA | 1 January 2019 |
Shiba Inu | SHIB | 10 May 2021 |
Avalanche | AVAX | 22 September 2020 |
Polkadot | DOT | 18 August 2020 |
Chainlink | LINK | 16 January 2019 |
Tron | TRX | 1 January 2019 |
Bitcoin Cash | BCH | 28 November 2019 |
Near | NEAR | 14 October 2020 |
Polygon | MATIC | 26 April 2019 |
Uniswap | UNI | 17 September 2020 |
Litecoin | LTC | 1 January 2019 |
Internet Computer | ICP | 11 May 2021 |
Ethereum Classic | ETC | 1 January 2019 |
Hedera | HBAR | 29 September 2019 |
Category | Metric | |||
---|---|---|---|---|
Correlation | Cointegration | MI | DTW | |
1 | ||||
2 | ||||
3 | ||||
4 | ||||
5 |
TW | Paired t-Test | Wilcoxon Signed-Rank Test | ||
---|---|---|---|---|
t | -Value | W | -Value | |
1 | 0.0 | 61,417,930,239.5 | 0.0 | |
3 | 0.0 | 35,224,593,461.5 | 0.0 | |
5 | 0.0 | 24,646,696,180.5 | 0.0 | |
7 | 0.0 | 18,787,930,723.5 | 0.0 | |
10 | 0.0 | 12,416,266,332.5 | 0.0 | |
14 | 8,578,829,181.0 | 0.0 | ||
21 | 5,062,243,957.0 | |||
28 | 3,450,547,673.5 |
Metric | Paired t-Test | Wilcoxon Signed-Rank Test | ||
---|---|---|---|---|
t | -Value | W | -Value | |
Correlation | 0.0 | 194,138,128,819.0 | 0.0 | |
Cointegration | 0.0 | 189,923,159,659.0 | 0.0 | |
MI | 0.0 | 180,748,717,882.5 | 0.0 | |
DTW | 0.0 | 198,569,581,457.5 | 0.0 |
Strategy | Investment ($) | Profit ($) | Profit (%) |
---|---|---|---|
ine Cointegration | |||
MI | |||
H | |||
Correlation | |||
DTW |
References
- Vidyamurthy, G. Pairs Trading: Quantitative Methods and Analysis; John Wiley & Sons: Hoboken, NJ, USA, 2004; Volume 217. [Google Scholar]
- Elliott, R.J.; Van Der Hoek, J.; Malcolm, W.P. Pairs trading. Quant. Financ. 2005, 5, 271–276. [Google Scholar] [CrossRef]
- Gatev, E.; Goetzmann, W.N.; Rouwenhorst, K.G. Pairs trading: Performance of a relative-value arbitrage rule. Rev. Financ. Stud. 2006, 19, 797–827. [Google Scholar] [CrossRef]
- Broussard, J.P.; Vaihekoski, M. Profitability of pairs trading strategy in an illiquid market with multiple share classes. J. Int. Financ. Mark. Inst. Money 2012, 22, 1188–1201. [Google Scholar] [CrossRef]
- Do, B.; Faff, R. Does simple pairs trading still work? Financ. Anal. J. 2010, 66, 83–95. [Google Scholar] [CrossRef]
- Do, B.; Faff, R. Are pairs trading profits robust to trading costs? J. Financ. Res. 2012, 35, 261–287. [Google Scholar] [CrossRef]
- Jacobs, H.; Weber, M. On the determinants of pairs trading profitability. J. Financ. Mark. 2015, 23, 75–97. [Google Scholar] [CrossRef]
- Huck, N.; Afawubo, K. Pairs trading and selection methods: Is cointegration superior? Appl. Econ. 2015, 47, 599–613. [Google Scholar] [CrossRef]
- Schmidt, A.D. Pairs trading: A cointegration approach. Trends Plant Sci. 2009, 24, P152–P164. [Google Scholar]
- Liew, R.Q.; Wu, Y. Pairs trading: A copula approach. J. Deriv. Hedge Funds 2013, 19, 12–30. [Google Scholar] [CrossRef]
- Xie, W.; Liew, R.Q.; Wu, Y.; Zou, X. Pairs Trading with Copulas. J. Trading 2015, 11, 41–52. [Google Scholar] [CrossRef]
- Ramos-Requena, J.P.; Trinidad-Segovia, J.; Sánchez-Granero, M. Introducing Hurst exponent in pair trading. Phys. A Stat. Mech. Its Appl. 2017, 488, 39–45. [Google Scholar] [CrossRef]
- Bui, Q.; Ślepaczuk, R. Applying Hurst Exponent in pair trading strategies on Nasdaq 100 index. Phys. A Stat. Mech. Its Appl. 2022, 592, 126784. [Google Scholar] [CrossRef]
- Rad, H.; Low, R.K.Y.; Faff, R. The profitability of pairs trading strategies: Distance, cointegration and copula methods. Quant. Financ. 2016, 16, 1541–1558. [Google Scholar] [CrossRef]
- Ramos-Requena, J.P.; Trinidad-Segovia, J.E.; Sánchez-Granero, M.Á. Some notes on the formation of a pair in pairs trading. Mathematics 2020, 8, 348. [Google Scholar] [CrossRef]
- Ko, P.C.; Lin, P.C.; Do, H.T.; Kuo, Y.H.; Huang, Y.F.; Chen, W.H. Pairs trading strategies in cryptocurrency markets: A comparative study between statistical methods and evolutionary algorithms. Eng. Proc. 2023, 38, 74. [Google Scholar] [CrossRef]
- Krauss, C. Statistical arbitrage pairs trading strategies: Review and outlook. J. Econ. Surv. 2017, 31, 513–545. [Google Scholar] [CrossRef]
- Huck, N. Pairs selection and outranking: An application to the S&P 100 index. Eur. J. Oper. Res. 2009, 196, 819–825. [Google Scholar]
- Huck, N. Pairs trading and outranking: The multi-step-ahead forecasting case. Eur. J. Oper. Res. 2010, 207, 1702–1716. [Google Scholar] [CrossRef]
- Hurst, H.E. Long-term storage capacity of reservoirs. Trans. Am. Soc. Civ. Eng. 1951, 116, 770–799. [Google Scholar] [CrossRef]
- Bowen, D.; Hutchinson, M.C.; O’Sullivan, N. High frequency equity pairs trading: Transaction costs, speed of execution and patterns in returns. J. Trading 2010, 5, 31–38. [Google Scholar] [CrossRef]
- Farmer, J.D.; Sidorowich, J.J. Predicting chaotic time series. Phys. Rev. Lett. 1987, 59, 845. [Google Scholar] [CrossRef] [PubMed]
- Sprott, J.C. Chaos and Time-Series Analysis; Oxford University Press: Oxford, UK, 2003. [Google Scholar]
- Greene, M.T.; Fielitz, B.D. Long-term dependence in common stock returns. J. Financ. Econ. 1977, 4, 339–349. [Google Scholar] [CrossRef]
- Lillo, F.; Farmer, J.D. The long memory of the efficient market. Stud. Nonlinear Dyn. Econom. 2004, 8. [Google Scholar] [CrossRef]
- Barkoulas, J.T.; Baum, C.F. Long-term dependence in stock returns. Econ. Lett. 1996, 53, 253–259. [Google Scholar] [CrossRef]
- Kasman, S.; Turgutlu, E.; Ayhan, A.D. Long memory in stock returns: Evidence from the major emerging Central European stock markets. Appl. Econ. Lett. 2009, 16, 1763–1768. [Google Scholar] [CrossRef]
- Fama, E.F. Efficient capital markets. J. Financ. 1970, 25, 383–417. [Google Scholar] [CrossRef]
- Fama, E.F. Efficient capital markets: II. J. Financ. 1991, 46, 1575–1617. [Google Scholar] [CrossRef]
- Kroha, P.; Skoula, M. Hurst Exponent and Trading Signals Derived from Market Time Series. In Proceedings of the 20th International Conference on Enterprise Information Systems (ICEIS 2018), Madeira, Portugal, 21–24 March 2018; pp. 371–378. [Google Scholar]
- Pérez-Sienes, L.; Grande, M.; Losada, J.C.; Borondo, J. The hurst exponent as an indicator to anticipate agricultural commodity prices. Entropy 2023, 25, 579. [Google Scholar] [CrossRef]
- Rutter, M. Proceeding from observed correlation to causal inference: The use of natural experiments. Perspect. Psychol. Sci. 2007, 2, 377–395. [Google Scholar] [CrossRef]
- De Prado, M.L. Advances in Financial Machine Learning; John Wiley & Sons: Hoboken, NJ, USA, 2018. [Google Scholar]
- Peng, C.K.; Buldyrev, S.V.; Havlin, S.; Simons, M.; Stanley, H.E.; Goldberger, A.L. Mosaic organization of DNA nucleotides. Phys. Rev. E 1994, 49, 1685. [Google Scholar] [CrossRef]
- Hu, K.; Ivanov, P.C.; Chen, Z.; Carpena, P.; Stanley, H.E. Effect of trends on detrended fluctuation analysis. Phys. Rev. E 2001, 64, 011114. [Google Scholar] [CrossRef]
- Simonsen, I.; Hansen, A.; Nes, O.M. Determination of the Hurst exponent by use of wavelet transforms. Phys. Rev. E 1998, 58, 2779. [Google Scholar] [CrossRef]
- Barabási, A.L.; Vicsek, T. Multifractality of self-affine fractals. Phys. Rev. A 1991, 44, 2730. [Google Scholar] [CrossRef] [PubMed]
- Di Matteo, T.; Aste, T.; Dacorogna, M.M. Long-term memories of developed and emerging markets: Using the scaling analysis to characterize their stage of development. J. Bank. Financ. 2005, 29, 827–851. [Google Scholar] [CrossRef]
- Leatherdale, S.T. Natural experiment methodology for research: A review of how different methods can support real-world research. Int. J. Soc. Res. Methodol. 2019, 22, 19–35. [Google Scholar] [CrossRef]
- DiNardo, J. Natural experiments and quasi-natural experiments. In Microeconometrics; Springer: Berlin/Heidelberg, Germany, 2010; pp. 139–153. [Google Scholar]
- Rosenzweig, M.R.; Wolpin, K.I. Natural “natural experiments” in economics. J. Econ. Lit. 2000, 38, 827–874. [Google Scholar] [CrossRef]
- Butler, A.W.; Cornaggia, J. Does access to external finance improve productivity? Evidence from a natural experiment. J. Financ. Econ. 2011, 99, 184–203. [Google Scholar] [CrossRef]
- Engle, R.F.; Granger, C.W. Co-integration and error correction: Representation, estimation, and testing. Econom. J. Econom. Soc. 1987, 55, 251–276. [Google Scholar] [CrossRef]
- Salvador, S.; Chan, P. Toward accurate dynamic time warping in linear time and space. Intell. Data Anal. 2007, 11, 561–580. [Google Scholar] [CrossRef]
- Elton, E.J.; Gruber, M.J. Risk reduction and portfolio size: An analytical solution. J. Bus. 1977, 50, 415–437. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Grande, M.; Borondo, F.; Losada, J.C.; Borondo, J. Anti-Persistent Values of the Hurst Exponent Anticipate Mean Reversion in Pairs Trading: The Cryptocurrencies Market as a Case Study. Mathematics 2024, 12, 2911. https://doi.org/10.3390/math12182911
Grande M, Borondo F, Losada JC, Borondo J. Anti-Persistent Values of the Hurst Exponent Anticipate Mean Reversion in Pairs Trading: The Cryptocurrencies Market as a Case Study. Mathematics. 2024; 12(18):2911. https://doi.org/10.3390/math12182911
Chicago/Turabian StyleGrande, Mar, Florentino Borondo, Juan Carlos Losada, and Javier Borondo. 2024. "Anti-Persistent Values of the Hurst Exponent Anticipate Mean Reversion in Pairs Trading: The Cryptocurrencies Market as a Case Study" Mathematics 12, no. 18: 2911. https://doi.org/10.3390/math12182911