Backtesting an LLM Is Hard: virattt Hides Tickers and Dates to Curb Data Leakage

virattt · x · 2026-09-28

virattt, author of the open-source AI Hedge Fund project, points out a fundamental problem with backtesting LLM-driven trading strategies: the returns may already be baked into the model's weights, since training data contains historical market action.

To limit this leakage, the project's backtester now hides the ticker, dates, and position size from the model, making it harder for the LLM to recall answers from memory rather than reason.

Related event: AI Hedge Fund Author Open-Sources Backtester, Flags LLM Data Leakage Problem(2 posts)→

Original post →

More from coding & agent

coding & agent channel →