numeraire.core.engine.backtest_panel#
- numeraire.core.engine.backtest_panel(estimator: Estimator, view: CrossSectionView, splitter: Any, *, method: str, config: dict[str, Any] | None = None, data_vintage: str = 'unknown', run_id: str | None = None, n_jobs: int = 1, missing_returns: Literal['error', 'zero', 'renormalize_legs'] = 'error') PanelWeightsOutput[source]#
Walk-forward OOS backtest of a cross-sectional
to_weightsestimator over a ragged panel.Mirrors
backtest_weights()but forCrossSectionView: the fitted model returns long(date, asset)target weights and realized forward returns are aligned by key. Only the mechanically unrealized horizon tail is removed; an earlier missing held return followsmissing_returns(default"error")."renormalize_legs"rescales the observed positive and negative legs separately, preserving target gross/net exposure.n_jobsfans folds over a thread pool (-1= all cores); output order is deterministic. Each fold fits an isolatedcopy.deepcopyofestimator— never the caller’s instance — so folds stay order- and schedule-independent; the estimator must be deepcopy-able and must not share fit-relevant mutable state across copies (seebacktest_weights()).