Adversarial bias discovery
Optimise a task-agnostic instruction that reliably elicits each model's parametric memory.
Inference-time bias mitigation for financial LLMs
Mitigating Look-Ahead Bias in Financial Backtesting with Large Language Models
University of Edinburgh
Accepted to EMNLP 2026 Main Conference. Code, discovery profiles and reproducibility tools are public.
Explore the release →The problem
Historical context may be clean while the model itself already remembers what happened next. FinCAD targets this parametric look-ahead bias at inference time.
Backtesting LLMs on historical financial data is unreliable when pre-training postdates the evaluated events. FinCAD learns a model-specific prior prompt that activates memorised outcomes, estimates whether that memory is present for each entity and date, and subtracts the prior from context-conditioned logits. The result is a targeted correction that requires no model retraining and is designed to decay when date-specific memorisation is absent.
Read the full abstract ↗The method
FinCAD separates useful historical context from a model's recalled future outcomes through three linked stages.
Optimise a task-agnostic instruction that reliably elicits each model's parametric memory.
Use entropy and date variance to estimate memorisation for a specific entity and decision date.
Downweight memory-heavy tokens while retaining evidence from information available at the backtest date.
Prices, fundamentals and signals through 2018-06-29
“What I remember about this entity after date t…”
Ṽ(y) = (1 + α) V(y | xctx) − α V(y | xprior)
No weight updates
System overview
Empirical evidence
The experiments separate memorised in-sample dates from strict post-cutoff evaluation and test whether model rankings become more predictive.
Mean accuracy change for four of the five core models across general benchmarks.
Mean seven-model-subset Spearman correlation between in-sample and out-of-sample Sharpe rankings.
A cross-family leaderboard audit, with five models evaluated in the full benchmark sweep.
FinCAD is a mitigation—not a guarantee that all training-data leakage has been removed. Its correction is intended to be strongest where the calibration probe detects date-specific memory.
Open-source release
Pre-computed discovery profiles let you apply FinCAD directly. The public CLI handles the context branch, oracle prior and adjusted decoding.
# Install the research release
git clone https://github.com/waylonli/FinCAD.git
cd FinCAD
pip install -e .
# Run with a released discovery profile
fincad \
--model-name Qwen/Qwen2.5-7B-Instruct \
--discovery-file \
results/discovery/qwen2.5-7b-instruct.json \
--context-file examples/nvda_2018_context.txt \
--task-file examples/forecast_task.txt \
--entity NVDA --date 2018-06-29 \
--alpha 1.0 --max-new-tokens 64
Citation
If this work supports your research, please cite the paper and link to the public implementation.
@misc{li2026summoningoracleslayit,
title = {Summoning the Oracle to Slay It: Mitigating
Look-Ahead Bias in Financial Backtesting with
Large Language Models},
author = {Li, Weixian Waylon and Wang, Mengyu and Ma, Tiejun},
year = {2026},
eprint = {2605.24564},
archivePrefix = {arXiv},
primaryClass = {cs.AI}
}