IDEAS home Printed from https://ideas.repec.org/a/eee/ejores/v270y2018i2p654-669.html
   My bibliography  Save this article

Deep learning with long short-term memory networks for financial market predictions

Author

Listed:
  • Fischer, Thomas
  • Krauss, Christopher

Abstract

Long short-term memory (LSTM) networks are a state-of-the-art technique for sequence learning. They are less commonly applied to financial time series predictions, yet inherently suitable for this domain. We deploy LSTM networks for predicting out-of-sample directional movements for the constituent stocks of the S&P 500 from 1992 until 2015. With daily returns of 0.46 percent and a Sharpe ratio of 5.8 prior to transaction costs, we find LSTM networks to outperform memory-free classification methods, i.e., a random forest (RAF), a deep neural net (DNN), and a logistic regression classifier (LOG). The outperformance relative to the general market is very clear from 1992 to 2009, but as of 2010, excess returns seem to have been arbitraged away with LSTM profitability fluctuating around zero after transaction costs. We further unveil sources of profitability, thereby shedding light into the black box of artificial neural networks. Specifically, we find one common pattern among the stocks selected for trading – they exhibit high volatility and a short-term reversal return profile. Leveraging these findings, we are able to formalize a rules-based short-term reversal strategy that yields 0.23 percent prior to transaction costs. Further regression analysis unveils low exposure of the LSTM returns to common sources of systematic risk – also compared to the three benchmark models.

Suggested Citation

  • Fischer, Thomas & Krauss, Christopher, 2018. "Deep learning with long short-term memory networks for financial market predictions," European Journal of Operational Research, Elsevier, vol. 270(2), pages 654-669.
  • Handle: RePEc:eee:ejores:v:270:y:2018:i:2:p:654-669
    DOI: 10.1016/j.ejor.2017.11.054
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0377221717310652
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.ejor.2017.11.054?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
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    References listed on IDEAS

    as
    1. Krauss, Christopher & Do, Xuan Anh & Huck, Nicolas, 2017. "Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500," European Journal of Operational Research, Elsevier, vol. 259(2), pages 689-702.
    2. Jacobs, Heiko, 2015. "What explains the dynamics of 100 anomalies?," Journal of Banking & Finance, Elsevier, vol. 57(C), pages 65-85.
    3. Granger, Clive W J, 1993. "Strategies for Modelling Nonlinear Time-Series Relationships," The Economic Record, The Economic Society of Australia, vol. 69(206), pages 233-238, September.
    4. Sermpinis, Georgios & Theofilatos, Konstantinos & Karathanasopoulos, Andreas & Georgopoulos, Efstratios F. & Dunis, Christian, 2013. "Forecasting foreign exchange rates with adaptive neural networks using radial-basis functions and Particle Swarm Optimization," European Journal of Operational Research, Elsevier, vol. 225(3), pages 528-540.
    5. Bali, Turan G. & Cakici, Nusret & Whitelaw, Robert F., 2011. "Maxing out: Stocks as lotteries and the cross-section of expected returns," Journal of Financial Economics, Elsevier, vol. 99(2), pages 427-446, February.
    6. Diebold, Francis X & Mariano, Roberto S, 2002. "Comparing Predictive Accuracy," Journal of Business & Economic Statistics, American Statistical Association, vol. 20(1), pages 134-144, January.
    7. LeBaron, Blake, 1992. "Some Relations between Volatility and Serial Correlations in Stock Market Returns," The Journal of Business, University of Chicago Press, vol. 65(2), pages 199-219, April.
    8. Huck, Nicolas, 2009. "Pairs selection and outranking: An application to the S&P 100 index," European Journal of Operational Research, Elsevier, vol. 196(2), pages 819-825, July.
    9. Jacobs, Heiko & Weber, Martin, 2015. "On the determinants of pairs trading profitability," Journal of Financial Markets, Elsevier, vol. 23(C), pages 75-97.
    10. Carhart, Mark M, 1997. "On Persistence in Mutual Fund Performance," Journal of Finance, American Finance Association, vol. 52(1), pages 57-82, March.
    11. Jegadeesh, Narasimhan, 1990. "Evidence of Predictable Behavior of Security Returns," Journal of Finance, American Finance Association, vol. 45(3), pages 881-898, July.
    12. Lo, Andrew W & MacKinlay, A Craig, 1990. "When Are Contrarian Profits Due to Stock Market Overreaction?," The Review of Financial Studies, Society for Financial Studies, vol. 3(2), pages 175-205.
    13. 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.
    14. Frazzini, Andrea & Pedersen, Lasse Heje, 2014. "Betting against beta," Journal of Financial Economics, Elsevier, vol. 111(1), pages 1-25.
    15. Christopher Krauss & Anh Do & Nicolas Huck, 2017. "Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500," Post-Print hal-01768895, HAL.
    16. Brian Boyer & Todd Mitton & Keith Vorkink, 2010. "Expected Idiosyncratic Skewness," Review of Financial Studies, Society for Financial Studies, vol. 23(1), pages 169-202, January.
    17. Jeremiah Green & John R. M. Hand & X. Frank Zhang, 2017. "The Characteristics that Provide Independent Information about Average U.S. Monthly Stock Returns," Review of Financial Studies, Society for Financial Studies, vol. 30(12), pages 4389-4436.
    18. Matthew Clegg & Christopher Krauss, 2018. "Pairs trading with partial cointegration," Quantitative Finance, Taylor & Francis Journals, vol. 18(1), pages 121-138, January.
    19. Bruce N. Lehmann, 1990. "Fads, Martingales, and Market Efficiency," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 105(1), pages 1-28.
    20. Lee, Darren D. & Chan, Howard & Faff, Robert W. & Kalev, Petko S., 2003. "Short-term contrarian investing--is it profitable? ... Yes and No," Journal of Multinational Financial Management, Elsevier, vol. 13(4-5), pages 385-404, December.
    21. Huck, Nicolas, 2010. "Pairs trading and outranking: The multi-step-ahead forecasting case," European Journal of Operational Research, Elsevier, vol. 207(3), pages 1702-1716, December.
    22. Fama, Eugene F, 1970. "Efficient Capital Markets: A Review of Theory and Empirical Work," Journal of Finance, American Finance Association, vol. 25(2), pages 383-417, May.
    23. Alok Kumar, 2009. "Who Gambles in the Stock Market?," Journal of Finance, American Finance Association, vol. 64(4), pages 1889-1933, August.
    24. Marco Avellaneda & Jeong-Hyun Lee, 2010. "Statistical arbitrage in the US equities market," Quantitative Finance, Taylor & Francis Journals, vol. 10(7), pages 761-782.
    25. Timofei Bogomolov, 2013. "Pairs trading based on statistical variability of the spread process," Quantitative Finance, Taylor & Francis Journals, vol. 13(9), pages 1411-1430, September.
    26. Jegadeesh, Narasimhan & Titman, Sheridan, 1995. "Overreaction, Delayed Reaction, and Contrarian Profits," Review of Financial Studies, Society for Financial Studies, vol. 8(4), pages 973-993.
    27. Fama, Eugene F & French, Kenneth R, 1996. "Multifactor Explanations of Asset Pricing Anomalies," Journal of Finance, American Finance Association, vol. 51(1), pages 55-84, March.
    28. Conrad, Jennifer & Kaul, Gautam, 1989. "Mean Reversion in Short-Horizon Expected Returns," Review of Financial Studies, Society for Financial Studies, vol. 2(2), pages 225-240.
    29. Jegadeesh, Narasimhan & Titman, Sheridan, 1993. "Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency," Journal of Finance, American Finance Association, vol. 48(1), pages 65-91, March.
    30. 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.
    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. Fischer, Thomas & Krauss, Christopher, 2017. "Deep learning with long short-term memory networks for financial market predictions," FAU Discussion Papers in Economics 11/2017, Friedrich-Alexander University Erlangen-Nuremberg, Institute for Economics.
    2. 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.
    3. Adam Zaremba & Jacob Koby Shemer, 2018. "Price-Based Investment Strategies," Springer Books, Springer, number 978-3-319-91530-2, November.
    4. Matthew Clegg & Christopher Krauss, 2018. "Pairs trading with partial cointegration," Quantitative Finance, Taylor & Francis Journals, vol. 18(1), pages 121-138, January.
    5. 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.
    6. Krauss, Christopher, 2015. "Statistical arbitrage pairs trading strategies: Review and outlook," FAU Discussion Papers in Economics 09/2015, Friedrich-Alexander University Erlangen-Nuremberg, Institute for Economics.
    7. Krauss, Christopher & Do, Xuan Anh & Huck, Nicolas, 2017. "Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500," European Journal of Operational Research, Elsevier, vol. 259(2), pages 689-702.
    8. Jacobs, Heiko, 2015. "What explains the dynamics of 100 anomalies?," Journal of Banking & Finance, Elsevier, vol. 57(C), pages 65-85.
    9. 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.
    10. Rubesam, Alexandre, 2022. "Machine learning portfolios with equal risk contributions: Evidence from the Brazilian market," Emerging Markets Review, Elsevier, vol. 51(PB).
    11. Cakici, Nusret & Zaremba, Adam, 2022. "Salience theory and the cross-section of stock returns: International and further evidence," Journal of Financial Economics, Elsevier, vol. 146(2), pages 689-725.
    12. Xiang, Yun & He, Jiaxuan, 2022. "Pairs trading and asset pricing," Pacific-Basin Finance Journal, Elsevier, vol. 72(C).
    13. Cakici, Nusret & Zaremba, Adam, 2023. "Recency bias and the cross-section of international stock returns," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 84(C).
    14. 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.
    15. Huck, Nicolas, 2019. "Large data sets and machine learning: Applications to statistical arbitrage," European Journal of Operational Research, Elsevier, vol. 278(1), pages 330-342.
    16. Thomas Günter Fischer & Christopher Krauss & Alexander Deinert, 2019. "Statistical Arbitrage in Cryptocurrency Markets," JRFM, MDPI, vol. 12(1), pages 1-15, February.
    17. Bradrania, Reza & Veron, Jose Francisco, 2023. "The beta anomaly in the Australian stock market and the lottery demand," Pacific-Basin Finance Journal, Elsevier, vol. 77(C).
    18. 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.
    19. Cakici, Nusret & Zaremba, Adam & Bianchi, Robert J. & Pham, Nga, 2021. "False discoveries in the anomaly research: New insights from the Stock Exchange of Melbourne (1927–1987)," Pacific-Basin Finance Journal, Elsevier, vol. 70(C).
    20. Hannah Lea Hühn & Hendrik Scholz, 2019. "Reversal and momentum patterns in weekly stock returns: European evidence," Review of Financial Economics, John Wiley & Sons, vol. 37(2), pages 272-296, April.

    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:eee:ejores:v:270:y:2018:i:2:p:654-669. 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: Catherine Liu (email available below). General contact details of provider: http://www.elsevier.com/locate/eor .

    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.