Submitted:
05 August 2025
Posted:
06 August 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
1.1. Literature Review and Related Work
1.1.1. Anomaly Detection in Electricity Markets
1.1.2. Explainable AI in Energy Applications
1.1.3. Renewable Energy Impact on Electricity Markets
1.1.4. Research Gap and Contribution
- While machine learning approaches for anomaly detection in electricity markets have advanced, the integration of detection with comprehensive explanation remains underdeveloped.
- The application of SHAP values specifically for explaining electricity price anomalies represents a novel approach that bridges the gap between detection and actionable insights.
- The Romanian electricity market has received limited attention in academic literature regarding price anomaly analysis, despite undergoing significant transitions in its generation mix.
- The categorization of anomalies into different types (price spikes, price drops, etc.) with distinct explanations provides a more nuanced understanding than previous binary (anomaly/normal) approaches.
2. Materials and Methods
2.1. Data Collection and Preprocessing
2.2. Anomaly Detection Methodology
2.2.1. Isolation Forest for Anomaly Detection
2.2.2. Random Forest for Predictive Modelling
2.2.3. SHAP Values for Explainability
2.2.4. Anomaly Categorization
3. Results
3.1. Anomaly Detection Results
3.2. Predictive Model Performance
3.3. SHAP Value Analysis
3.4. Anomaly Characterization
3.4.1. Price drops
3.4.2. Other Anomalies
3.5. Figures, Tables and Schemes



| Feature | Normal | Other Anomaly | Price Drop |
|---|---|---|---|
| Price | 94.84 | 56.88 | 0.22 |
| Actual Total Load (MW) | 6143.46 | 6031.65 | 5066.98 |
| Day Ahead Total Load Forecast (MW) | 6155.28 | 6196.16 | 5251.46 |
| Actual Generation Fossil Gas (MW) | 1157.11 | 910.5 | 972.83 |
| Actual Generation Hydro Run of River et Poundage (MW) | 1264.42 | 1297.13 | 988.73 |
| Actual Generation Hydro Water Reservoir (MW) | 822.02 | 755.28 | 203.63 |
| Actual Generation Nuclear (MW) | 1291.62 | 1246.10 | 1251.56 |
| Actual Generation Solar (MW) | 163.91 | 590.26 | 764.68 |
| Actual Generation Wind Onshore (MW) | 821.12 | 1799.85 | 1211.29 |
| Current Solar Generation Forecast (MW) | 217.82 | 787.74 | 1066.39 |
| Current Wind Onshore Generation Forecast (MW) | 809.06 | 1842.13 | 1404.02 |
| Day Ahead Solar Generation Forecast (MW) | 216.96 | 786.45 | 1049.22 |
| Day Ahead Wind Onshore Generation Forecast (MW) | 804.31 | 1840.52 | 1393.66 |
| Intraday Solar Generation Forecast (MW) | 217.90 | 787.74 | 1066.39 |
| Intraday Wind Onshore Generation Forecast (MW) | 809.15 | 1842.13 | 1404.02 |
4. Discussion
4.1. Renewable Energy Impact on Price Anomalies
4.2. Load-Generation Balance and Market Flexibility
4.3. Conventional Generation Response
4.4. Temporal Patterns in Anomalies
4.4.1. Hour of Day Analysis
4.4.2. Day of Week Patterns
4.4.3. Integrated Temporal Framework
4.5. Methodological Contributions
4.6. Limitations and Future Research Directions
- Extending the framework to incorporate forecasting capabilities, enabling not only detection and explanation of anomalies but also prediction of their occurrence.
- Developing more sophisticated anomaly categorization schemes that capture a wider range of anomaly types and their characteristics.
- Investigating the potential for using the insights gained from anomaly explanation to design market interventions or trading strategies that mitigate or capitalize on anomalies.
- Applying the framework to other electricity markets to identify common patterns and market-specific factors in anomaly formation.
- Exploring the use of deep learning approaches combined with explainability techniques for more complex pattern recognition in electricity price data.
5. Conclusions
Data Availability Statement
Data and code are available via
Acknowledgments
Declaration of Generative AI and AI-assisted technologies in the writing process
Conflicts of Interest
References
- Weron, R. (2006). Modeling and forecasting electricity loads and prices: A statistical approach. John Wiley & Sons.
- Zhao, J. H., Dong, Z. Y., Li, X., & Wong, K. P. (2007). A framework for electricity price spike analysis with advanced data mining methods. IEEE Transactions on Power Systems, 22(1), 376-385. [CrossRef]
- Janczura, J. , Trück, S., Weron, R., & Wolff, R. C. (2013). Identifying spikes and seasonal components in electricity spot price data: A guide to robust modeling. Energy Economics, 38, 96-110. [CrossRef]
- Amjady, N., & Keynia, F. (2010). Electricity market price spike analysis by a hybrid data model and feature selection technique. Electric Power Systems Research, 80(3), 318-327. 80. [CrossRef]
- Chen, X., Dong, Z. Y., Meng, K., Xu, Y., Wong, K. P., & Ngan, H. W. (2012). Electricity price forecasting with extreme learning machine and bootstrapping. IEEE Transactions on Power Systems, 27(4), 2055-2062. [CrossRef]
- Wang, J., Gu, C., & Liu, K. (2022). Anomaly electricity detection method based on entropy weight method and isolated forest algorithm. Frontiers in Energy Research, 10, 984473.
- Banik, S., Saha, S. K., Banik, T., & Hossain, S. M. M. (2023). Anomaly Detection Techniques in Smart Grid Systems: A Review. 2023 IEEE World AI IOT Congress (AIIOT). arXiv:2306.02473.
- Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems.
- González-Briones, A., Palomino-Sánchez, J., Vale, Z., Ramos, C., & Corchado, J. M. (2025). Evolution of Building Energy Management Systems for greater sustainability through explainable artificial intelligence models. Engineering Applications of Artificial Intelligence, 147, 110324. [CrossRef]
- Zhao, Z., Wang, M., Wei, J., Cen, X., Du, S., Wu, Z., Liu, H., & Wang, W. (2025). Interpretable Machine Learning for Multi-Energy Supply Station Revenue Forecasting: A SHAP-Driven Framework to Accelerate Urban Carbon Neutrality. Energies, 18(7), 1624. [CrossRef]
- Khodayar, M., Liu, G., Wang, J., & Khodayar, M. E. (2021). Deep learning in power systems research: A review. CSEE Journal of Power and Energy Systems, 7(2), 209-220.
- Noura, H. N., Yaacoub, J. P. A., Salman, O., & Chehab, A. (2025). Advanced Machine Learning in Smart Grids: An overview. Internet of Things and Cyber-Physical Systems, 5, 95-142. [CrossRef]
- Wozabal, D., Graf, C., & Hirschmann, D. (2015). The effect of intermittent renewables on the electricity price variance. OR Spectrum, 38(3), 687-709. [CrossRef]
- Kyritsis, E., Andersson, J., & Serletis, A. (2017). Electricity prices, large-scale renewable integration, and policy implications. Energy Policy, 101, 550-560.
- Rintamäki, T., Siddiqui, A. S., & Salo, A. (2016). How much is enough? Optimal support payments in a renewable-rich power system. Energy, 117, 300-313. [CrossRef]
- Ketterer, J. C. (2014). The impact of wind power generation on the electricity price in Germany. Energy Economics, 44, 270-280. [CrossRef]
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. |
© 2025 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 (http://creativecommons.org/licenses/by/4.0/).