Config-driven loaders for the merged ENTSO-E interim CSV, suitable for the data_loader / test_data_loader hooks on ConfigEntsoe. Ported from spotforecast2.tasks.task_entsoe ahead of that subpackage’s removal.
Return the merged ENTSO-E CSV sliced to the forecast horizon.
The slice spans (end_train, end_train + predict_size * 1 h] so that build_prediction_package’s test_actual = ts.reindex(future_pred.index) matches the hourly forecast row-for-row. end_train is taken from config.end_train_default (treated as the inclusive last training timestamp, the same convention the forecaster uses), and the step is assumed to be 1 h after the pipeline’s hourly resampling.
For the live ENTSO-E exemplar with end_train_default = D-2 23:00 UTC and predict_size = 24, this returns the rows for [D-1 00:00, D 00:00) — i.e., y_{-1}. For backtests at an arbitrary end_train_default, it returns the post-cutoff window the model is actually predicting, rather than always “yesterday in wall-clock UTC”.
Parameters
Name
Type
Description
Default
config
ConfigEntsoe
A ConfigEntsoe with data_filename, end_train_default, and predict_size set; the merged interim CSV must already contain data covering the forecast horizon (run spotforecast2-entsoe download first).