numeraire.core.engine.backtest_weights#

numeraire.core.engine.backtest_weights(estimator: Estimator, view: TimeSeriesView, splitter: Any, *, method: str, config: dict[str, Any] | None = None, data_vintage: str = 'unknown', run_id: str | None = None, n_jobs: int = 1) WeightsOutput[source]#

Run a walk-forward OOS backtest of a to_weights estimator over view.

Parameters:
  • estimator – Anything conforming to Estimator; the fitted model must support SupportsWeights.

  • splitter – Any object with split(view) -> Iterator[(train, test)] (e.g. WalkForwardSplitter).

  • config – Preprocessing/method config, hashed into every result row’s config_hash.

  • n_jobs – Fan the independent (train, test) folds over a thread pool (-1 = all cores). Order-preserving, so the result is identical to the serial n_jobs=1 default.