← Lab /Software

Linear-time type system verifies look-ahead freedom and catches leaks missed by existing detectors

Look-ahead-freedom is decidable for value-independent pipelines and their checker detects all planted leaks that differential and tiling detectors miss

Software arXiv 6 Jul 2026 Method Prototype evidence

Published as “Look-Ahead-Freedom as Temporal Non-Interference: A Verifiable Correctness Property for Backtesting and Agentic Trading Pipelines”

Why it matters

Practitioners can obtain a provable guarantee that their backtesting or agentic trading pipelines are free of look-ahead bias, reducing reliance on ad-hoc vigilance.

Summary

The paper presents a static type-and-effect checker that soundly certifies look-ahead-freedom (temporal non-interference) for backtesting and agentic trading pipelines, scaling linearly with pipeline size and detecting all 33 planted leaks in an adversarial corpus, while prior detectors miss many. It also proves that the property is undecidable in the full language, but decidable on a value-independent fragment covering real pipelines. The checker’s cost includes a confined set of false positives on opaque value operations, and the reported headline numbers rely on proprietary market data that cannot be redistributed.

What they found 1

  1. The static checker scales linearly and catches all planted leaks, outperforming existing detectors.

    “The check scales linearly in pipeline size (measured log-log slope 1.023, 95% bootstrap CI [1.021, 1.026], across four orders of magnitude); on five archetypes drawn from proprietary market data (not redistributable) an independent dynamic oracle witnesses no leak in any accepted pipeline, corroborating soundness; and on an adversarial corpus the sound checker misses none of 33 planted leaks while a differential two-run detector of the kind used in practice misses 18 (54.5%) and a window-tiling detector misses all 33, with the checker’s cost a precisely characterised and confined set of false positives on opaque value operations.”

Caveats 4

  • The checker incurs a precisely characterised and confined set of false positives on opaque value operations.
  • look-ahead-freedom is undecidable-indeed Π0^1-hard-so no analyser can certify freedom for every pipeline one can write (Theorem 3).
  • The artifact reproduces the method and the qualitative claims, not those exact figures.
  • the checker’s cost a precisely characterised and confined set of false positives on opaque value operations.

What’s new here 4

  • Formal definition of look-ahead-freedom as temporal non-interference.
  • Identification of a decidable, value-independent fragment for certification.
  • A linear-time type-and-effect static checker that provides sound certificates.
  • Proof of undecidability boundary (Π0^1-hard) for the full language.