Paper: arXiv 2309.17322
Authors: 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.
Complexity vs Empirical Score
- Math Complexity: 3.0/10
- Empirical Rigor: 6.0/10 (capped from 7.5: transaction costs not modelled; see penalty flags)
- Quadrant: Street Traders — practical and empirical, lighter on theory
Why this score: The paper addresses a critical and timely methodology issue in LLM-based quantitative finance: look-ahead bias and company-name distraction in sentiment extraction. It uses a clever empirical design (anonymizing company identifiers) to isolate these effects rather than relying on complex mathematical derivations.
Research Flowchart
flowchart TD
A[Research Goal: Assess Look-Ahead Bias vs. Distraction Effect in LLM Stock Predictions] --> B[Input Data: Financial News Headlines & Stock Returns]
B --> C[Methodology: Sentiment Analysis via GPT]
C --> D[Compare Input Formats: Original Headlines vs. Anonymized Company Names]
D --> E[Backtest Trading Strategies: In-Sample vs. Out-of-Sample]
E --> F[Key Finding: Distraction Effect > Look-Ahead Bias In-Sample]
F --> G[Outcome: Anonymization De-biases Backtesting & Improves Out-of-Sample Results]