Intraday Electricity Price Forecasting via LSTM and Trading Strategy for the Power Market: A Case Study of the West Denmark DK1 Grid Region
Abstract
:1. Introduction and Background
2. Data and Methods
2.1. Data
2.2. LSTM
2.3. Trading Strategy
3. Results
3.1. LSTM Predictions
3.2. Comparison with Other Benchmark Methods
3.3. Trading Strategy Results
4. Discussion and Concluding Remarks
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
AIC | Akaike information criterion |
ANN | Artificial neural network |
CEST | Central European Summer Time |
CET | Central European Time |
CNN | Convolutional neural network |
COVID-19 | Coronavirus disease 2019 |
DK1 | West Denmark grid region |
DK2 | East Denmark grid region |
DNN | Deep neural network |
EPF | Electricity price forecasting |
EUR | Euro |
EVS | Explained variance score |
GARCH | Generalized autoregressive conditional heteroskedasticity |
KNN | K-nearest neighbor |
lightGBM | Light gradient-boosting machine |
LSTM | Long short-term memory |
MAE | Mean absolute error |
MdAE | Median absolute error |
ME | Maximum error |
MW | Megawatt |
MWh | Megawatt-hour |
RBF | Radial basis function |
ReLU | Rectified linear unit |
RMSE | Root mean square error |
RNN | Recurrent neural network |
SARIMA | Seasonal autoregressive integrated moving average |
SRMSE | Scaled root mean square error |
SVM | Support vector machine |
SVR | Support vector regression |
XGBoost | Extreme gradient boosting |
Appendix A
Models | Python Packages and Hyperparameter Space Sets |
---|---|
XGBoost | xgboost.XGBRegressor Number of estimators: [5, 10, 50, 100, 500, 1000] Max depth: range (1, 12, 1) Min child weight: [4, 5] Gamma: (0.3, 0.5, 0.1) Subsample: range (0.6, 1.0, 0.1) Colsample_bytree: range (0.6, 1, 0.1) Booester: [gbtree, gblinear] Eta: range (0.3, 1, 0.1) Learning rate: [0.001, 0.01, 0.1, 1] |
Random forest | sklearn.ensemble.RandomForestRegressor Number of estimators: [5, 10, 50, 100, 500, 1000] Max depth: range (1, 12, 1) Min samples leaf: range (1, 4, 1) Criterion: [gini, entropy, log loss] |
LightGBM | lightgbm.LGBMRegressor Number of estimators: [50, 100, 200, 500, 1000] Max depth: range (1, 12,1) Number of leaves: [7, 14, 21, 28, 31, 50] Learning rate: [0.1, 0.03, 0.003] |
SVR-RBF | sklearn.svm.SVR C: [1 × 100, 1 × 101, 1 × 102, 1 × 103] Gamma: [scale, auto] Kernel: [linear, poly, sigmoid, rbf] |
KNN | sklearn.neighbors.KNeighborsRegressor Algorithm: [auto, ball tree, kd tree, brute] N-neighbors: range (1, 20, 1) P: range (1, 2, 0.1) Leaf size: range (10, 40, 10) |
SARIMA | statsmodels.tsa.statespace.sarimax, pmdarima p: range (0, 3, 1) d: range (0, 2, 1) q: range (0, 3, 1) P: range (0, 3, 1) D: [0, 1] Q: range (0, 3, 1) m: [1, 4, 6, 12, 24] |
CNN & LSTM | tensorflow, keras Batch size: [4, 8, 16, 32, 64, 128] Number of epochs: range (10, 100, 10) Dropout rate: range (0, 1, 0.1) Activation: [relu, sigmoid, softmax, tanh, selu, elu, leaky_relu, linear] Number of filters in the convolution or nodes in the hidden layer: [1, 2, 4, 8, 16, 32, 64, 128, 256] Optimizer: [Adam, SGD, RMSprop] Learning rate: [1 × 10−1, 1 × 10−2, 1 × 10−3, 1 × 10−4, 1 × 10−5] |
RMSE | |
SRMSE | |
MAE | |
EVS | |
ME | |
MdAE |
OS Platform | Windows 10 |
Processor | Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz |
Memory (RAM) | 8 GB |
Conda version | 4.12.0 |
Conda-build version | 3.21.6 |
Python version | 3.9.7 |
TensorFlow version | 2.10.0 |
Keras version | 2.10.0 |
References
- Maciejowska, K.; Nitka, W.; Weron, T. Day-Ahead vs. Intraday—Forecasting the Price Spread to Maximize Economic Benefits. Energies 2019, 12, 631. [Google Scholar] [CrossRef]
- Johannesen, N.J.; Kolhe, M.; Goodwin, M. Deregulated Electric Energy Price Forecasting in NordPool Market using Regression Techniques. In Proceedings of the 2019 IEEE Sustainable Power and Energy Conference (iSPEC), Beijing, China, 21–23 November 2019; pp. 1932–1938. [Google Scholar] [CrossRef]
- Matsumoto, T.; Endo, M. One-week-ahead electricity price forecasting using weather forecasts, and its application to arbitrage in the forward market: An empirical study of the Japan Electric Power Exchange. J. Energy Mark. 2021, 14, 39–64. [Google Scholar] [CrossRef]
- Kuo, P.H.; Huang, C.J. An Electricity Price Forecasting Model by Hybrid Structured Deep Neural Networks. Sustainability 2018, 10, 1280. [Google Scholar] [CrossRef]
- Wang, K.; Yu, M.; Niu, D.; Liang, Y.; Peng, S.; Xu, X. Short-term electricity price forecasting based on similarity day screening, two-layer decomposition technique and Bi-LSTM neural network. Appl. Soft Comput. 2023, 136, 110018. [Google Scholar] [CrossRef]
- Jasiński, T. Use of new variables based on air temperature for forecasting day-ahead spot electricity prices using deep neural networks: A new approach. Energy 2020, 213, 118784. [Google Scholar] [CrossRef]
- Hagemann, S. Price determinants in the German intraday market for electricity: An empirical analysis. J. Energy Mark. 2015, 8, 21–45. [Google Scholar] [CrossRef]
- Klyve, O.S.; Nygård, M.M.; Riise, H.N.; Fagerström, J.; Marstein, E.S. The value of forecasts for PV power plants operating in the past, present and future Scandinavian energy markets. Sol. Energy 2023, 255, 208–221. [Google Scholar] [CrossRef]
- Badanjak, D.; Pavić, I.; Capuder, T. Data driven approach for analyzing and correlating energy market products: Case studies of Denmark and Croatia. CSEE J. Power Energy Syst. 2023, 1–19. [Google Scholar] [CrossRef]
- Li, W.; Becker, D.M. Day-ahead electricity price prediction applying hybrid models of LSTM-based deep learning methods and feature selection algorithms under consideration of market coupling. Energy 2021, 237, 121543. [Google Scholar] [CrossRef]
- Chang, Z.; Zhang, Y.; Chen, W. Electricity price prediction based on hybrid model of adam optimized LSTM neural network and wavelet transform. Energy 2019, 187, 115804. [Google Scholar] [CrossRef]
- Lu, H.; Ma, X.; Ma, M.; Zhu, S. Energy price prediction using data-driven models: A decade review. Comput. Sci. Rev. 2021, 39, 100356. [Google Scholar] [CrossRef]
- Sridharan, V.; Tuo, M.; Li, X. Wholesale Electricity Price Forecasting Using Integrated Long-Term Recurrent Convolutional Network Model. Energies 2022, 15, 7606. [Google Scholar] [CrossRef]
- Wang, F.; Li, K.; Zhou, L.; Ren, H.; Contreras, J.; Shafie-khah, M.; Catalão, J.P. Daily pattern prediction based classification modeling approach for day-ahead electricity price forecasting. Int. J. Electr. Power Energy Syst. 2019, 105, 529–540. [Google Scholar] [CrossRef]
- Shao, Z.; Zheng, Q.; Liu, C.; Gao, S.; Wang, G.; Chu, Y. A feature extraction- and ranking-based framework for electricity spot price forecasting using a hybrid deep neural network. Electr. Power Syst. Res. 2021, 200, 107453. [Google Scholar] [CrossRef]
- Demir, S.; Kok, K.; Paterakis, N.G. Statistical arbitrage trading across electricity markets using advantage actor–critic methods. Sustain. Energy Grids Netw. 2023, 34, 101023. [Google Scholar] [CrossRef]
- Lago, J.; Marcjasz, G.; De Schutter, B.; Weron, R. Forecasting day-ahead electricity prices: A review of state-of-the-art algorithms, best practices and an open-access benchmark. Appl. Energy 2021, 293, 116983. [Google Scholar] [CrossRef]
- Oksuz, I.; Ugurlu, U. Neural Network Based Model Comparison for Intraday Electricity Price Forecasting. Energies 2019, 12, 4557. [Google Scholar] [CrossRef]
- Panapakidis, I.P.; Dagoumas, A.S. Day-ahead electricity price forecasting via the application of artificial neural network based models. Appl. Energy 2016, 172, 132–151. [Google Scholar] [CrossRef]
- Tschora, L.; Pierre, E.; Plantevit, M.; Robardet, C. Electricity price forecasting on the day-ahead market using machine learning. Appl. Energy 2022, 313, 118752. [Google Scholar] [CrossRef]
- Qiao, W.; Yang, Z. Forecast the electricity price of U.S. using a wavelet transform-based hybrid model. Energy 2020, 193, 116704. [Google Scholar] [CrossRef]
- Huang, C.J.; Shen, Y.; Chen, Y.H.; Chen, H.C. A novel hybrid deep neural network model for short-term electricity price forecasting. Int. J. Energy Res. 2021, 45, 2511–2532. [Google Scholar] [CrossRef]
- de Simón-Martín, M.; Bracco, S.; Rosales-Asensio, E.; Piazza, G.; Delfino, F.; Giribone, P.G. Electricity Spot Prices Forecasting for MIBEL by using Deep Learning: A comparison between NAR, NARX and LSTM networks. In Proceedings of the 2020 IEEE International Conference on Environment and Electrical Engineering and 2020 IEEE Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Madrid, Spain, 9–12 June 2020; pp. 1–6. [Google Scholar] [CrossRef]
- Acaroğlu, H.; Márquez, F.P.G. Comprehensive Review on Electricity Market Price and Load Forecasting Based on Wind Energy. Energies 2021, 14, 7473. [Google Scholar] [CrossRef]
- Weron, R. Electricity price forecasting: A review of the state-of-the-art with a look into the future. Int. J. Forecast. 2014, 30, 1030–1081. [Google Scholar] [CrossRef]
- Kılıç, D.K.; Uğur, O. Hybrid wavelet-neural network models for time series. Appl. Soft Comput. 2023, 144, 110469. [Google Scholar] [CrossRef]
- Scholz, C.; Lehna, M.; Brauns, K.; Baier, A. Towards the Prediction of Electricity Prices at the Intraday Market Using Shallow and Deep-Learning Methods. In Mining Data for Financial Applications; Bitetta, V., Bordino, I., Ferretti, A., Gullo, F., Ponti, G., Severini, L., Eds.; Springer: Cham, Switzerland, 2021; pp. 101–118. [Google Scholar] [CrossRef]
- Lago, J.; De Ridder, F.; De Schutter, B. Forecasting spot electricity prices: Deep learning approaches and empirical comparison of traditional algorithms. Appl. Energy 2018, 221, 386–405. [Google Scholar] [CrossRef]
- Memarzadeh, G.; Keynia, F. Short-term electricity load and price forecasting by a new optimal LSTM-NN based prediction algorithm. Electr. Power Syst. Res. 2021, 192, 106995. [Google Scholar] [CrossRef]
- Jaimes, D.M.; López, M.Z.; Zareipour, H.; Quashie, M. A Hybrid Model for Multi-Day-Ahead Electricity Price Forecasting considering Price Spikes. Forecasting 2023, 5, 499–521. [Google Scholar] [CrossRef]
- Zhang, R.; Li, G.; Ma, Z. A Deep Learning Based Hybrid Framework for Day-Ahead Electricity Price Forecasting. IEEE Access 2020, 8, 143423–143436. [Google Scholar] [CrossRef]
- Hong, T.; Pinson, P.; Wang, Y.; Weron, R.; Yang, D.; Zareipour, H. Energy Forecasting: A Review and Outlook. IEEE Open Access J. Power Energy 2020, 7, 376–388. [Google Scholar] [CrossRef]
- Maciejowska, K.; Uniejewski, B.; Serafin, T. PCA Forecast Averaging—Predicting Day-Ahead and Intraday Electricity Prices. Energies 2020, 13, 3530. [Google Scholar] [CrossRef]
- Narajewski, M.; Ziel, F. Econometric modelling and forecasting of intraday electricity prices. J. Commod. Mark. 2020, 19, 100107. [Google Scholar] [CrossRef]
- Uribe, J.M.; Mosquera-López, S.; Guillen, M. Characterizing electricity market integration in Nord Pool. Energy 2020, 208, 118368. [Google Scholar] [CrossRef]
- Gonçalves, C.; Pinson, P.; Bessa, R.J. Towards Data Markets in Renewable Energy Forecasting. IEEE Trans. Sustain. Energy 2021, 12, 533–542. [Google Scholar] [CrossRef]
- Yang, Y.; Guo, J.; Li, Y.; Zhou, J. Forecasting day-ahead electricity prices with spatial dependence. Int. J. Forecast. 2023, 40, 1255–1270. [Google Scholar] [CrossRef]
- Lucic, M.; Xydis, G. Performance of the autoregressive integrated moving average model with exogenous variables statistical model on the intraday market for the Denmark-West bidding area. Energy Environ. 2023, 1–37. [Google Scholar] [CrossRef]
- Shinde, P.; Kouveliotis-Lysikatos, I.; Amelin, M. Analysing Trading Trends in Continuous Intraday Electricity Markets. In Proceedings of the 2021 56th International Universities Power Engineering Conference (UPEC), Middlesbrough, UK, 31 August–3 September 2021; pp. 1–6. [Google Scholar] [CrossRef]
- Gabrielli, P.; Wüthrich, M.; Blume, S.; Sansavini, G. Data-driven modeling for long-term electricity price forecasting. Energy 2022, 244, 123107. [Google Scholar] [CrossRef]
- Hu, X.; Jaraitė, J.; Kažukauskas, A. The effects of wind power on electricity markets: A case study of the Swedish intraday market. Energy Econ. 2021, 96, 105159. [Google Scholar] [CrossRef]
- Soini, V. Wind power intermittency and the balancing power market: Evidence from Denmark. Energy Econ. 2021, 100, 105381. [Google Scholar] [CrossRef]
- Suárez-Cetrulo, A.L.; Burnham-King, L.; Haughton, D.; Carbajo, R.S. Wind power forecasting using ensemble learning for day-ahead energy trading. Renew. Energy 2022, 191, 685–698. [Google Scholar] [CrossRef]
- Maciejowska, K.; Nitka, W.; Weron, T. Enhancing load, wind and solar generation for day-ahead forecasting of electricity prices. Energy Econ. 2021, 99, 105273. [Google Scholar] [CrossRef]
- Jørgensen, K.L.; Shaker, H.R. Wind Power Forecasting Using Machine Learning: State of the Art, Trends and Challenges. In Proceedings of the 2020 IEEE 8th International Conference on Smart Energy Grid Engineering (SEGE), Oshawa, AB, Canada, 12–14 August 2020; pp. 44–50. [Google Scholar] [CrossRef]
- Olah, C. Understanding LSTM Networks. 2015. Available online: http://colah.github.io/posts/2015-08-Understanding-LSTMs/ (accessed on 9 January 2024).
- Ugurlu, U.; Oksuz, I.; Tas, O. Electricity Price Forecasting Using Recurrent Neural Networks. Energies 2018, 11, 1255. [Google Scholar] [CrossRef]
- Schröder, T.; Schulz, M. Monitoring machine learning models: A categorization of challenges and methods. Data Sci. Manag. 2022, 5, 105–116. [Google Scholar] [CrossRef]
- Miyaguchi, K.; Kajino, H. Cogra: Concept-Drift-Aware Stochastic Gradient Descent for Time-Series Forecasting. Proc. Aaai Conf. Artif. Intell. 2019, 33, 4594–4601. [Google Scholar] [CrossRef]
- MS, A.R.; Nirmala, C.R.; Aljohani, M.; Sreenivasa, B.R. A novel technique for detecting sudden concept drift in healthcare data using multi-linear artificial intelligence techniques. Front. Artif. Intell. 2022, 5, 950659. [Google Scholar] [CrossRef] [PubMed]
# of Observations | Min | Max | Mean | Variance | Skewness | Kurtosis | |
---|---|---|---|---|---|---|---|
intraday | 2877 | −155.68 | 151.68 | 39.89 | 399.96 | −0.84 | 10.11 |
day-ahead | −83.01 | 121.46 | 39.91 | 328.00 | −0.98 | 5.10 |
batch size | 16 | |
epochs | 50 | |
experiment size | 1000 | |
time taken by process | 274 m 29 s | |
Monte Carlo Scores | Train Scores | Test Scores |
RMSE | 5.77 | 8.41 |
Scaled RMSE | 0.02 | 0.03 |
0.93 | 0.81 | |
MAE | 4.33 | 4.64 |
EVS | 0.94 | 0.82 |
ME | 31.92 | 92.38 |
MdAE | 3.40 | 3.14 |
Models | RMSE | MAE | MdAE |
---|---|---|---|
XGBoost | 26.62 | 15.13 | 9.06 |
Random forest | 24.40 | 14.66 | 8.95 |
LightGBM | 24.13 | 14.52 | 8.11 |
SVR-RBF | 19.98 | 10.27 | 6.18 |
KNN | 14.74 | 6.96 | 4.23 |
SARIMA | 13.05 | 6.91 | 4.13 |
CNN | 9.49 | 5.60 | 3.95 |
LSTM | 8.41 | 4.64 | 3.14 |
Time_Stamp | Solar | Wind | Cons | Intraday | Day _Ahead | Intraday _Pred | Profit _Best | Profit _Pred | Strategy _Pred | |
---|---|---|---|---|---|---|---|---|---|---|
0 | 2019-04-07 01:00:00+2:00 | 0 | 11,952.12 | 40,660 | 38.09 | 37.71 | 38.03 | 0.38 | 0.38 | Buy day-ahead, sell intraday |
1 | 2019-04-07 02:00:00+2:00 | 0 | 10,686.40 | 39,480 | 37.01 | 37.13 | 37.36 | 0.12 | −0.12 | Buy day-ahead, sell intraday |
2 | 2019-04-07 03:00:00+2:00 | 0 | 9720.26 | 39,212 | 35.30 | 35.50 | 36.24 | 0.21 | −0.21 | Buy day-ahead, sell intraday |
3 | 2019-04-07 04:00:00+2:00 | 0 | 8861.56 | 39,785 | 35.94 | 35.64 | 34.55 | 0.30 | −0.30 | Short day-ahead, buy intraday |
4 | 2019-04-07 05:00:00+2:00 | 0 | 8126.15 | 40,053 | 35.06 | 36.17 | 35.45 | 1.11 | 1.11 | Short day-ahead, buy intraday |
… | … | … | … | … | … | … | … | … | … | … |
Training Data (1726 h) | Test Data (576 h) | |
---|---|---|
Sum of hourly predicted unit profits (EUR/MWh) | 7042.40 | 1418.39 |
Sum of hourly best scenario unit profits (EUR/MWh) | 9241.69 | 2289.30 |
Total profit using production volumes for predictions (EUR) | ≈201,729,893 | ≈35,904,850 |
Total profit using production volumes for best scenario (EUR) | ≈243,491,411 | ≈59,353,509 |
Percentage of strategies chosen incorrectly (%) | 23.46 | 28.35 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kılıç, D.K.; Nielsen, P.; Thibbotuwawa, A. Intraday Electricity Price Forecasting via LSTM and Trading Strategy for the Power Market: A Case Study of the West Denmark DK1 Grid Region. Energies 2024, 17, 2909. https://doi.org/10.3390/en17122909
Kılıç DK, Nielsen P, Thibbotuwawa A. Intraday Electricity Price Forecasting via LSTM and Trading Strategy for the Power Market: A Case Study of the West Denmark DK1 Grid Region. Energies. 2024; 17(12):2909. https://doi.org/10.3390/en17122909
Chicago/Turabian StyleKılıç, Deniz Kenan, Peter Nielsen, and Amila Thibbotuwawa. 2024. "Intraday Electricity Price Forecasting via LSTM and Trading Strategy for the Power Market: A Case Study of the West Denmark DK1 Grid Region" Energies 17, no. 12: 2909. https://doi.org/10.3390/en17122909
APA StyleKılıç, D. K., Nielsen, P., & Thibbotuwawa, A. (2024). Intraday Electricity Price Forecasting via LSTM and Trading Strategy for the Power Market: A Case Study of the West Denmark DK1 Grid Region. Energies, 17(12), 2909. https://doi.org/10.3390/en17122909