[Feature] Warn when a backtest window is inside the LLM's training data
Problem or Motivation
Vibe-Trading already tests factors for look-ahead in the data (agent/tests/factors/test_lookahead.py). The agent is the other source. When it picks names, signals and parameters for a past window, it may know how that window turned out, and as far as I can see the run card doesn't record which model designed the strategy or whether the window predates its training cutoff.
This is measurable. I gave 12 current models on OpenRouter only a company name, ticker, exchange, sector and an earnings date, and asked for the probability that the report beat consensus and that the stock beat the S&P 500 afterwards. Then I paired each company's 2023 and 2024 reports from the same quarter and checked which one the model scored higher. 10 of the 12 showed recall after Holm correction, led by GPT-6 Astra (0.904 within-company AUC), Gemini 3.8 Flash (0.799) and Claude Opus 5.5 (0.766), where 0.5 means no recall. Pre-registered, 3,708 announcements: https://github.com/lizhuojunx86/llm-memory-audit/tree/main/studies/2026-09-leaderboard
ai-hedge-fund changed its backtests after this (virattt/ai-hedge-fund#721, v2.4.1): its agents no longer see the ticker, industry or calendar dates. That fix doesn't suit Vibe-Trading, where the agent has to know which instruments it is researching.
Proposed Solution
Make the exposure visible instead:
- Record the model that wrote
config.jsonandsignal_engine.py(provider and model id) in the run card. - Add a run-card warning when the backtest window ends before that model's training cutoff, for example "Backtest window ends before the training cutoff of ; results may reflect what the model remembers." The cutoff could come from a small table for the models in the picker plus a config override, with unknown treated as inside.
- In the strict factor bench (
bench_runner_strict.py), an option to place the OOS segment after the cutoff, so at least one segment is out of the model's reach.
Area
Backtest (engines, loaders, metrics)
Alternatives Considered
Blinding the agent with neutral labels and relative dates, as ai-hedge-fund did. It cuts recall, but most research here depends on knowing the instrument, so a warning plus an out-of-cutoff segment looks like the better fit.
Contribution
- I'm willing to submit a PR for this feature
Source: HKUDS/Vibe-Trading