numeraire.core.engine.backtest_pricing#
- numeraire.core.engine.backtest_pricing(estimator: Estimator, view: Any, splitter: Any, *, method: str, config: dict[str, Any] | None = None, data_vintage: str = 'unknown', run_id: str | None = None, n_jobs: int = 1) PricingOutput[source]#
Walk-forward OOS pricing of a
to_pricingestimator: pooled predicted vs realized panels.Mirrors
backtest_weights(): for each(train, test)fold the estimator is fit on the PIT train window and its fitted model prices the test window viaexpected_returns(); realized(t, t+h]returns are pulled from the fullview(never the model), and the per-fold cross-sections are pooled into one(date x asset)panel pair taggedprotocol="walk_forward". Works on aTimeSeriesView(SDF-style N-asset block) or aCrossSectionView(characteristic panel).n_jobsfans the folds over a thread pool (-1= all cores); order-preserving, so identical output.