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

Assessing Look-Ahead Bias in Stock Return Predictions Generated By GPT Sentiment Analysis

Author

Listed:
  • Paul Glasserman
  • Caden Lin

Abstract

Large language models (LLMs), including ChatGPT, can extract profitable trading signals from the sentiment in news text. However, backtesting such strategies poses a challenge because LLMs are trained on many years of data, and backtesting produces biased results if the training and backtesting periods overlap. This bias can take two forms: a look-ahead bias, in which the LLM may have specific knowledge of the stock returns that followed a news article, and a distraction effect, in which general knowledge of the companies named interferes with the measurement of a text's sentiment. We investigate these sources of bias through trading strategies driven by the sentiment of financial news headlines. We compare trading performance based on the original headlines with de-biased strategies in which we remove the relevant company's identifiers from the text. In-sample (within the LLM training window), we find, surprisingly, that the anonymized headlines outperform, indicating that the distraction effect has a greater impact than look-ahead bias. This tendency is particularly strong for larger companies--companies about which we expect an LLM to have greater general knowledge. Out-of-sample, look-ahead bias is not a concern but distraction remains possible. Our proposed anonymization procedure is therefore potentially useful in out-of-sample implementation, as well as for de-biased backtesting.

Suggested Citation

  • Paul Glasserman & Caden Lin, 2023. "Assessing Look-Ahead Bias in Stock Return Predictions Generated By GPT Sentiment Analysis," Papers 2309.17322, arXiv.org.
  • Handle: RePEc:arx:papers:2309.17322
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Alejandro Lopez-Lira & Yuehua Tang, 2023. "Can ChatGPT Forecast Stock Price Movements? Return Predictability and Large Language Models," Papers 2304.07619, arXiv.org, revised Oct 2025.
    2. Paul C. Tetlock, 2007. "Giving Content to Investor Sentiment: The Role of Media in the Stock Market," Journal of Finance, American Finance Association, vol. 62(3), pages 1139-1168, June.
    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. Baptiste Lefort & Eric Benhamou & Jean-Jacques Ohana & David Saltiel & Beatrice Guez & Thomas Jacquot, 2024. "Stress index strategy enhanced with financial news sentiment analysis for the equity markets," Papers 2404.00012, arXiv.org.
    2. Baptiste Lefort & Eric Benhamou & Jean-Jacques Ohana & David Saltiel & Beatrice Guez & D Challet, 2024. "Can ChatGPT Compute Trustworthy Sentiment Scores from Bloomberg Market Wraps? [ChatGPT peut-il calculer des scores de sentiment dignes de confiance à partir de Bloomberg Market Wraps ?]," Working Papers hal-04739906, HAL.
    3. Penaranda, Francisco & Sentana, Enrique, 2024. "Portfolio management with big data," CEPR Discussion Papers 19314, Centre for Economic Policy Research.
    4. Manish Jha & Jialin Qian & Michael Weber & Baozhong Yang, 2024. "ChatGPT and Corporate Policies," NBER Working Papers 32161, National Bureau of Economic Research, Inc.
    5. Mohammed-Khalil Ghali & Cecil Pang & Oscar Molina & Carlos Gershenson-Garcia & Daehan Won, 2025. "Forecasting Commodity Price Shocks Using Temporal and Semantic Fusion of Prices Signals and Agentic Generative AI Extracted Economic News," Papers 2508.06497, arXiv.org.
    6. D. Sujatha & A. Krishna Sudheer & Elamurugan Balasundaram, 2025. "Black swan dynamics: a network-based framework for systemic risk detection and mitigation," Risk Management, Palgrave Macmillan, vol. 27(4), pages 1-31, December.
    7. Müller, Karsten, 2020. "German forecasters' narratives: How informative are German business cycle forecast reports?," Working Papers 23, German Research Foundation's Priority Programme 1859 "Experience and Expectation. Historical Foundations of Economic Behaviour", Humboldt University Berlin.
    8. Misra, Shekhar & Mishra, Saurabh, 2026. "Environmental, social, and governance performances, media sentiments, and shareholder wealth," Journal of Business Research, Elsevier, vol. 203(C).
    9. Gao, Xin & Xu, Weidong & Li, Donghui, 2025. "Media coverage and managerial investment learning from stock markets: International evidence," Research in International Business and Finance, Elsevier, vol. 76(C).
    10. Goedde-Menke, Michael & Langer, Thomas & Pfingsten, Andreas, 2014. "Impact of the financial crisis on bank run risk – Danger of the days after," Journal of Banking & Finance, Elsevier, vol. 40(C), pages 522-533.
    11. David E. Allen & Michael McAleer & Abhay K. Singh, 2019. "Daily market news sentiment and stock prices," Applied Economics, Taylor & Francis Journals, vol. 51(30), pages 3212-3235, June.
    12. Yan Luo & Linying Zhou, 2020. "Textual tone in corporate financial disclosures: a survey of the literature," International Journal of Disclosure and Governance, Palgrave Macmillan, vol. 17(2), pages 101-110, September.
    13. David M. Arseneau & Alejandro Drexler & Mitsuhiro Osada, 2022. "Central Bank Communication about Climate Change," Finance and Economics Discussion Series 2022-031, Board of Governors of the Federal Reserve System (U.S.).
    14. Jiao Ji & Oleksandr Talavera & Shuxing Yin, 2018. "The Hidden Information Content: Evidence from the Tone of Independent Director Reports," Working Papers 2018-28, Swansea University, School of Management.
    15. Jang, Junkyu, 2025. "Selective news selection model for explainable stock prediction via cross-attention integration," Finance Research Letters, Elsevier, vol. 85(PD).
    16. Lixiang Wang & Wendi Hou & Yupei Liu, 2023. "How do co‐shareholding networks affect negative media coverage? Evidence from China," Accounting and Finance, Accounting and Finance Association of Australia and New Zealand, vol. 63(4), pages 4221-4249, December.
    17. Kamaladdin Fataliyev & Aneesh Chivukula & Mukesh Prasad & Wei Liu, 2021. "Stock Market Analysis with Text Data: A Review," Papers 2106.12985, arXiv.org, revised Jul 2021.
    18. Rubini Sampath Sena & R. Madhumathi, 2026. "Investor Sentiment and Stock Price Crash Risk: Indian Perspective," Asia-Pacific Financial Markets, Springer;Japanese Association of Financial Economics and Engineering, vol. 33(2), pages 537-558, June.
    19. Christopher N. Avery & Judith A. Chevalier & Richard J. Zeckhauser, 2016. "The "CAPS" Prediction System and Stock Market Returns," Review of Finance, European Finance Association, vol. 20(4), pages 1363-1381.
    20. John L. Campbell & Hsinchun Chen & Dan S. Dhaliwal & Hsin-min Lu & Logan B. Steele, 2014. "The information content of mandatory risk factor disclosures in corporate filings," Review of Accounting Studies, Springer, vol. 19(1), pages 396-455, 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:2309.17322. 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.