numeraire.testing.check_no_lookahead#
- numeraire.testing.check_no_lookahead(estimator: Any, view_factory: Callable[[], Any]) None[source]#
to_weights/expected_returnsup totare invariant to mutating data aftert.Both multi-date extraction surfaces (a weight stream and a priced cross-section) are handed a view spanning data after
tand must window internally, so a leak — using post-tdata for a<= trow — shows up here as a changed row when the future is perturbed.to_forecastis not probed: the engine only ever passesforecast()a prefix-truncatedview.window(origin), so a forecast at origind <= tcannot see post-tdata and a perturbation probe could never fail — a forecast leak instead surfaces in the zoo’s engine ≡ vectorized equality test (module docstring).