Evaluation

class omnicast.Backtester(horizon=1, initial=None, step=1, metric='rmse')[source]

Bases: object

Expanding-window rolling-origin backtest.

Parameters:
  • horizon (int)

  • initial (int | None)

  • step (int)

  • metric (str)

run(model, y)[source]

Evaluate model on expanding-window temporal splits of y.

Returns:

Fold scores (cutoff, score, n_train) in .scores, per-step out-of-sample predictions in .predictions, plus .summary()/.plot().

Return type:

BacktestResult

Raises:

ValueError – If initial and horizon leave no validation observations.

Parameters:
omnicast.backtest(model, y, horizon=1, initial=None, step=1, metric='rmse')[source]

Evaluate a forecaster on expanding-window temporal splits.

One-shot wrapper over Backtester(...).run(model, y).

Return type:

BacktestResult

Parameters: