ML-Powered Electricity Price Forecasting & Optimal Dispatch
ElectriCast forecasts day-ahead electricity spot prices (EPEX Spot / ENTSO-E) and feeds those forecasts into a stochastic optimization engine to simulate optimal energy dispatch for a wind + battery storage asset.
ENTSO-E API + Open-Meteo
│
▼
Feature Engineering
(calendar, weather, market lags)
│
▼
Forecasting Models
LASSO → XGBoost → TFT (PyTorch)
│
▼
Uncertainty Quantification
(Conformal Prediction Intervals)
│
▼
Dispatch Optimization
(LP / Stochastic SAA via SciPy)
electricast/
├── config/params.yaml # All hyperparameters & paths
├── data/
│ ├── raw/ # Downloaded ENTSO-E data (gitignored)
│ ├── processed/ # Feature-engineered datasets
│ └── fetch.py # ENTSO-E + Open-Meteo data fetchers
├── notebooks/
│ ├── 01_eda.ipynb
│ ├── 02_features.ipynb
│ ├── 03_modeling.ipynb
│ └── 04_dispatch.ipynb
├── electricast/
│ ├── features/ # Calendar, weather, market features
│ ├── models/ # LASSO, XGBoost, TFT
│ ├── evaluation/ # Metrics + conformal prediction
│ └── dispatch/ # LP and stochastic dispatch
├── tests/
└── reports/figures/
# 1. Clone & install
git clone https://github.com/youruser/electricast.git
cd electricast
pip install -r requirements.txt
# 2. Set your ENTSO-E API key
export ENTSOE_API_KEY="your_key_here" # free at transparency.entsoe.eu
# 3. Fetch data (France, last 2 years)
python data/fetch.py --country FR --years 2
# 4. Run the full pipeline
python -m electricast.pipeline
# 5. Explore notebooks (recommended first step)
jupyter lab notebooks/| Model | Type | Use |
|---|---|---|
| LASSO | Linear, regularized | Interpretable baseline |
| XGBoost | Gradient boosting | Strong tabular baseline |
| TFT | Transformer (PyTorch) | Probabilistic multi-horizon |
Given day-ahead price forecasts and a wind + battery asset:
- LP dispatch: deterministic, single price trajectory
- Stochastic SAA: sample N forecast scenarios → solve N LPs → average policy
Benchmarked against a perfect-foresight upper bound.
- Prices: ENTSO-E Transparency Platform — free API key required
- Weather: Open-Meteo — free, no key required
- Python ≥ 3.10
- See
requirements.txt