IDEAS home Printed from https://ideas.repec.org/a/gam/jforec/v6y2024i2p24-455d1412363.html
   My bibliography  Save this article

Machine Learning-Enhanced Pairs Trading

Author

Listed:
  • Eli Hadad

    (Centro de Ciências Sociais Aplicadas, Universidade Presbiteriana Mackenzie, Rua da Consolação 930, Sao Paulo 01302-907, SP, Brazil)

  • Sohail Hodarkar

    (Courant Institute of Mathematical Sciences, New York University, 251 Mercer Street, New York, NY 10012, USA)

  • Beakal Lemeneh

    (University of Rochester, 500 Joseph C. Wilson Blvd, Rochester, NY 14627, USA)

  • Dennis Shasha

    (Courant Institute of Mathematical Sciences, New York University, 251 Mercer Street, New York, NY 10012, USA)

Abstract

Forecasting returns in financial markets is notoriously challenging due to the resemblance of price changes to white noise. In this paper, we propose novel methods to address this challenge. Employing high-frequency Brazilian stock market data at one-minute granularity over a full year, we apply various statistical and machine learning algorithms, including Bidirectional Long Short-Term Memory (BiLSTM) with attention, Transformers, N-BEATS, N-HiTS, Convolutional Neural Networks (CNNs), and Temporal Convolutional Networks (TCNs) to predict changes in the price ratio of closely related stock pairs. Our findings indicate that a combination of reversion and machine learning-based forecasting methods yields the highest profit-per-trade. Additionally, by allowing the model to abstain from trading when the predicted magnitude of change is small, profits per trade can be further increased. Our proposed forecasting approach, utilizing a blend of methods, demonstrates superior accuracy compared to individual methods for high-frequency data.

Suggested Citation

  • Eli Hadad & Sohail Hodarkar & Beakal Lemeneh & Dennis Shasha, 2024. "Machine Learning-Enhanced Pairs Trading," Forecasting, MDPI, vol. 6(2), pages 1-22, June.
  • Handle: RePEc:gam:jforec:v:6:y:2024:i:2:p:24-455:d:1412363
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2571-9394/6/2/24/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2571-9394/6/2/24/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Gupta, Kartikay & Chatterjee, Niladri, 2020. "Selecting stock pairs for pairs trading while incorporating lead–lag relationship," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 551(C).
    2. Chen, Shiyi & Chng, Michael T. & Liu, Qingfu, 2021. "The implied arbitrage mechanism in financial markets," Journal of Econometrics, Elsevier, vol. 222(1), pages 468-483.
    3. Arumugam, Devika, 2023. "Algorithmic trading: Intraday profitability and trading behavior," Economic Modelling, Elsevier, vol. 128(C).
    4. Oreshkin, Boris N. & Dudek, Grzegorz & Pełka, Paweł & Turkina, Ekaterina, 2021. "N-BEATS neural network for mid-term electricity load forecasting," Applied Energy, Elsevier, vol. 293(C).
    5. Evan Gatev & William N. Goetzmann & K. Geert Rouwenhorst, 2006. "Pairs Trading: Performance of a Relative-Value Arbitrage Rule," The Review of Financial Studies, Society for Financial Studies, vol. 19(3), pages 797-827.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Weiguang Han & Boyi Zhang & Qianqian Xie & Min Peng & Yanzhao Lai & Jimin Huang, 2023. "Select and Trade: Towards Unified Pair Trading with Hierarchical Reinforcement Learning," Papers 2301.10724, arXiv.org, revised Feb 2023.
    2. Alessia Naccarato & Andrea Pierini & Giovanna Ferraro, 2021. "Markowitz portfolio optimization through pairs trading cointegrated strategy in long-term investment," Annals of Operations Research, Springer, vol. 299(1), pages 81-99, April.
    3. Khizar Qureshi & Tauhid Zaman, 2024. "Pairs Trading Using a Novel Graphical Matching Approach," Papers 2403.07998, arXiv.org.
    4. Bajgrowicz, Pierre & Scaillet, Olivier, 2012. "Technical trading revisited: False discoveries, persistence tests, and transaction costs," Journal of Financial Economics, Elsevier, vol. 106(3), pages 473-491.
    5. Agarwal, Vikas & Fung, William H. & Loon, Yee Cheng & Naik, Narayan Y., 2004. "Risk and return in convertible arbitrage: Evidence from the convertible bond market," CFR Working Papers 04-03, University of Cologne, Centre for Financial Research (CFR).
    6. Chen, Zhimin & Ibragimov, Rustam, 2019. "One country, two systems? The heavy-tailedness of Chinese A- and H- share markets," Emerging Markets Review, Elsevier, vol. 38(C), pages 115-141.
    7. Monika Zimmermann & Florian Ziel, 2024. "Efficient mid-term forecasting of hourly electricity load using generalized additive models," Papers 2405.17070, arXiv.org.
    8. Yang Gao & Stephen Satchell & Nandini Srivastava, 2020. "Styles through a convergent/divergent lens: the curious case of ESG," Journal of Asset Management, Palgrave Macmillan, vol. 21(1), pages 4-12, February.
    9. Qingshuo Song & Qing Zhang, 2013. "An Optimal Pairs-Trading Rule," Papers 1302.6120, arXiv.org.
    10. Bo Liu & Lo-Bin Chang & Hélyette Geman, 2017. "Intraday pairs trading strategies on high frequency data: the case of oil companies," Quantitative Finance, Taylor & Francis Journals, vol. 17(1), pages 87-100, January.
    11. Emmanouil Mavrakis & Christos Alexakis, 2018. "Statistical Arbitrage Strategies under Different Market Conditions: The Case of the Greek Banking Sector," Journal of Emerging Market Finance, Institute for Financial Management and Research, vol. 17(2), pages 159-185, August.
    12. Bruno Breyer Caldas & João Frois Caldeira & Guilherme Vale Moura, 2016. "Is Pairs Trading Performance Sensitive To The Methodologies?: A Comparison," Anais do XLII Encontro Nacional de Economia [Proceedings of the 42nd Brazilian Economics Meeting] 130, ANPEC - Associação Nacional dos Centros de Pós-Graduação em Economia [Brazilian Association of Graduate Programs in Economics].
    13. David S. Sun & Shih-Chuan Tsai & Wei Wang, 2013. "Behavioral Investment Strategy Matters: A Statistical Arbitrage Approach," Emerging Markets Finance and Trade, Taylor & Francis Journals, vol. 49(S3), pages 47-61, July.
    14. Agarwal, Vikas & Daniel, Naveen D. & Naik, Narayan Y., 2009. "Role of managerial incentives and discretion in hedge fund performance," CFR Working Papers 04-04, University of Cologne, Centre for Financial Research (CFR).
    15. Alexander Shulzhenko, 2023. "Copula-based deviation measure of cointegrated financial assets," Papers 2312.02081, arXiv.org.
    16. James Angel & Douglas McCabe, 2013. "Fairness in Financial Markets: The Case of High Frequency Trading," Journal of Business Ethics, Springer, vol. 112(4), pages 585-595, February.
    17. Oscar Bernal Diaz & Astrid Herinckx & Ariane Szafarz, 2014. "Which short-selling regulation is the least damaging to market efficiency? Evidence from Europe," Post-Print CEB, ULB -- Universite Libre de Bruxelles, vol. 37, pages 244-256, March.
    18. Sayat R. Baronyan & İ. İlkay Boduroğlu & Emrah Şener, 2010. "Investigation Of Stochastic Pairs Trading Strategies Under Different Volatility Regimes," Manchester School, University of Manchester, vol. 78(s1), pages 114-134, September.
    19. Bartram, Söhnke M. & Grinblatt, Mark, 2018. "Agnostic fundamental analysis works," Journal of Financial Economics, Elsevier, vol. 128(1), pages 125-147.
    20. Arjen Siegmann & Denitsa Stefanova, 2011. "Market Liquidity and Exposure of Hedge Funds," Tinbergen Institute Discussion Papers 11-150/2/DSF27, Tinbergen Institute.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jforec:v:6:y:2024:i:2:p:24-455:d:1412363. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.