bessbidder

An Open-Source Multi-Market Bidding Framework for Energy Storage Systems including European Day-ahead and Intraday Markets

https://github.com/kim-mskw/bessbidder

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

An Open-Source Multi-Market Bidding Framework for Energy Storage Systems including European Day-ahead and Intraday Markets

Basic Info
  • Host: GitHub
  • Owner: kim-mskw
  • License: agpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 2.33 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

BessBidder: Multi-Market Battery Bidding for Continous Intraday and Day-ahead Market

Python

Continuous Intraday Trading: An Open-Source Multi-Market Bidding Framework for Energy Storage Systems by Kim K. Miskiw, Jan Ludwig, Leo Semmelmann, Christof Weinhardt Presented at the 15th ACM International Conference on Future Energy Systems (ACM e-Energy 2025), Rotterdam


This repository contains the code and data accompanying the paper:

Continuous Intraday Trading: An Open-Source Multi-Market Bidding Framework for Energy Storage Systems Accepted at ACM e-Energy 2025 [Link to paper – coming soon]


Table of Contents

Setup

Create a virtual environment and install dependencies:

bash python -m venv venv source venv/bin/activate pip install -r requirements.txt

Create .env file for credentials:

This file manages all access credentials for the database and APIs. Specify them before starting to work with the notebook. IMPORTANT NOTE: EPEX Spot data is not open-source and for you to use the notebook, you will have to have bought the data.

env ENTSOE_API_KEY=... POSTGRES_DB_NAME=... POSTGRES_DB_HOST=127.0.0.1 POSTGRES_USER=<username> EPEX_SFTP_HOST=... EPEX_SFTP_PORT=... EPEX_SFTP_USER=... EPEX_SFTP_PW=...

Define study scope in config.py

In this file, you can define technical parameters of the model, the time horizon, and output paths. Please configure these settings before starting data acquisition, as the download depends on your study setup.

Database Configuration

To prepare a local PostgreSQL instance:

sql CREATE USER <username>; CREATE DATABASE epex_data; GRANT ALL PRIVILEGES ON DATABASE epex_data TO <username>; ALTER DATABASE epex_data OWNER TO <username>;

Edit pg_hba.conf to set authentication method to trust for local development.

Data Acquisition

Execute the script 01b_data_acquisition.py to fill the database with ENTSO-E and EPEX Spot data for the reproduction of the study. Note that the framework allows downloading data for 2019–2023.

Steps:

  1. Load ENTSO-E generation/load data
  2. Load intraday transaction data (pre/post 2022 formats)

Alternatively, run the scripts in src/data_acquisition/epex_sftp/ directly.

Single-Market Bidding

Day-ahead Market (MILP Benchmark)

Run 02a_single_market_day_ahead_milp.py to compute benchmark DA bids using MILP. Results are saved to output/single_market/day_ahead_milp/.

Intraday Market (Rolling Intrinsic)

Run 02b_single_market_rolling_intrinsic_h.py with CLI arguments:

bash python 02b_single_market_rolling_intrinsic_h.py

Logs will be saved in output/single_market/rolling_intrinsic/ri_basic/

Multi-Market Bidding

Myopic Bidding

Run 03_myopic-multi_market.py to combine MILP-based DA bidding with rolling intrinsic-based intraday bidding.

Coordinated Bidding (Deep Reinforcement Learning)

Data Preparation

Run 04a_transform_data_for_coordinated_multi_market.py to add features (e.g. IDFull) and split train/test data.

Training

Run 04b_train_coordinated_multi_market.py to train the PPO agent. Choose intraday_product_type='H' or 'QH'. Model and tensorboard logs are versioned under output/coordinated_multi_market/.

Testing

Run 04c_test_coordinated_multi_market.py to evaluate agent behavior. This feeds DA decisions into rolling intrinsic logic and outputs test logs and reports.

Results & Plots

Use the following scripts to create figures and tables:

  • plot_ACMeEnergy_Single_Market.py
  • plot_ACMeEnergy_Myopic_Multi_Market.py
  • plot_ACMeEnergy_Coordinated_Multi_Market.py

Plots are saved in their respective output subfolder under figures.

Code Formatting

This repository uses Black for code formatting and pre-commit hooks.

To install:

bash pip install pre-commit pre-commit install

To format all files:

bash pre-commit run --all-files


Contributors

This project was developed in collaboration between members of the Karlsruhe Institute of Technology (KIT).

| Name | Role & Contribution | |-------------------------|-------------------------------------------------------------------------------------| | Kim K. Miskiw | Project lead, DRL model implementation, results nalaysis, repo maintanace, documentation, debugging and validation, writing | | Jan Ludwig | Data pipeline (ENTSO-E, EPEX), DRL model implementation, MILP modelling, rolling intrinsic strategies, debugging and validation | | Leo Semmelmann | Data pipeline (ENTSO-E, EPEX), rolling intrinsic strategies, conceptual support, review | | Christof Weinhardt | Supervisory role, conceptual support

License

This repository is licensed under the GNU Affero General Public License v3.0. This ensures that derivative works must be released under the same license.

Contact

For questions or early access inquiries, contact: kim.miskiw@kit.edu

Owner

  • Name: Kim K. Miskiw
  • Login: kim-mskw
  • Kind: user
  • Company: Karlsruher Institut für Technologie

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this code, please cite our paper:"
title: "Continuous Intraday Trading: An Open-Source Multi-Market Bidding Framework for Energy Storage Systems"
authors:
  - family-names: Miskiw
    given-names: Kim K.
    orcid: https://orcid.org/0009-0009-1389-4844
  - family-names: Ludwig
    given-names: Jan
    orcid: https://orcid.org/0009-0003-2253-1996
  - family-names: Semmelmann
    given-names: Leo
    orcid: https://orcid.org/0000-0001-6735-9518
  - family-names: Weinhardt
    given-names: Christof
    orcid: https://orcid.org/0000-0002-7945-4077
date-released: 2025-06-10
doi: 10.1145/XXXXXXX     # Replace with actual DOI once available
version: 1.0.0
url: https://github.com/yourusername/BessBidder
license: CC-BY-4.0
keywords:
  - Battery Storage
  - Multi-Market Bidding
  - Day-Ahead Market
  - Continous Intraday Market

GitHub Events

Total
  • Watch event: 3
  • Delete event: 2
  • Push event: 8
  • Pull request review event: 1
  • Pull request event: 5
  • Fork event: 1
  • Create event: 1
Last Year
  • Watch event: 3
  • Delete event: 2
  • Push event: 8
  • Pull request review event: 1
  • Pull request event: 5
  • Fork event: 1
  • Create event: 1