assert_no_lookahead

forge.testingfunctionSince Forge API 1
Signaturepython
forge.testing.assert_no_lookahead(strategy: str | os.PathLike[str] | type[Strategy],bars: SampleBars | pd.DataFrame | None = None,params: Mapping[str, Any] | None = None,**kwargs: Any) -> None

Fail unless the look-ahead audit shows no evidence of look-ahead.

Parameters

NameTypeDefault
strategystr | os.PathLike[str] | type[Strategy]
barsSampleBars | pd.DataFrame | NoneNone
paramsMapping[str, Any] | NoneNone
**kwargsAny

The failure names the verdict, the reason when there is one, and the first three differences with their series and bars. A verdict of inconclusive fails too: an audit that could not judge has shown nothing. The arguments are those of check_lookahead.