beam#

Backtesting integration with openstef-beam.

Bridges beam’s backtesting interface (BacktestForecasterMixin) to an OpenSTEF CustomForecastingWorkflow. FoundationModelBacktestForecaster wraps a single, already-built workflow instance and reuses it across every backtest window, so an expensive backend (e.g. a loaded ONNX session) is created once and shared — there is no per-window model loading. Every window is forecast by calling the workflow’s own predict(), so the model’s preprocessing (feature selection / covariates) and postprocessing (quantile sorting) apply uniformly.

Foundation models such as Chronos-2 are zero-shot, so fit() is a no-op and the default window config disables training.

Forecasting can run either one window at a time (predict()) or with multiple windows stacked into a single backend call (predict_batch(), enabled by setting batch_size), which beam’s BacktestPipeline selects automatically.

Classes#

FoundationModelBacktestForecaster(**data)

Backtest wrapper around a single, shared forecasting workflow.