Direct vs. Recursive Prediction
EPF uses a direct prediction strategy for multi-step forecasting, where each forecast horizon group has its own dedicated model. This avoids the error propagation problem inherent in recursive approaches.
The Two Approaches
Recursive Prediction
A single model predicts one step ahead. To forecast further, its own predictions are fed back as inputs:
Step 1: model(features_t) → price_t+1Step 2: model(features_t, price_t+1) → price_t+2Step 3: model(features_t, price_t+1, price_t+2) → price_t+3...Problem: Errors compound. If the model overpredicts at step 1, that error propagates into step 2’s inputs, which propagates into step 3, and so on. By hour 168 (7 days ahead), accumulated errors can be substantial.
Direct Prediction
Separate models are trained for different horizon groups. Each model predicts its target hours directly from features available at the forecast origin:
Model_DA1: features_at_origin → prices for hours 14-25 aheadModel_DA2: features_at_origin → prices for hours 26-37 aheadModel_S1: features_at_origin → prices for hours 33-56 ahead...Advantage: No error propagation. An error in the D+1 forecast has zero impact on the D+3 forecast, because they come from independent models.
Why Direct Works for EPF
Feature Design
In the direct approach, all features are computed relative to the forecast origin (time t), not relative to the target hour. This means:
- Price lags reference actual observed prices at the origin:
price_lag_1h,price_lag_24h,price_lag_168h - Weather features include both observations at the origin and forecasts at the target hour
- Target-hour features provide the model with temporal context: which hour, which day of week, how far ahead
Each model learns the relationship between current conditions and prices at a specific future distance, rather than trying to learn a single one-step-ahead relationship applied repeatedly.
Horizon Groups Balance Specialization and Data
Rather than training a separate model for every single hour (which would fragment the training data), horizons are grouped:
| Group | Hours Ahead | Rationale |
|---|---|---|
| DA1 | 14–25 | D+1 morning hours |
| DA2 | 26–37 | D+1 afternoon/evening hours |
| S1 | 33–56 | D+2 (1-day ahead strategic) |
| S2 | 57–80 | D+3 |
| S3 | 81–104 | D+4 |
| S4 | 105–128 | D+5 |
| S5 | 129–176 | D+6 and D+7 combined |
Hours within the same group share a trained model. The hours_ahead feature allows the model to differentiate between individual hours within a group.
Tree Models Handle NaN Natively
A practical benefit of the direct approach with gradient boosting models: features that aren’t available for certain horizons (like D+1 published prices in the morning run) are simply set to NaN. Tree-based models handle missing values natively by learning optimal split directions for NaN values during training — no imputation required.
Trade-offs
| Aspect | Direct | Recursive |
|---|---|---|
| Error propagation | None | Compounds over horizons |
| Number of models | Multiple (7 groups) | Single |
| Training time | Higher (train N models) | Lower (train 1 model) |
| Feature design | Relative to origin | Relative to each step |
| Missing values | Clean NaN handling | Requires imputation |
For EPF’s 7-day horizon, the elimination of error propagation decisively favors the direct approach. The additional training cost is manageable — 7 horizon groups × 3 model types = 21 models per product, each training in seconds on modern hardware.