IDEAS home Printed from https://ideas.repec.org/a/hin/complx/3582516.html
   My bibliography  Save this article

Optimizing the Pairs-Trading Strategy Using Deep Reinforcement Learning with Trading and Stop-Loss Boundaries

Author

Listed:
  • Taewook Kim
  • Ha Young Kim

Abstract

Many researchers have tried to optimize pairs trading as the numbers of opportunities for arbitrage profit have gradually decreased. Pairs trading is a market-neutral strategy; it profits if the given condition is satisfied within a given trading window, and if not, there is a risk of loss. In this study, we propose an optimized pairs-trading strategy using deep reinforcement learning—particularly with the deep Q-network—utilizing various trading and stop-loss boundaries. More specifically, if spreads hit trading thresholds and reverse to the mean, the agent receives a positive reward. However, if spreads hit stop-loss thresholds or fail to reverse to the mean after hitting the trading thresholds, the agent receives a negative reward. The agent is trained to select the optimum level of discretized trading and stop-loss boundaries given a spread to maximize the expected sum of discounted future profits. Pairs are selected from stocks on the S&P 500 Index using a cointegration test. We compared our proposed method with traditional pairs-trading strategies which use constant trading and stop-loss boundaries. We find that our proposed model is trained well and outperforms traditional pairs-trading strategies.

Suggested Citation

  • Taewook Kim & Ha Young Kim, 2019. "Optimizing the Pairs-Trading Strategy Using Deep Reinforcement Learning with Trading and Stop-Loss Boundaries," Complexity, Hindawi, vol. 2019, pages 1-20, November.
  • Handle: RePEc:hin:complx:3582516
    DOI: 10.1155/2019/3582516
    as

    Download full text from publisher

    File URL: http://downloads.hindawi.com/journals/8503/2019/3582516.pdf
    Download Restriction: no

    File URL: http://downloads.hindawi.com/journals/8503/2019/3582516.xml
    Download Restriction: no

    File URL: https://libkey.io/10.1155/2019/3582516?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Neely, Christopher & Weller, Paul & Dittmar, Rob, 1997. "Is Technical Analysis in the Foreign Exchange Market Profitable? A Genetic Programming Approach," Journal of Financial and Quantitative Analysis, Cambridge University Press, vol. 32(4), pages 405-426, December.
    2. Johansen, Soren, 1988. "Statistical analysis of cointegration vectors," Journal of Economic Dynamics and Control, Elsevier, vol. 12(2-3), pages 231-254.
    3. Danni Chen & Jing Cui & Yan Gao & Leilei Wu, 2017. "Pairs trading in Chinese commodity futures markets: an adaptive cointegration approach," Accounting and Finance, Accounting and Finance Association of Australia and New Zealand, vol. 57(5), pages 1237-1264, December.
    4. Evan Gatev & William N. Goetzmann & K. Geert Rouwenhorst, 2006. "Pairs Trading: Performance of a Relative-Value Arbitrage Rule," Review of Financial Studies, Society for Financial Studies, vol. 19(3), pages 797-827.
    5. Hossein Rad & Rand Kwong Yew Low & Robert Faff, 2016. "The profitability of pairs trading strategies: distance, cointegration and copula methods," Quantitative Finance, Taylor & Francis Journals, vol. 16(10), pages 1541-1558, October.
    6. Tourin, Agnès & Yan, Raphael, 2013. "Dynamic pairs trading using the stochastic control approach," Journal of Economic Dynamics and Control, Elsevier, vol. 37(10), pages 1972-1981.
    7. Zhengqin Zeng & Chi-Guhn Lee, 2014. "Pairs trading: optimal thresholds and profitability," Quantitative Finance, Taylor & Francis Journals, vol. 14(11), pages 1881-1893, November.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    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. Han, Chulwoo & He, Zhaodong & Toh, Alenson Jun Wei, 2023. "Pairs trading via unsupervised learning," European Journal of Operational Research, Elsevier, vol. 307(2), pages 929-947.

    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. Stübinger, Johannes & Endres, Sylvia, 2017. "Pairs trading with a mean-reverting jump-diffusion model on high-frequency data," FAU Discussion Papers in Economics 10/2017, Friedrich-Alexander University Erlangen-Nuremberg, Institute for Economics.
    2. Endres, Sylvia & Stübinger, Johannes, 2018. "A flexible regime switching model with pairs trading application to the S&P 500 high-frequency stock returns," FAU Discussion Papers in Economics 07/2018, Friedrich-Alexander University Erlangen-Nuremberg, Institute for Economics.
    3. Andreas Mikkelsen, 2018. "Pairs trading: the case of Norwegian seafood companies," Applied Economics, Taylor & Francis Journals, vol. 50(3), pages 303-318, January.
    4. Zouheir Mighri & Faysal Mansouri, 2016. "Asymmetric price transmission within the Argentinean stock market: an asymmetric threshold cointegration approach," Empirical Economics, Springer, vol. 51(3), pages 1115-1149, November.
    5. Danni Chen & Jing Cui & Yan Gao & Leilei Wu, 2017. "Pairs trading in Chinese commodity futures markets: an adaptive cointegration approach," Accounting and Finance, Accounting and Finance Association of Australia and New Zealand, vol. 57(5), pages 1237-1264, December.
    6. Matthew Clegg & Christopher Krauss, 2018. "Pairs trading with partial cointegration," Quantitative Finance, Taylor & Francis Journals, vol. 18(1), pages 121-138, January.
    7. Sühan Altay & Katia Colaneri & Zehra Eksi, 2018. "Pairs Trading Under Drift Uncertainty And Risk Penalization," International Journal of Theoretical and Applied Finance (IJTAF), World Scientific Publishing Co. Pte. Ltd., vol. 21(07), pages 1-24, November.
    8. Suhan Altay & Katia Colaneri & Zehra Eksi, 2017. "Pairs Trading under Drift Uncertainty and Risk Penalization," Papers 1704.06697, arXiv.org, revised Sep 2018.
    9. Johannes Stübinger & Sylvia Endres, 2018. "Pairs trading with a mean-reverting jump–diffusion model on high-frequency data," Quantitative Finance, Taylor & Francis Journals, vol. 18(10), pages 1735-1751, October.
    10. 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.
    11. 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.
    12. 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.
    13. 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].
    14. Hossein Rad & Rand Kwong Yew Low & Robert Faff, 2016. "The profitability of pairs trading strategies: distance, cointegration and copula methods," Quantitative Finance, Taylor & Francis Journals, vol. 16(10), pages 1541-1558, October.
    15. Psaradellis, Ioannis & Laws, Jason & Pantelous, Athanasios A. & Sermpinis, Georgios, 2023. "Technical analysis, spread trading, and data snooping control," International Journal of Forecasting, Elsevier, vol. 39(1), pages 178-191.
    16. Knoll, Julian & Stübinger, Johannes & Grottke, Michael, 2017. "Exploiting social media with higher-order Factorization Machines: Statistical arbitrage on high-frequency data of the S&P 500," FAU Discussion Papers in Economics 13/2017, Friedrich-Alexander University Erlangen-Nuremberg, Institute for Economics.
    17. Fenghui Yu & Wai-Ki Ching & Chufang Wu & Jia-Wen Gu, 2023. "Optimal Pairs Trading Strategies: A Stochastic Mean–Variance Approach," Journal of Optimization Theory and Applications, Springer, vol. 196(1), pages 36-55, January.
    18. Flori, Andrea & Regoli, Daniele, 2021. "Revealing Pairs-trading opportunities with long short-term memory networks," European Journal of Operational Research, Elsevier, vol. 295(2), pages 772-791.
    19. Haipeng Xing, 2019. "A singular stochastic control approach for optimal pairs trading with proportional transaction costs," Papers 1911.10450, arXiv.org.
    20. Ahmet Göncü & Erdinc Akyildirim, 2016. "A stochastic model for commodity pairs trading," Quantitative Finance, Taylor & Francis Journals, vol. 16(12), pages 1843-1857, December.

    More about this item

    Statistics

    Access and download statistics

    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:hin:complx:3582516. 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: Mohamed Abdelhakeem (email available below). General contact details of provider: https://www.hindawi.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.