Look-Ahead-Freedom as Temporal Non-Interference: A Verifiable Correctness Property for Backtesting and Agentic Trading Pipelines
2026-07-06 • Cryptography and Security
Cryptography and SecurityLogic in Computer ScienceProgramming LanguagesSoftware Engineering
AI summaryⓘ
The authors study look-ahead bias, which happens when future information incorrectly influences decisions made earlier, leading to overly optimistic test results. They show this problem can be seen as a formal property called temporal non-interference, meaning the future should not affect the present in a structured timeline of information. They prove that detecting look-ahead freedom is generally undecidable when data availability depends on values, but for simpler cases, they create a fast, sound method to check it. Their tool successfully finds all subtle leaks other methods miss and confirms safe systems have no leaks. This work helps ensure fair evaluation of time-dependent data processes.
look-ahead biasbacktestingtemporal non-interferenceinformation latticeundecidabilitytype-and-effect systemtime-indexingpoint-in-time readspipeline calculusdata leakage
Authors
Xavier Fonseca
Abstract
Look-ahead bias (using information from after a decision epoch to make the decision at that epoch) is the dominant way a backtest or a machine-learning evaluation flatters a system that will disappoint in deployment. The field manages it with construct-specific recipes and empirical detectors, which are sound only channel by channel and certify nothing by their silence. We show that look-ahead-freedom is a formal property in disguise: fixing an epoch, the demand that the future not influence the present is temporal non-interference over a time-indexed information lattice. From this identification we develop a pipeline calculus separating a datum's availability from its reference time, and settle the problem's boundary. Where availability may depend on data values, look-ahead-freedom is undecidable (indeed Pi-0-1-hard): leakage is recursively enumerable but freedom is not. On the value-independent fragment (covering windowing, resampling, joins, point-in-time and vintage reads, and agentic retrieval) we give a type-and-effect system that is sound and decidable in linear time. An artifact confirms the theory: the check scales linearly, an independent oracle witnesses no leak in any accepted pipeline, and the checker catches every planted leak that differential and tiling detectors miss.