Skip to content

Machine learning and regression models for day-ahead and balancing market trading of wind power using real-world data from Bornholm wind farms.

Notifications You must be signed in to change notification settings

zoewr/ML-renewable-trading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ML Renewable Trading - Assignment 1

This repository contains the work for Assignment 1 of the Machine Learning for Energy Systems course, focusing on renewable energy trading in day-ahead and balancing electricity markets. The project combines machine learning, regression models, and optimization techniques to forecast wind power production and optimize trading strategies.

Date: September-October 2024


πŸ“Œ Project Overview

The assignment simulates the role of a wind farm owner aiming to trade energy in the electricity market. It processes historical wind and climate data from Bornholm, Denmark, along with day-ahead and balancing market prices, to develop predictive models and optimize trading strategies.

Two main modeling approaches were implemented:

  1. Model 1 – Indirect Regression for Trading

    • Predict wind power production using linear and non-linear regression with L1 (Lasso) and L2 (Ridge) regularization.
    • Evaluate models based on prediction accuracy and expected revenue.
    • Explore data clustering (k-means) to improve prediction.
  2. Model 2 – Direct Regression for Trading

    • Use regression or classification models to directly predict the optimal offering strategy for each trading period.
    • Compare performance with Model 1.

πŸ›  Skills & Techniques Demonstrated

  • Data preprocessing and feature engineering
  • Linear and non-linear regression
  • Regularization (L1/Lasso and L2/Ridge)
  • Optimization for energy trading (linear programming)
  • Unsupervised learning (k-means clustering)
  • Model evaluation (RMSE, MAE, RΒ², revenue metrics)
  • Python programming

πŸ“‚ Repository Structure

β”œβ”€β”€ data/ # Raw and processed datasets
β”‚ β”œβ”€β”€ features-targets.csv # Model 1 dataset
β”‚ └── model2_dataset.csv # Model 2 dataset
β”œβ”€β”€ scripts/ # Python scripts for analysis, models, and optimization
β”‚ β”œβ”€β”€ data_collection/ # Functions for dataset generation
β”‚ β”‚ β”œβ”€β”€ data_generator.py
β”‚ β”‚ └── model2datageneration.py
β”‚ β”œβ”€β”€ linear_regression/
β”‚ β”‚ └── linear_regression.py
β”‚ β”œβ”€β”€ nonlinear_regression/
β”‚ β”‚ β”œβ”€β”€ nonlinear_regression.py
β”‚ β”‚ β”œβ”€β”€ nonlinear_regression_metrics.py
β”‚ β”‚ └── weighted_regression.py
β”‚ β”œβ”€β”€ optimization/
β”‚ β”‚ β”œβ”€β”€ bid_optimization.py
β”‚ β”‚ └── revenue_calc.py
β”‚ └── regularization/
β”‚ └── regularization.py
β”œβ”€β”€ main.py # Script to run all relevant programs
└── report.pdf # Assignment report


πŸ“ˆ Key Results

  • Non-linear regression with L2 (Ridge) regularization achieved the highest prediction accuracy for wind power.
  • Model 1 (predictive regression approach) generated the highest expected revenue in day-ahead and balancing markets.
  • Weighted regression and feature expansion improved accuracy, particularly during periods of high variability.

πŸ“Œ Optional Improvements

  • Explore ensemble methods or deep learning models to improve prediction accuracy.
  • Extend analysis to multiple wind farms for portfolio-level trading optimization.
  • Implement real-time prediction and trading workflow for dynamic market conditions.
  • Incorporate additional features such as weather forecasts or intraday market signals.

πŸ‘₯ Contributors

This project was developed in collaboration with:


πŸ“ References

  • Machine Learning for Energy Systems course materials.
  • Historical wind data from Bornholm wind farms (DK2 market area).
  • Day-ahead and balancing market data from Danish DK2 market area.

About

Machine learning and regression models for day-ahead and balancing market trading of wind power using real-world data from Bornholm wind farms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published