Masters Thesis: Using Statistical and Machine Learning Methods to Forecast Day-Ahead Electricity Prices
The application of Neural Networks (NN) in trading and price forecasting in energy markets is increasingly gaining attention. Specifically, the use of machine learning (ML) in predicting energy market behaviors has been a focal point of several studies and industry applications. However, the rapid evolution of power systems presents challenges and opportunities for ML applications in this field. This project delves into these aspects, exploring the effectiveness and adaptability of ML models in the context of the Great Britain (GB) electricity market.
code/
: Code for data processing, model training, and analysis.docs/
: Documentation including final reports.logbook/
: Notes and progress from meetings, research findings.code/data/
: Contains datasets used for model training and analysis.presentations/
: Slides and materials for the presentation.
Clone the repository and navigate to the directory
$ git clone https://github.com/hamedm15/ML-Forecasting-Electricity-Prices.git
$ cd ML-Forecasting-Electricity-Prices
LOCAL : Run setup.sh
to create the conda environments and install all the required dependencies to avoid conflicts
./setup.sh
HPC : After SSHing into the server and cloning the repository, run setup_hpc.sh
./setup_hpc.sh
This repository provides three modelling frameworks for electricity price forecasting:
gLEAR
- Global (fully multivariate) LASSO Estiamted Autoregressive Model24LEAR
- Separable (set of 24 univariate) LASSO Estiamted Autoregressive ModelsDNN
- Deep Neural Netowork Model
The code below, runs all three frameworks over all the specified calibration windows
LOCAL :
chmod +x run.sh
./run.sh
HPC :
chmod +x run_hpc.sh
screen
./run_hpc.sh
Navigate to the examples folder and check the existing examples to get you started. The examples include several applications of the two state-of-the art forecasting model: a deep neural net and the LEAR model.
- Data management :
preprocessing.py
. - Forecasting Models :
LEAR.py
andDNN.py
. - Python Notebook to display results and plots :
analysis.ipynb
. - Diebold-Mariano (DM) and Giacomini-White (GW) tests :
statisticaltests.py
. - Auxiliary Functions :
auxiliary.py
.
Code was adapted and taken from the following open-source library
- Github Repository (AGPL-3.0 License)
- Documentation
Reference: Jesus Lago, Grzegorz Marcjasz, Bart De Schutter, Rafał Weron, "Forecasting day-ahead electricity prices: A review of state-of-the-art algorithms, best practices and an open-access benchmark", Applied Energy 2021.
This project is part of a Masters Thesis at Imperial College London, under the guidance of Dr. Elina Spyrou. For detailed information, refer to the linked studies and the documentation within this repository.