Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ ElectriCast

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.


Pipeline Overview

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)

Project Structure

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/

Quickstart

# 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/

Models

Model Type Use
LASSO Linear, regularized Interpretable baseline
XGBoost Gradient boosting Strong tabular baseline
TFT Transformer (PyTorch) Probabilistic multi-horizon

Dispatch Optimization

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.


Data Sources


Requirements

  • Python ≥ 3.10
  • See requirements.txt

About

Testing different Ml methods for forecasting electricity prices.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages