Day-Ahead Electricity Price Forecaster for Spain (ES)

High-accuracy calibrated quantile LightGBM model for forecasting Spain price. Resolution: hourly intervals. Trained on multi-year data (2023–2026) from ENTSO-E, featuring multi-scale lags, cyclical encodings, and conformal calibration for well-calibrated 80% prediction intervals ($P10, P50, P90$).

Model Highlights

  • Country / Zone: Spain (ES)
  • Target: Day-Ahead Electricity Price in EUR/MWh
  • Resolution: hourly intervals
  • Outputs: Point forecast ($P50$), 80% prediction interval ($P10$ to $P90$)
  • Algorithm: LightGBM Multi-Quantile Regressor with Conformal Calibration & Monotonicity
  • Dataset: ENTSO-E European Transparency Platform (Zone: ES)
  • Training Samples: 19,455 observations (2023–2026)

Performance & Benchmark Comparison

Evaluated on out-of-sample test sets against official seasonal persistence benchmarks:

Metric LightGBM Forecaster 7-Day Seasonal Persistence Improvement
MAE 6.039 EUR/MWh 46.815 EUR/MWh +87.1%
RMSE 10.302 EUR/MWh β€” β€”
  • WAPE: 9.79% | P10 Pinball Loss | 1.495 | β€” | β€” | | P90 Pinball Loss | 1.949 | β€” | β€” | | P10–P90 Interval Coverage | 80.2% | β€” | Target: 75–85% | | Winkler Score | 34.444 | β€” | β€” |

Quickstart: Python Inference

import pandas as pd
from huggingface_hub import hf_hub_download
import joblib

# 1. Download model artifacts
model_path = hf_hub_download(repo_id="ORGANIZATION/spain-price-forecaster", filename="models.joblib")
models = joblib.load(model_path)

# 2. Predict P10, P50 (point), and P90 quantiles
X_test = pd.read_csv("sample_input.csv")
p10 = models[0.1].predict(X_test)
p50 = models[0.5].predict(X_test)
p90 = models[0.9].predict(X_test)

print("Forecast Point Estimate:", p50[:5])
print("80% Lower Bound (P10):", p10[:5])
print("80% Upper Bound (P90):", p90[:5])

Features Used

The model uses 37 leakage-safe features:

  • hour
  • quarter
  • day_of_week
  • day_of_year
  • month
  • is_weekend
  • is_holiday
  • is_morning_peak
  • is_evening_peak
  • sin_hour
  • cos_hour
  • sin_day_of_week
  • cos_day_of_week
  • sin_day_of_year
  • cos_day_of_year
  • lag_1h
  • lag_2h
  • lag_3h
  • lag_4h
  • lag_24h
  • lag_48h
  • lag_7d
  • lag_14d
  • diff_1h
  • diff_2h
  • diff_24h
  • diff_7d
  • acceleration_1h
  • ema_4step
  • ema_12step
  • rolling_std_4step
  • rolling_mean_24h
  • rolling_std_24h
  • rolling_min_24h
  • rolling_max_24h
  • rolling_mean_7d
  • rolling_std_7d

Intended Use & Advisory

This model is intended for research, energy market analytics, grid load planning, and educational forecasting demonstrations. It is advisory only and not intended for automated trading execution or real-time grid dispatch.

Citation & Attribution

Data published under the ENTSO-E Transparency framework:

Downloads last month
11
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train hsilvosa/spanish-day-ahead-price-forecaster

Evaluation results

  • MAE on ENTSO-E Spain Bidding Zone (ES)
    self-reported
    6.039
  • RMSE on ENTSO-E Spain Bidding Zone (ES)
    self-reported
    10.302
  • Empirical Interval Coverage (80% Nominal) on ENTSO-E Spain Bidding Zone (ES)
    self-reported
    80.2%