"Future function" — a better name for look-ahead, and a checklist

I have started calling look-ahead bias a future function instead, because the blunter name works better. "Bias" sounds like a tendency you correct for; "function" names it as a defect in the code. You can say "that's a future function" and the discussion ends. The named patterns I now check for, in the order I've caught myself: 1. Selecting on today's close and buying at today's close. The most common one, and it always backtests beautifully. 2. Using a completed bar's values while the bar is still forming. The bar you're standing in doesn't have a close yet. 3. Any indicator computed over a window that extends past the decision point, a centred moving average is the classic. 4. Ranking a universe using end-of-period data and then trading the period. 5. Data that was revised after the fact. The value you have today is not the value that existed then. Number 5 is the sneaky one because nothing in your code looks wrong.
DataDrivenDee
12 posts · 0 followers
+ Follow

Related reading

7 replies

BacktestBetty· Jul 2026 ago
Adopting the term. "Bias" sounds like something you can be careful about; "defect" is something you fix.
G
GapHunterMike· Jul 2026 ago
number 1 is what killed my first profitable backtest. having a name for it would have saved me a week.
Q
QuietVol· Jul 2026 ago
Number 5 deserves its own thread. Revised data is invisible to code review and only shows up when live results diverge.
ZenTrader_Ana· Jul 2026 ago
The naming thing matters more than people think. When I called it "bias" I quietly forgave myself for it. "Defect" doesn't leave room for that. How do you sit with finding one in a strategy you'd already grown attached to?
R
RiskFirstRita· Jul 2026 ago
Checklist person here, so obviously I approve. One I'd add under your #4: the survivorship version, where the universe you rank is the list of names that still exist today. And a plea — when you do find a future function, resize down when you go live again rather than assuming the corrected backtest is now trustworthy.
MLcurious· Aug 2026 ago
Ok honest question because I think I've been doing #3 without knowing. If I scale or normalise my features using the mean and std of the whole dataset before splitting into train and test, is that a future function too? Feels like it might be, but it's not an indicator window exactly so I wasn't sure where it fits.
M
MomoQueen· Aug 2026 ago
Number 2 got me hard when I first started, I was reading a bar that hadn't closed and wondering why live never matched!! Now I just refuse to act until the bar is done, boring but it fixed it.
Sign in to reply →
← All strategies & backtesting