IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2608.05755.html

Cross-Sectional Heterogeneity in LSTM Networks for Financial Time Series

Author

Listed:
  • Julius Dobelt

Abstract

Predicting financial asset returns remains one of the most difficult challenges in empirical finance, driven by the low signal-to-noise ratio and the semi-strong form of market efficiency. While deep learning models, especially LSTM networks, have shown promise in capturing temporal dependencies, standard architectures often struggle to account for the cross-sectional heterogeneity of asset returns. This paper proposes a novel architectural extension to the basic LSTM model designed to improve both predictive accuracy and model interpretability. The framework integrates macro-financial covariates to capture broader economic signals and learnable sector embeddings to encompass heterogeneity by sector. The trading strategy involves constructing a long-short portfolio based on daily directional forecasts for each S&P 500 constituent, targeting stocks expected to under- or outperform the cross-sectional median return of the S&P 500. Model Performance is evaluated against three competitive benchmarks: a basic LSTM, a Random Forest model and a traditional market buy-and-hold strategy. The empirical results demonstrate that the LSTM with sector embeddings outperforms all benchmarks across key risk and return metrics. By utilizing sector embeddings, the model explicitly incorporates cross-sectional heterogeneity, allowing it to adapt to varying industry dynamics within the market. To address the black-box nature of deep learning, I use latent space visualizations to analyse how the model differentiates between sectors, providing insights into the internal representation of the sectors in the LSTM. The impact of the sector information can be quantified using a novel contribution metric by inspecting the weights of the LSTM. The predictive signal is driven by a short-term reversal factor and an industry momentum factor.

Suggested Citation

  • Julius Dobelt, 2026. "Cross-Sectional Heterogeneity in LSTM Networks for Financial Time Series," Papers 2608.05755, arXiv.org, revised Aug 2026.
  • Handle: RePEc:arx:papers:2608.05755
    as

    Download full text from publisher

    File URL: https://arxiv.org/pdf/2608.05755
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. John Y. Campbell & Samuel B. Thompson, 2008. "Predicting Excess Stock Returns Out of Sample: Can Anything Beat the Historical Average?," The Review of Financial Studies, Society for Financial Studies, vol. 21(4), pages 1509-1531, July.
    2. Ivo Welch & Amit Goyal, 2008. "A Comprehensive Look at The Empirical Performance of Equity Premium Prediction," The Review of Financial Studies, Society for Financial Studies, vol. 21(4), pages 1455-1508, July.
    3. Tarun Chordia, 2005. "An Empirical Analysis of Stock and Bond Market Liquidity," The Review of Financial Studies, Society for Financial Studies, vol. 18(1), pages 85-129.
    4. 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.
    5. 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.
    6. Wei Bao & Jun Yue & Yulei Rao, 2017. "A deep learning framework for financial time series using stacked autoencoders and long-short term memory," PLOS ONE, Public Library of Science, vol. 12(7), pages 1-24, July.
    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. Xu, Dezhong & Li, Bin & Singh, Tarlok & Chen, Xiaoyue & Li, Jinze, 2025. "Cross-market overnight time-series momentum," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 105(C).
    2. Saketh Aleti & Tim Bollerslev & Mathias Siggaard, 2025. "Intraday Market Return Predictability Culled from the Factor Zoo," Management Science, INFORMS, vol. 71(9), pages 7731-7751, September.
    3. Jondeau, Eric & Zhang, Qunzi & Zhu, Xiaoneng, 2019. "Average skewness matters," Journal of Financial Economics, Elsevier, vol. 134(1), pages 29-47.
    4. Ian W. R. Martin & Christian Wagner, 2019. "What Is the Expected Return on a Stock?," Journal of Finance, American Finance Association, vol. 74(4), pages 1887-1929, August.
    5. 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.
    6. Wen, Zhuzhu & Gong, Xu & Ma, Diandian & Xu, Yahua, 2021. "Intraday momentum and return predictability: Evidence from the crude oil market," Economic Modelling, Elsevier, vol. 95(C), pages 374-384.
    7. Phylaktis, Kate & Yamani, Ehab, 2025. "Foreign currency forecasting in emerging markets: What can stock and bond markets tell us?," Journal of Empirical Finance, Elsevier, vol. 83(C).
    8. Mengxi He & Yudong Wang & Yaojie Zhang, 2023. "The predictability of iron ore futures prices: A product‐material lead–lag effect," Journal of Futures Markets, John Wiley & Sons, Ltd., vol. 43(9), pages 1289-1304, September.
    9. Boudoukh, Jacob & Israel, Ronen & Richardson, Matthew, 2022. "Biases in long-horizon predictive regressions," Journal of Financial Economics, Elsevier, vol. 145(3), pages 937-969.
    10. Oliver D. Bunn & Robert J. Shiller, "undated". "Changing Times, Changing Values: A Historical Analysis of Sectors within the US Stock Market 1872-2013," Cowles Foundation Discussion Papers 1950, Cowles Foundation for Research in Economics, Yale University.
    11. Maio, Paulo & Santa-Clara, Pedro, 2012. "Multifactor models and their consistency with the ICAPM," Journal of Financial Economics, Elsevier, vol. 106(3), pages 586-613.
    12. Shu‐Lien Chang & Hsiu‐Chuan Lee & Donald Lien, 2022. "The global latent factor and international index futures returns predictability," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 41(3), pages 514-538, April.
    13. Andrew Detzel & Hong Liu & Jack Strauss & Guofu Zhou & Yingzi Zhu, 2021. "Learning and predictability via technical analysis: Evidence from bitcoin and stocks with hard‐to‐value fundamentals," Financial Management, Financial Management Association International, vol. 50(1), pages 107-137, March.
    14. Zhang, Wei & Wang, Pengfei & Li, Yi, 2020. "Intraday momentum in Chinese commodity futures markets," Research in International Business and Finance, Elsevier, vol. 54(C).
    15. Andrew Y. Chen & Tom Zimmermann, 2022. "Publication Bias in Asset Pricing Research," Papers 2209.13623, arXiv.org, revised Sep 2023.
    16. Xu, Yahua & Bouri, Elie & Saeed, Tareq & Wen, Zhuzhu, 2020. "Intraday return predictability: Evidence from commodity ETFs and their related volatility indices," Resources Policy, Elsevier, vol. 69(C).
    17. Ekaterini Panopoulou & Sotiria Plastira, 2014. "Fama French factors and US stock return predictability," Journal of Asset Management, Palgrave Macmillan, vol. 15(2), pages 110-128, April.
    18. Ma, Feng & Lu, Fei & Tao, Ying, 2022. "Geopolitical risk and excess stock returns predictability: New evidence from a century of data," Finance Research Letters, Elsevier, vol. 50(C).
    19. Xiaojun Chu & Jianying Qiu, 2021. "Forecasting stock returns using first half an hour order imbalance," International Journal of Finance & Economics, John Wiley & Sons, Ltd., vol. 26(3), pages 3236-3245, July.
    20. Tao Chen, 2018. "Does Investor Attention Matter To Renminbi Trading?," The Singapore Economic Review (SER), World Scientific Publishing Co. Pte. Ltd., vol. 63(03), pages 667-689, June.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:arx:papers:2608.05755. 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: arXiv administrators (email available below). General contact details of provider: https://arxiv.org/ .

    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.