Day-Ahead Electricity Price Forecasting

Michael Atkin
December 17, 2022

Submitted as coursework for PH240, Stanford University, Fall 2022

Introduction

Fig. 1: Electricity pylon. (Source: Wikimedia Commons)

Electricity (pictured in Fig. 1) price forecasting is an important problem for both energy buyers and sellers. Forecasting can occur at different time scales: hourly, daily, yearly, and so on. In this report we consider day-ahead price prediction.

There is a plethora of literature on day-ahead electricity price prediction, but unfortunately little standardization among papers. Different papers test their methods on different energy markets and time periods, so comparisons between methods are difficult. J. Lago et al. limit their survey to two models, an autoregressive model and a deep neural network, which are tested on an identical dataset. [1]

Background

The models are tasked with predicting day-ahead prices of the Belgian electricity market (EPEX-BE). EPEX-BE is operated by the European Power Exchange. Both buyers and sellers in the market are members of the European Power Exchange. Members can place both buy and sell orders, which specify the quantity of electricity they would like to buy or sell. Buyers specify a maximum price they are wiling to pay, and sellers specify a minimum price they are willing to sell for. Orders must be paced by 12pm each day.

The European Power exchange uses these orders to calculate supply and demand curves. The intersection of the curves is called the market clearing price. All buyers which placed an order at or above the market clearing price buy that quantity of electricity, and all sellers which placed an order at or below the market clearing price sell that quantity of electricity. The market clearing price is published and the orders are executed at 12:55pm.

A few additional details:

Problem Statement

Each model is tasked with predicting day-ahead prices over a 5 year period, from September 1st, 2011 to December 31st, 2016.

The four metrics on which we evaluate the models are

Absolute Mean Error: MAE = 1
n
n

t=1
| At - Ft|
Mean Absolute
Percentage Error:
MAPE = 100%
n
n

t=1
| At - Ft|
At
Symmetric Mean Absolute   
Percentage Error:
sMAPE = 100%
n
n

t=1
| At - Ft
(At + Ft)/2
|
Root Mean Square Error: rMSE =
[ 1
n
n

t=1
( At - Ft )2 ]1/2

For all metrics, we compare A, the actual value, to F, the forecasted value. We iterate over all days in our dataset. n denotes the total number of datapoints. For our problem, we have 1826 days between September 1, 2011 and December 31, 2016, so we have n = 1826 datapoints.

Lasso Estimate Autoregresssive Model (LEAR)

This method combines an autoregressive model with the LASSO method. Autoregressive models make the assumption that model output depends on previous output. It is intuitively a good match with time-series data, such as electricity prices. LASSO is a variable selection procedure. [2] It uses L1 regularization, meaning it linearly penalizes model parameters. This encourages a small model, which prevents overfitting.

Deep Neural Network (DNN)

This method uses a 4-layer feedforward neural network. Optimization is done via gradient descent using the Adam optimizer. [3] Most model attributes are selected via hyperparameter optimization, such as neurons per layer, learning rate, and weight initialization. Additionally, the model includes binary hyperparameters which determine which input features to include or exclude. Intuitively, this lets the model adapt its attributes to different markets.

Results

Table 1 includes results for the two proposed methods evaluated on the day-ahead electricity market in Belgium. For each method, Lago et al. generate 4 versions of the model, each with different hyperparameters. [1] "Ensemble" denotes the arithmetic mean of the outputs of all 4 models, and "Best" denotes the best performing model out of the four. We see that the results are ambiguous: no one model performs best on all metrics.

There are a number of limitations to the results. For one, the models are only evaluated on the Belgian energy market for a specific time period. There is no guarantee good results on the Belgian energy market would generalize to other energy markets, or even to the Belgian energy market for a different time period. Additionally, the input provided to the model is limited. In practice, electricity buyers and sellers would likely input additional data into their model, for instance weather data.

Model MAE MAPE (%) sMAPE (%) rMSE
DNN Ensemble 5.870 24.892 13.446 15.966
Best DNN 6.068 25.466 14.106 15.950
LEAR Ensemble 6.140 20.720 14.546 15.974
Best LEAR 6.594 26.256 16.867 16.458
Table 1: Model performance on day-ahead electricity price prediction performance.

© Michael Atkin. The author warrants that the work is the author's own and that Stanford University provided no input other than typesetting and referencing guidelines. The author grants permission to copy, distribute and display this work in unaltered form, with attribution to the author, for noncommercial purposes only. All other rights, including commercial rights, are reserved to the author.

References

[1] J. Lago et al., "Forecasting Day-Ahead Electricity Prices: A Review of State-of-the-Art Algorithms, Best Practices and an Open-Access Benchmark," Appl. Energy 293, 116983 (2021).

[2] V. Roth, "The Generalized LASSO," IEEE 1263575, IEEE Trans. Neural Netw. 15, 16 (2004).

[3] Z. Zhang, "Improved Adam Optimizer For Deep Neural Aetworks," IEEE 8624183, IEEE/ACM 26th International Symposium on Quality of Service, 4 Jun 18.