RestrictedHorizonVersionedTimeSeries#

class openstef_beam.backtesting.restricted_horizon_timeseries.RestrictedHorizonVersionedTimeSeries(dataset: VersionedTimeSeriesDataset, horizon: datetime) None[source]

Bases: object

Compatibility wrapper for horizon-restricted access.

This is a placeholder that maintains the interface of the old implementation while using the new V4 classes underneath.

Parameters:
__init__(dataset: VersionedTimeSeriesDataset, horizon: datetime) None[source]

Initialize with dataset and horizon.

Parameters:
property feature_names: list[str]

Get feature names from underlying dataset.

get_window(start: datetime, end: datetime, available_before: datetime | None = None) TimeSeriesDataset[source]

Get data window with horizon restriction.

Returns:

DataFrame with data from the specified window.

Parameters:
Return type:

TimeSeriesDataset

get_window_versioned(start: datetime, end: datetime, available_before: datetime | None = None) VersionedTimeSeriesDataset[source]

Get data window with horizon restriction.

Returns:

DataFrame with data from the specified window.

Raises:

ValueError – If available_before is after the horizon.

Parameters:
Return type:

VersionedTimeSeriesDataset