Open Family Office Datasets Tickers Strategies Portfolios Research Posts About Changelog

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

Source

Citation. Paul Glasserman (Columbia Business School) and Caden Lin (Columbia University, Department of Mathematics). "Assessing look-ahead bias in stock return predictions generated by GPT sentiment analysis". Journal of Financial Data Science 6(1), 2024, pp. 25–42. doi.org/10.3905/jfds.2023.1.143, published online December 2023. The journal details come from Crossref. The open version is arXiv:2309.17322 v1, 29 September 2023. Returns come from CRSP, and headlines from a web scrape guided by RavenPack and from a Thomson Reuters collection. The model is OpenAI's GPT-3.5-Turbo. No code is shared, and no funding is disclosed.

Status. Planned. The page sets the rule for any LLM or text strategy here: test it only on dates after the model's training cut-off. #420 reviews a direct test of look-ahead in LLM forecasts. No code in the repo uses the paper yet.

Read. Read on 2026-11-29 from the arXiv PDF, v1, 17 pages. The journal version is paywalled, so its text may differ. I extracted the text and read Sections 1 to 3.3 and the conclusion, and Tables 2 and 3 in the source's own figures. I read Sections 3.4 to 3.6 on firm size, scores and betas only in part, and didn't read the appendix.

Summary

Claim. An LLM can bias a backtest in two ways. With look-ahead, it knows what happened after a headline. With distraction, its general knowledge of a company changes how it reads the headline. Removing the company's name and products from headlines measures both. In GPT-3.5's training window, the anonymised headlines did better, so distraction hurt more than look-ahead helped. After the cut-off, the authors judge look-ahead "not a concern".

Method.

Findings, as the source reports them. Long-short returns in basis points a day (Table 3).

Setting Number Value
Scraped, in sample original and anonymised mean 25.08 and 30.97
Scraped, in sample t-statistic, p-value of the difference −1.84, 0.066
Thomson Reuters, in sample original and anonymised mean 10.74 and 13.84
Thomson Reuters, in sample t-statistic, p-value −2.38, 0.017
Scraped, out of sample original and anonymised mean 16.32 and 11.09
Scraped, out of sample t-statistic, p-value 1.20, 0.23
Thomson Reuters, out of sample original and anonymised mean 6.07 and 12.23
Thomson Reuters, out of sample t-statistic, p-value −1.86, 0.064

Where the claims go beyond the evidence

The test measures the sum, not each part. The comparison gives the net effect of look-ahead and distraction together. The authors split them by assuming look-ahead "must be positive". But a model that knows the long-term outcome can still misjudge the next day. The paper's own Facebook example shows long-term knowledge, not next-day knowledge. So a negative net effect doesn't show that look-ahead is small.

Anonymisation can't hide the event. "Pfizer to buy Allergan in 160 billion deal" names the buyer and the size. A model can recall the deal without the target's name. The method hides names and products, not events, so look-ahead can survive it.

"Not a concern" out of sample is true by definition. After the cut-off there is nothing to look ahead to, if the cut-off is right. llm-forecaster-pitfalls.md notes that a stated cut-off isn't a guarantee, because later fine-tuning can carry later facts.

A small out-of-sample test. 314 days, one model and headlines only. The out-of-sample differences have p-values of 0.23 and 0.064, so they can't separate the two versions.

The text misstates one figure. Section 3.2 gives the Thomson Reuters gain as "81.64 − 77.27 = 4.37 basis points per day". Those are the standard deviations in Table 3. The means are 13.84 and 10.74, a gain of 3.10.

The returns aren't tradable. The authors say so: "these strategies are not intended to be feasible". A long-short of 25 basis points a day, with no costs, turns the whole book over each day.

Credit. The authors state the limits of their strategy, report both sources, and show the out-of-sample tests that aren't significant. The anonymisation method is simple and can be repeated.

Use in this repo

Look-ahead from training data (point 1). An LLM's weights hold what it read before its cut-off. A backtest of an LLM strategy on dates inside that window isn't out of sample, whatever the data feed shows. That is a different leak from a bar dated after now.

How strong the anonymisation evidence is (point 2). Weak, for the question the repo cares about. The paper shows that hiding names changes GPT-3.5's answers and, in sample, its returns. It doesn't show that look-ahead is small, because the test can't split look-ahead from distraction, and anonymisation can't hide the event. A backtest inside the training window stays suspect even with masked names.

The rule for the harness (point 3, #12). The look-ahead oracle (open_familyoffice/oracle.py) checks that the feed never shows a bar after now. It can't see what a model's weights know. So an LLM strategy needs its own rule:

This is a change to how the verdict treats LLM strategies, so it is for the maintainer to decide. It may need a bump of PROTOCOL_VERSION, now 2 (open_familyoffice/verdict.py).

Lopez-Lira and Tang (2023) (point 4). This paper tests their prompt and trade. A review of theirs would give the original claim, and the size of its out-of-sample result. I'd review it at medium priority, after #420, which tests look-ahead directly. That is a question for the maintainer.

Gençay and LiveTradeBench (point 5, #28, #69). llm-strategy-honest-evaluation.md (Gençay) finds that no LLM-found strategy survives an evaluation that counts the search, and notes that the paper doesn't address memorisation. This paper is the memorisation side of that problem. livetradebench.md avoids the leak by running live, which is the strict form of the rule above. The project's paper trading is the same test.