IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2508.19006.html
   My bibliography  Save this paper

Is attention truly all we need? An empirical study of asset pricing in pretrained RNN sparse and global attention models

Author

Listed:
  • Shanyan Lai

Abstract

This study investigates the pretrained RNN attention models with the mainstream attention mechanisms such as additive attention, Luong's three attentions, global self-attention (Self-att) and sliding window sparse attention (Sparse-att) for the empirical asset pricing research on top 420 large-cap US stocks. This is the first paper on the large-scale state-of-the-art (SOTA) attention mechanisms applied in the asset pricing context. They overcome the limitations of the traditional machine learning (ML) based asset pricing, such as mis-capturing the temporal dependency and short memory. Moreover, the enforced causal masks in the attention mechanisms address the future data leaking issue ignored by the more advanced attention-based models, such as the classic Transformer. The proposed attention models also consider the temporal sparsity characteristic of asset pricing data and mitigate potential overfitting issues by deploying the simplified model structures. This provides some insights for future empirical economic research. All models are examined in three periods, which cover pre-COVID-19 (mild uptrend), COVID-19 (steep uptrend with a large drawdown) and one year post-COVID-19 (sideways movement with high fluctuations), for testing the stability of these models under extreme market conditions. The study finds that in value-weighted portfolio back testing, Model Self-att and Model Sparse-att exhibit great capabilities in deriving the absolute returns and hedging downside risks, while they achieve an annualized Sortino ratio of 2.0 and 1.80 respectively in the period with COVID-19. And Model Sparse-att performs more stably than Model Self-att from the perspective of absolute portfolio returns with respect to the size of stocks' market capitalization.

Suggested Citation

  • Shanyan Lai, 2025. "Is attention truly all we need? An empirical study of asset pricing in pretrained RNN sparse and global attention models," Papers 2508.19006, arXiv.org.
  • Handle: RePEc:arx:papers:2508.19006
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Luyang Chen & Markus Pelger & Jason Zhu, 2024. "Deep Learning in Asset Pricing," Management Science, INFORMS, vol. 70(2), pages 714-750, February.
    2. Kelly, Bryan T. & Pruitt, Seth & Su, Yinan, 2019. "Characteristics are covariances: A unified model of risk and return," Journal of Financial Economics, Elsevier, vol. 134(3), pages 501-524.
    3. Shihao Gu & Bryan Kelly & Dacheng Xiu, 2020. "Empirical Asset Pricing via Machine Learning," Review of Finance, European Finance Association, vol. 33(5), pages 2223-2273.
    4. Kewei Hou & Chen Xue & Lu Zhang, 2015. "Editor's Choice Digesting Anomalies: An Investment Approach," The Review of Financial Studies, Society for Financial Studies, vol. 28(3), pages 650-705.
    5. Ma, Tian & Wang, Wanwan & Chen, Yu, 2023. "Attention is all you need: An interpretable transformer-based asset allocation approach," International Review of Financial Analysis, Elsevier, vol. 90(C).
    6. Shihao Gu & Bryan Kelly & Dacheng Xiu, 2020. "Empirical Asset Pricing via Machine Learning," The Review of Financial Studies, Society for Financial Studies, vol. 33(5), pages 2223-2273.
    7. Bryan T. Kelly & Boris Kuznetsov & Semyon Malamud & Teng Andrea Xu, 2025. "Artificial Intelligence Asset Pricing Models," Swiss Finance Institute Research Paper Series 25-08, Swiss Finance Institute.
    8. Bartosz Bieganowski & Robert Slepaczuk, 2024. "Supervised Autoencoder MLP for Financial Time Series Forecasting," Papers 2404.01866, arXiv.org, revised Jun 2024.
    9. 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.
    10. Lin William Cong & Ke Tang & Jingyuan Wang & Yang Zhang, 2021. "Deep Sequence Modeling: Development and Applications in Asset Pricing," Papers 2108.08999, arXiv.org.
    11. 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.
    12. Shanyan Lai, 2025. "Multilayer Perceptron Neural Network Models in Asset Pricing: An Empirical Study on Large-Cap US Stocks," Papers 2505.01921, arXiv.org, revised May 2025.
    13. Carhart, Mark M, 1997. "On Persistence in Mutual Fund Performance," Journal of Finance, American Finance Association, vol. 52(1), pages 57-82, March.
    14. Bryan T. Kelly & Boris Kuznetsov & Semyon Malamud & Teng Andrea Xu, 2025. "Artificial Intelligence Asset Pricing Models," NBER Working Papers 33351, National Bureau of Economic Research, Inc.
    15. James B. Heaton & Nicholas Polson & Jan H. Witte, 2017. "Rejoinder to ‘Deep learning for finance: deep portfolios’," Applied Stochastic Models in Business and Industry, John Wiley & Sons, vol. 33(1), pages 19-21, January.
    16. Gu, Shihao & Kelly, Bryan & Xiu, Dacheng, 2021. "Autoencoder asset pricing models," Journal of Econometrics, Elsevier, vol. 222(1), pages 429-450.
    17. Guillaume Coqueret & Tony Guida, 2020. "Machine Learning for Factor Investing : R version," Post-Print hal-03188226, HAL.
    18. J. B. Heaton & N. G. Polson & J. H. Witte, 2017. "Deep learning for finance: deep portfolios," Applied Stochastic Models in Business and Industry, John Wiley & Sons, vol. 33(1), pages 3-12, January.
    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. Shanyan Lai, 2025. "Multilayer Perceptron Neural Network Models in Asset Pricing: An Empirical Study on Large-Cap US Stocks," Papers 2505.01921, arXiv.org, revised May 2025.
    2. Cakici, Nusret & Fieberg, Christian & Metko, Daniel & Zaremba, Adam, 2023. "Machine learning goes global: Cross-sectional return predictability in international stock markets," Journal of Economic Dynamics and Control, Elsevier, vol. 155(C).
    3. Wu, Hongxu & Wang, Qiao & Li, Jianping & Deng, Zhibin, 2025. "Enhancing stock return prediction in the Chinese market: A GAN-based approach," Research in International Business and Finance, Elsevier, vol. 75(C).
    4. Doron Avramov & Si Cheng & Lior Metzker, 2023. "Machine Learning vs. Economic Restrictions: Evidence from Stock Return Predictability," Management Science, INFORMS, vol. 69(5), pages 2587-2619, May.
    5. Shanyan Lai, 2025. "Asset Pricing in Pre-trained Transformer," Papers 2505.01575, arXiv.org, revised May 2025.
    6. Wolfgang Drobetz & Tizian Otto, 2021. "Empirical asset pricing via machine learning: evidence from the European stock market," Journal of Asset Management, Palgrave Macmillan, vol. 22(7), pages 507-538, December.
    7. Avramov, D. & Ge, S. & Li, S. & Linton, O. B., 2025. "Dual Industry Effects and Cross-Stock Predictability," Janeway Institute Working Papers 2506, Faculty of Economics, University of Cambridge.
    8. 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.
    9. Tian Ma & Cunfei Liao & Fuwei Jiang, 2023. "Timing the factor zoo via deep learning: Evidence from China," Accounting and Finance, Accounting and Finance Association of Australia and New Zealand, vol. 63(1), pages 485-505, March.
    10. Uddin, Ajim & Yu, Dantong, 2020. "Latent factor model for asset pricing," Journal of Behavioral and Experimental Finance, Elsevier, vol. 27(C).
    11. Jinghai He & Cheng Hua & Chunyang Zhou & Zeyu Zheng, 2025. "Reinforcement-Learning Portfolio Allocation with Dynamic Embedding of Market Information," Papers 2501.17992, arXiv.org.
    12. Matteo Bagnara, 2024. "Asset Pricing and Machine Learning: A critical review," Journal of Economic Surveys, Wiley Blackwell, vol. 38(1), pages 27-56, February.
    13. Caldeira, João F. & Santos, André A.P. & Torrent, Hudson S., 2023. "Semiparametric portfolios: Improving portfolio performance by exploiting non-linearities in firm characteristics," Economic Modelling, Elsevier, vol. 122(C).
    14. Fieberg, Christian & Liedtke, Gerrit & Zaremba, Adam & Cakici, Nusret, 2025. "A factor model for the cross-section of country equity risk premia," Journal of Banking & Finance, Elsevier, vol. 171(C).
    15. Mykola Babiak & Jozef Barunik, 2020. "Deep Learning, Predictability, and Optimal Portfolio Returns," CERGE-EI Working Papers wp677, The Center for Economic Research and Graduate Education - Economics Institute, Prague.
    16. Avramov, D. & Ge, S. & Li, S. & Linton, O. B., 2025. "Dual Industry Effects and Cross-Stock Predictability," Cambridge Working Papers in Economics 2512, Faculty of Economics, University of Cambridge.
    17. Yao, Haixiang & Xia, Shenghao & Liu, Hao, 2022. "Six-factor asset pricing and portfolio investment via deep learning: Evidence from Chinese stock market," Pacific-Basin Finance Journal, Elsevier, vol. 76(C).
    18. Mao, Jie & Shao, Jingjing & Wang, Weiguan, 2025. "Risk premium principal components for the Chinese stock market," Pacific-Basin Finance Journal, Elsevier, vol. 89(C).
    19. Christian Fieberg & Gerrit Liedtke & Thorsten Poddig, 2025. "Recurrent double-conditional factor model," OR Spectrum: Quantitative Approaches in Management, Springer;Gesellschaft für Operations Research e.V., vol. 47(1), pages 205-254, March.
    20. Haixiang Yao & Shenghao Xia & Hao Liu, 2024. "Return predictability via an long short‐term memory‐based cross‐section factor model: Evidence from Chinese stock market," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 43(6), pages 1770-1794, September.

    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:2508.19006. 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: http://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.