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

StockGPT: A GenAI Model for Stock Prediction and Trading

Author

Listed:
  • Dat Mai

Abstract

This paper introduces StockGPT, an autoregressive ``number'' model trained and tested on 70 million daily U.S.\ stock returns over nearly 100 years. Treating each return series as a sequence of tokens, StockGPT automatically learns the hidden patterns predictive of future returns via its attention mechanism. On a held-out test sample from 2001 to 2023, daily and monthly rebalanced long-short portfolios formed from StockGPT predictions yield strong performance. The StockGPT-based portfolios span momentum and long-/short-term reversals, eliminating the need for manually crafted price-based strategies, and yield highly significant alphas against leading stock market factors, suggesting a novel AI pricing effect. This highlights the immense promise of generative AI in surpassing human in making complex financial investment decisions.

Suggested Citation

  • Dat Mai, 2024. "StockGPT: A GenAI Model for Stock Prediction and Trading," Papers 2404.05101, arXiv.org, revised Oct 2024.
  • Handle: RePEc:arx:papers:2404.05101
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. 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.
    2. 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.
    3. Fama, Eugene F. & French, Kenneth R., 2015. "A five-factor asset pricing model," Journal of Financial Economics, Elsevier, vol. 116(1), pages 1-22.
    4. De Bondt, Werner F M & Thaler, Richard, 1985. "Does the Stock Market Overreact?," Journal of Finance, American Finance Association, vol. 40(3), pages 793-805, July.
    5. Alejandro Lopez-Lira & Yuehua Tang, 2023. "Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models," Papers 2304.07619, arXiv.org, revised Sep 2024.
    6. Newey, Whitney K & West, Kenneth D, 1987. "Hypothesis Testing with Efficient Method of Moments Estimation," International Economic Review, Department of Economics, University of Pennsylvania and Osaka University Institute of Social and Economic Research Association, vol. 28(3), pages 777-787, October.
    7. Shijie Wu & Ozan Irsoy & Steven Lu & Vadim Dabravolski & Mark Dredze & Sebastian Gehrmann & Prabhanjan Kambadur & David Rosenberg & Gideon Mann, 2023. "BloombergGPT: A Large Language Model for Finance," Papers 2303.17564, arXiv.org, revised Dec 2023.
    8. Kewei Hou & Haitao Mo & Chen Xue & Lu Zhang, 2021. "An Augmented q-Factor Model with Expected Growth [Abnormal returns to a fundamental analysis strategy]," Review of Finance, European Finance Association, vol. 25(1), pages 1-41.
    9. 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.
    10. Jegadeesh, Narasimhan, 1990. "Evidence of Predictable Behavior of Security Returns," Journal of Finance, American Finance Association, vol. 45(3), pages 881-898, July.
    11. Han, Yufeng & Yang, Ke & Zhou, Guofu, 2013. "A New Anomaly: The Cross-Sectional Profitability of Technical Analysis," Journal of Financial and Quantitative Analysis, Cambridge University Press, vol. 48(5), pages 1433-1461, October.
    12. Fama, Eugene F & MacBeth, James D, 1973. "Risk, Return, and Equilibrium: Empirical Tests," Journal of Political Economy, University of Chicago Press, vol. 81(3), pages 607-636, May-June.
    13. 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.
    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. Han Ding & Yinheng Li & Junhao Wang & Hang Chen, 2024. "Large Language Model Agent in Financial Trading: A Survey," Papers 2408.06361, arXiv.org.

    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. Doron Avramov & Guy Kaplanski & Avanidhar Subrahmanyam, 2022. "Postfundamentals Price Drift in Capital Markets: A Regression Regularization Perspective," Management Science, INFORMS, vol. 68(10), pages 7658-7681, October.
    2. Paul Handro & Bogdan Dima, 2024. "Analyzing Financial Markets Efficiency: Insights from a Bibliometric and Content Review," Journal of Financial Studies, Institute of Financial Studies, vol. 16(9), pages 119-175, May.
    3. Tran, Vu Le, 2023. "Sentiment and covariance characteristics," International Review of Financial Analysis, Elsevier, vol. 86(C).
    4. Tobek, Ondrej & Hronec, Martin, 2021. "Does it pay to follow anomalies research? Machine learning approach with international evidence," Journal of Financial Markets, Elsevier, vol. 56(C).
    5. Jozef Barunik & Martin Hronec & Ondrej Tobek, 2024. "Predicting the distributions of stock returns around the globe in the era of big data and learning," Papers 2408.07497, arXiv.org.
    6. Adam Zaremba & Jacob Koby Shemer, 2018. "Price-Based Investment Strategies," Springer Books, Springer, number 978-3-319-91530-2, December.
    7. Cakici, Nusret & Zaremba, Adam, 2021. "Liquidity and the cross-section of international stock returns," Journal of Banking & Finance, Elsevier, vol. 127(C).
    8. Ma, Yao & Yang, Baochen & Su, Yunpeng, 2021. "Stock return predictability: Evidence from moving averages of trading volume," Pacific-Basin Finance Journal, Elsevier, vol. 65(C).
    9. Hanauer, Matthias X. & Kalsbach, Tobias, 2023. "Machine learning and the cross-section of emerging market stock returns," Emerging Markets Review, Elsevier, vol. 55(C).
    10. Bui, Dien Giau & Kong, De-Rong & Lin, Chih-Yung & Lin, Tse-Chun, 2023. "Momentum in machine learning: Evidence from the Taiwan stock market," Pacific-Basin Finance Journal, Elsevier, vol. 82(C).
    11. Nettayanun, Sampan, 2023. "Asset pricing in bull and bear markets," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 83(C).
    12. 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.
    13. Ma, Yao & Yang, Baochen & Li, Jinyong & Shen, Yue, 2023. "Trend information and cross-sectional returns: The role of analysts," Pacific-Basin Finance Journal, Elsevier, vol. 80(C).
    14. Yu-Chin Hsu & Hsiou-Wei Lin & Kendro Vincent, 2017. "Do Cross-Sectional Stock Return Predictors Pass the Test without Data-Snooping Bias?," IEAS Working Paper : academic research 17-A003, Institute of Economics, Academia Sinica, Taipei, Taiwan.
    15. Berggrun, Luis & Cardona, Emilio & Lizarzaburu, Edmundo, 2024. "Evaluating asset pricing anomalies: Evidence from Latin America," Research in International Business and Finance, Elsevier, vol. 70(PB).
    16. Fang, Yi & Chen, Yuzhi & Ren, Hang, 2023. "A factor pricing model based on machine learning algorithm," International Review of Economics & Finance, Elsevier, vol. 88(C), pages 280-297.
    17. Mamdouh Medhat & Maik Schmeling, 2022. "Short-term Momentum," The Review of Financial Studies, Society for Financial Studies, vol. 35(3), pages 1480-1526.
    18. Linnenluecke, Martina K. & Chen, Xiaoyan & Ling, Xin & Smith, Tom & Zhu, Yushu, 2017. "Research in finance: A review of influential publications and a research agenda," Pacific-Basin Finance Journal, Elsevier, vol. 43(C), pages 188-199.
    19. Cederburg, Scott & O’Doherty, Michael S. & Wang, Feifei & Yan, Xuemin (Sterling), 2020. "On the performance of volatility-managed portfolios," Journal of Financial Economics, Elsevier, vol. 138(1), pages 95-117.
    20. Tobias Wiest, 2023. "Momentum: what do we know 30 years after Jegadeesh and Titman’s seminal paper?," Financial Markets and Portfolio Management, Springer;Swiss Society for Financial Market Research, vol. 37(1), pages 95-114, March.

    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:2404.05101. 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.