Calculates specific net imbalance costs, forecast bias, and RMSE for renewable energy portfolios in the Baltic electricity market, following the methodology of the RTUCON2025 paper (pending indexing in IEEEXplore).
# Windows
setup.bat
# Linux/Mac
chmod +x setup.sh && ./setup.sh# Windows
run_analyzer.bat
# From Spyder: open main.py, set working directory to this folder, press F5Analyzes aggregate national wind/solar portfolios for Latvia, Lithuania, and Estonia using publicly available ENTSO-E Transparency Platform data.
Required input files:
- Actual Generation per Production Type CSV(s) — one or more per country
- Generation Forecasts for Wind and Solar CSV(s) — one or more per country
- Day-ahead price CSV — one per country (format:
Country,ISO3 Code,Datetime (UTC),Datetime (Local),Price (EUR/MWhe)) - Imbalance price CSV — single file from Baltic Balancing Dashboard
Outputs: Tables I–III from the paper (specific costs, bias, RMSE) + visualizations.
Analyzes individual wind/solar plants from standardized CSV files. Computes metrics per plant and for the aggregate portfolio.
Required input files:
- One CSV per plant in the standard template format (see
templates/plant_template.csv) - Day-ahead price CSV (same format as Mode 1)
- Imbalance price CSV (same as Mode 1)
Standard plant CSV format:
datetime_utc,actual_mwh,forecast_mwh,installed_capacity_mw,plant_type
2025-01-01 00:00:00+00:00,4.88,4.85,4.9,windExample files are provided in the templates/ directory.
The core formulas (from the RTUCON2025 paper):
- Hourly net imbalance cost:
C_t = (P_actual - P_forecast) × (π_imb - π_da) - Specific imbalance cost:
C_sp = ΣC_t / ΣP_actual(€/MWh) - Percentage Bias:
PctBias = -Σ(P_actual - P_forecast) / ΣP_actual × 100%- Negative = under-forecasting, Positive = over-forecasting
- RMSE:
sqrt(Σ(P_actual - P_forecast)² / T), normalized vs max generation or installed capacity
When input files cover different time periods, calculations use only the overlapping timespan.
imbalance_cost_analyzer/
├── main.py # Entry point (launch GUI)
├── setup.bat / setup.sh # Environment setup
├── requirements.txt
├── calculations/
│ └── metrics.py # Core formulas
├── data_loaders/
│ ├── entso_loader.py # ENTSO-E actual gen + forecast CSVs
│ ├── price_loader.py # Day-ahead price CSVs
│ ├── imbalance_price_loader.py # Baltic Balancing Dashboard CSV
│ └── plant_loader.py # Standard plant CSV format
├── modes/
│ ├── entso_mode.py # Mode 1 orchestration
│ └── plant_mode.py # Mode 2 orchestration
├── gui/
│ └── app.py # Tkinter GUI
├── visualization/
│ └── plots.py # All charts
├── templates/
│ ├── plant_template.csv # CSV format specification
│ ├── example_wind_plant.csv # Example data
│ └── example_solar_plant.csv # Example data
└── tests/
└── test_core.py # Test suite