Next Article in Journal
The Impact of ESG Controversies on Abnormal ESG Performance: Evidence from China
Previous Article in Journal
Bridging Theory and Data: Linking Regional Innovation System Dimensions to Patent Outcomes Through CFA-CatBoost Integration
Previous Article in Special Issue
Forecast Natural Gas Price by an Extreme Learning Machine Framework Based on Multi-Strategy Grey Wolf Optimizer and Signal Decomposition
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Integrated Framework for Electricity Price Analysis and Forecasting Based on DROI Framework: Application to Spanish Power Markets

1
School of Mathematics and Statistics, Beijing Technology and Business University, Beijing 100048, China
2
School of Transportation, Southeast University, Nanjing 211189, China
*
Author to whom correspondence should be addressed.
Sustainability 2025, 17(24), 11210; https://doi.org/10.3390/su172411210
Submission received: 23 September 2025 / Revised: 29 October 2025 / Accepted: 10 November 2025 / Published: 15 December 2025
(This article belongs to the Special Issue Energy Price Forecasting and Sustainability on Energy Transition)

Abstract

Against the backdrop of electricity market liberalization and deregulation, accurate electricity price forecasting is critical for optimizing power dispatch and promoting the low-carbon transition of energy structures. However, electricity prices exhibit inherent complexities such as seasonality, high volatility, and non-stationarity, which undermine the efficacy of traditional forecasting methodologies. To address these challenges, this study proposes a four-stage Decomposition-Reconstruction-Optimization-Integration (DROI) framework, coupled with an econometric breakpoint test, to evaluate forecasting performance across distinct time segments of Spanish electricity price data. The framework employs CEEMDAN for signal decomposition, decomposing complex price sequences into intrinsic mode functions to retain essential features while mitigating noise, followed by frequency-based data reconstruction; integrates the Improved Sparrow Search Algorithm (ISSA) to optimize initial model parameters, minimizing errors induced by subjective factors; and leverages Convolutional Neural Networks (CNN) for frequency-domain feature extraction, enhanced by an attention mechanism to weight channels and prioritize critical attributes, paired with Long Short-Term Memory (LSTMs) for temporal sequence forecasting. Experimental results validate the method’s robustness in both interval forecasting (IPCP = 100% and IPNAW is the smallest, Experiment 1.3) and point forecasting tasks (MAPE = 1.3758%, Experiment 1.1), outperforming naive approaches in processing stationary sequence clusters and demonstrating substantial economic utility to inform sustainable power system management.

1. Introduction

Amid the ongoing liberalization and deregulation of the power sector, accurate electricity price forecasting has become a fundamental requirement for effective energy management and market operations [1]. Electricity prices in competitive markets tend to fluctuate sharply and display complex temporal patterns. They are characterized by high-frequency movements, non-stationary means and variances, pronounced daily and weekly seasonality, calendar effects associated with weekends and holidays, and recurrent price spikes [2]. Furthermore, structural challenges such as transmission bottlenecks, real-time supply–demand imbalances, and the growing share of renewable energy sources can trigger brief but sharp price spikes. These complex dynamics increase the complexity of forecasting models and heighten the risk of prediction errors, which can significantly affect power plant operators, market decision-makers, and participants [3]. Accurate electricity price forecasting is therefore critical for energy suppliers, market operators, and participants. It enables managers to analyze future electricity demand and develop long-term energy plans while supporting market participants in risk management and purchasing decisions. For governments, it provides an essential basis for energy policy formulation; for suppliers, it assists in designing optimal bidding strategies; and for consumers, it helps them plan purchases to maximize value and minimize costs. As such, achieving precise short-term electricity price forecasts and mitigating market risks from price uncertainty remain central to current research efforts.
Mainstream electricity price forecasting methods can be categorized into three types (1) econometric models, (2) machine learning models, and (3) hybrid models. In the early stage of research, both domestic and international research predominantly relied on mathematical or econometric models. Among these, the autoregressive integrated moving average (ARIMA) model has been widely applied in electricity price forecasting. For instance, Contreras et al. developed an ARIMA model to forecast prices in the Spanish and Californian electricity markets. ARIMA combines two core components, autoregression (AR) and moving average (MA), and achieves data smoothing through differencing operations. Although ARIMA provides good interpretability, it often exhibits relatively large mean percentage errors, with daily average errors ranging from 4% to 10%, which are generally higher than those of machine learning models [4]. To address the limitations of ARIMA model under high volatility, Zhou et al. introduced an interval forecasting approach for hourly market clearing price (MCP) prediction in the California electricity market [5]. In contrast, Girish applied the Generalized Autoregressive Conditional Heteroskedastic (GARCH) based model to forecast hourly electricity prices in India. GARCH models assume that the moments of a time series are non-constant, implying that the error term, defined as the difference between observed and predicted values, may not have a zero mean or constant variance, unlike ARIMA models. Instead, the error term is treated as serially correlated and modeled using an AR process. This makes GARCH models well-suited for capturing implied volatility in time series data, particularly during price spikes. GARCH generally outperforms ARIMA in forecasting, except during periods of low volatility [6]. Despite the strong performance of time series techniques like GARCH, their reliance on linear modeling limits their ability to predict highly nonlinear behaviors and sudden price fluctuations [7]. As a result, researchers have increasingly adopted machine learning methods which have advantages in fitting nonlinear features.
Among machine learning techniques, neural network models have been extensively applied to electricity price forecasting. Compared to traditional statistical approaches, neural networks exhibit superior nonlinear fitting capabilities and adaptability, making them particularly advantageous for handling high-volatility price forecasting. In recent years, artificial neural networks (ANNs) have gained attention for their ability to capture complex nonlinear relationships between input and output datasets [8]. For example, Li and Guo utilized a back propagation (BP) neural network combined with system marginal price (SMP) and dynamic clustering weights to forecast historical marginal price data from the PJM Interconnection (PJM) electricity market in the United States [9]. BP networks can approximate any function with finite discontinuities, given a sufficient number of neurons in the hidden layer. Building on this, Tang and Gu employed backpropagation to update weights and biases. However, BP networks are highly sensitive to noise, requiring rigorous data preprocessing [10]. In contrast, Extreme Learning Machines (ELMs), with random initialization and minimal parameter optimization, are somewhat more robust to noise, making them popular in electricity price forecasting. Shrivastava et al. applied the ELM model to data from the Ontario and PJM markets, demonstrating higher generalization capability and significantly faster processing speeds compared to traditional neural network algorithms [11]. Nevertheless, as a feedforward neural network, ELM struggles to capture temporal dependencies.
The advancement of deep learning (DL) in electricity price forecasting has provided researchers with innovative approaches for time series forecasting. Among DL models, LSTM demonstrates excellent performance in handling nonlinear complex problems and time series data [12], while CNN excels in high-dimensional feature extraction [13], making these models widely applicable. Cantillo-Luna et al. employed a stacked LSTM combined with a time2vec layer to forecast electricity prices up to 8 h ahead, outperforming advanced statistical models like SARIMA and Holt-Winters [14]. Similarly, Abedinia et al. utilized CNN-based approaches to forecast electricity prices in the PJM and mainland Spain markets, achieving favorable results [15]. However, CNNs face limitations in capturing global information and long-distance dependencies. To address this, Shejul et al. integrated CNN and LSTM models for short-term electricity price forecasting, yielding improved forecasting accuracy [16]. Additionally, Pourdaryaei et al. applied a CNN algorithm augmented with an attention mechanism to simulate the Ontario electricity market in 2020, achieving superior results [17]. LSTM stands out in capturing patterns and long-term dependencies in nonlinear time series data, while CNN is effective at identifying local features. The squeeze-and-excitation (SE) attention mechanism further enhances CNN by adaptively weighting each channel, enabling it to focus on globally important features. This integrated framework substantially improves forecasting accuracy and overall performance.
In forecasting research, it is widely acknowledged that no single method excels in all scenarios. To enhance forecasting accuracy, integrated models have become a common approach in electricity price forecasting. These models frequently incorporate (1) decomposition modules and (2) optimization modules to improve robustness. Decomposition algorithms, by mitigating the non-stationary characteristics of time series data, are extensively utilized in hybrid methods for electricity price forecasting [18]. A key advantage of the EMD series decomposition method is its inherent capability to handle non-stationary and nonlinear processes [19,20]. Afanasyev et al. applied CEEMDAN in power price forecasting, demonstrating superior performance compared to standard EMD and wavelet decomposition methods [21]. Another critical factor impacting the performance of deep learning models is improper hyperparameter tuning. To address this, optimization algorithms are increasingly integrated into forecasting models [22,23]. These algorithms enable the identification of optimal model parameters, thereby enhancing both forecasting accuracy and model robustness. Literature research in the field of electricity price forecasting is listed in Table 1.
Short-term electricity price forecasting is pivotal to stable power market operation, yet it remains a formidable task due to inherent price volatility and intricate influencing factors. Conventional econometric models and standalone machine learning approaches often fall short in two key areas: effectively extracting critical trend information from raw data and optimizing model hyperparameters, which ultimately restricts their forecasting accuracy. To address these gaps, this paper employs a decomposition -reconstruction -optimization -integration (DROI) framework to address the challenge of electricity price fluctuations. CEEMDAN is applied for data decomposition, with the resulting modules reconstructed using the t-test on the original sequence. After consolidating the decomposed frequency data, the CNN-SE Attention-LSTM (CSL) is utilized to weight and amplify trend information, enhancing feature extraction and improving forecasting accuracy. ISSA is incorporated for global optimization of the data model, determining optimal parameters such as the learning rate, L2 regularization coefficient, and the number of neurons in the hidden layer. Additionally, a residual test ensures comprehensive extraction of trend components. Both interval forecasting and deterministic forecasting methods are applied to compare the performance of econometric models with standalone machine learning predictive models. Results from six experiments demonstrate that the CEEMDAN-ISSA-CNN-SE Attention-LSTM (CSCSL) hybrid model delivers superior performance in short-term electricity price forecasting.
The main innovations of this study are summarized as follows:
(1) To mitigate errors stemming from human factors, the ISSA optimization algorithm is introduced to determine key model parameters, including the initial learning rate, regularization coefficient, and the number of neurons in the hidden layer. These parameters are optimized by minimizing the RMSE in the forecasting model. Furthermore, Lévy flight is incorporated to avoid local optima and achieve a global search, significantly enhancing the model’s stability. This approach not only improves the model’s forecasting performance but also provides a robust foundation for future parameter selection.
(2) To enhance the feature extraction capability of the model, an attention mechanism is incorporated, leading to the development of the convolution-time-loop hybrid deep learning model (CSL) based on the attention mechanism for forecasting. In the CSL forecasting model, CNN provides local perception and parameter sharing, effectively capturing local patterns in input sequences and reducing model complexity. SE Attention assigns weights to different parts of the sequence based on contextual information, accounting for correlations within the input data. LSTM, as a core component, captures long-term dependencies in sequences and demonstrates memory capabilities. This method excels in nonlinear fitting and is particularly suited for short-term electricity price forecasting tasks with inherent volatility.
(3) To improve the nonlinear fitting ability of the forecasting model, the decomposition and reconstruction methods are introduced for electricity price data processing. CEEMDAN is used to decompose the data into multiple modes, automatically adjusting parameters based on signal characteristics to effectively eliminate noise. Subsequently, the model is reconstructed according to the data’s frequency states using an independent sample t-test. This approach enhance the model’s ability to process complex features. Using this method, a single time series is decomposed into three frequency states: high, medium, and low frequency. Predicting each frequency state separately enhances the model’s forecasting performance and reduces forecasting error.
(4) To increase the interpretability of the model, the Chow test is employed to partition the dataset in conjunction with economic events. Discontinuity points are identified based on significant socio-economic events, and the Chow test is applied to confirm the presence of structural breaks. By conducting these experiments, the time series data is segmented into multiple datasets, aiding in the evaluation of the model’s adaptability to different scenarios and its robustness. This approach provides valuable insights and serves as a reference for future model selection and improvement.
The remainder of this paper is organized as follows. In Section 2, the basic principles of the proposed model and correction method are introduced, respectively. In Section 3, the preparation of the experiment is introduced, including dataset reconstruction, benchmark model, evaluation index, model parameters, dataset division and experiment arrangement. In Section 4 and Section 5, the forecasting performance and robustness of the model are studied from two perspectives. In Section 6, the experimental results are summarized and future research prospects are discussed.

2. Methodology

This section begins with an introduction to the basic principles of the decomposition method, followed by the optimization algorithm and forecasting model (with relevant formulas provided in the Appendix A and Appendix B).

2.1. The Decomposition Method

For power price data characterized by high volatility, the Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) can effectively decompose the original highly fluctuating data into multiple smoother components [26]. This method combines the modal information of each component and employs econometric t-tests to reconstruct the component characteristics. This process aims to minimize data variability and suddenness, thereby reducing reconstruction errors and enhancing forecasting accuracy, as illustrated in Appendix A and Appendix B. CEEMDAN is an extension of the Integrated Empirical Mode Decomposition (EEMD) and the Empirical Mode Decomposition (EMD) algorithms. It effectively addresses the mode overlap issue present in EEMD [27]. The specific steps involved in the CEEMDAN method are outlined below:
Step 1: Data preparation: The input signal is first normalized by dividing it by its standard deviation. This step ensures consistency in the amplitude range of the signal, facilitating more uniform processing in subsequent steps.
Step 2: White noise mode decomposition: Gaussian white noise is added to the signal to generate a new composite signal. EMD is then applied to each iteration of white noise, yielding intrinsic mode functions (IMFs). The first mode is extracted from the decomposed signal, and the residual component is subsequently calculated.
Step 3: Extract residual modes: Residual components are calculated, and the process is repeated using the first-order modal component in place of the original data. This iterative procedure continues until no significant IMF signals remain in the residual. Ultimately, the original signal is fully decomposed into its IMFs.
The primary advantage of this method lies in its ability to account for noise during the signal decomposition process. Additionally, it can adaptively regulate both the noise level and the number of IMFs in the signal.

2.2. The Optimization Algorithm ISSA

In the context of forecasting volatile power prices, selecting key model parameters is crucial before the data is fed into the forecasting model. The ISSA optimization algorithm serves as an effective approach for determining model parameters that minimize the Root Mean Square Error (RMSE) through a global search process. The optimization algorithm builds upon the Sparrow Search Algorithm (SSA) and incorporates an Adaptive Spiral Fly Bird Search Algorithm (ASFSSA) to address challenges such as local optimality and high randomness [28,29]. The ISSA optimization process is outlined as follows:
Step 1: Random variable chaotic diffusion initialization: Population initialization is systematically designed to enhance the algorithm’s controllability.
Step 2: Sparrow food search process: An adaptive weighting is introduced in this process. During the initial stage of the algorithm, this weighting mechanism reduces the impact of random initialization while balancing the subsequent Lévy flight mechanism, thereby enhancing both local and global search capabilities of the algorithm.
Step 3: Lévy flight mechanism: Inspired by the foraging behavior of sparrows, this mechanism demonstrates strong exploratory capabilities, reducing the likelihood of convergence to local optima.
Step 4: Variable spiral search strategy: During the follower position update process, the spiral parameter z cannot remain fixed. This constraint causes the search method to be monotonous and increases the risk of converging to a local optimum, thereby diminishing the algorithm’s search capability. Acting as an adaptive variable, the parameter z dynamically modifies the spiral search trajectory of the follower. This change enables the follower to explore unknown areas more effectively, boosting both search efficiency and the algorithm’s global optimization capability. The variable spiral position update strategy is outlined in the formula below:
Step 5: Iterative optimization: Through continuous iteration, the optimal model parameters are found to make the forecasting effect best

2.3. The Forecasting Model

The forecasting model primarily consists of three modules: CNN, SE Attention and LSTM.
(1) Convolutional Neural Networks
CNNs, inspired by biological processes, are a powerful deep learning tool widely used for classification tasks. The primary components of CNNs include the convolutional layer, pooling layer, and fully connected layer. In time series forecasting, the convolutional layer effectively captures local patterns and features in data, reduces network parameters through the sharing of convolutional kernels, mitigates the risk of overfitting, and enables processing of longer time series data [30].
Specifically, the convolutional layer consists of a rectangular grid of neurons, with its input or preceding layer also arranged in a similar grid. Neurons within a given rectangular region share the same weights, representing the convolutional filter. The pooling layer, in turn, extracts small rectangular sections from the convolutional layer and applies sampling operations, such as average or maximum pooling, to produce a single output for each section. Lastly, the fully connected layer takes all neurons from the previous layers and connects each to every neuron within the layer, enabling the integration of high-level features.
(2) Squeeze-and-Excitation Attention
Originating from image processing, the concept of attention draws inspiration from the human brain’s ability to selectively concentrate on relevant stimuli. By assigning variable weights to features, attention mechanisms emphasize essential information while diminishing the significance of less relevant details [31].
SE Attention, short for Squeeze-and-Excitation, is an attention mechanism designed to enhance CNNs. Its core principle involves incorporating a global attention mechanism to adaptively learn the importance of individual channels [32], as illustrated in Figure 1.
The SE module applies a filter to weight the input data, enhancing the learning of convolutional features. This process improves the network’s sensitivity to informative features, thereby boosting its performance.
(3) Long Short-Term Memory Networks
LSTM networks, equipped with a forget gate, effectively address the challenge of handling continuous time series input [33]. This model has found extensive applications in electricity price forecasting. The LSTM methodology is outlined as follows:
Step 1: Forget gate: The forget gate, a crucial part of LSTM, decides what information to retain or remove from the cell state at time t − 1. The system processes inputs from ht−1, the previous hidden state, and the current input sequence x t at time t, yielding an output value ranging from 0 to 1. A value of 1 represents full retention of previous information, whereas a value of 0 signifies complete removal of prior cell state data. This mechanism enables LSTM to effectively manage information flow, reducing the likelihood of losing crucial data in time series analysis.
f t = σ   ( W f   [ h t 1 ,   x t ] + b f )  
where f t represents the state of the forget gate at time t. In the LSTM cell, the forget gate is governed by a weight parameter W f , a bias term b f , and an S-shaped activation function σ , which collectively regulate the flow of information. These components jointly determine whether to keep or discard data from the prior time step when handling new inputs.
Step 2: Signal Storage: With every time increment, the input gate of the LSTM receives new information x t and determines which information to retain in the cell state. The hyperbolic tangent layer is then used to calculate the current state of the storage unit C t . By using the intermediate value, the cell state is updated, producing a new cell state.
f t = σ   ( W f   [ h t 1 ,   x t ] + b f )
C t = t a n h ( W c   [ h t 1 ,   x t ] +   b c )
C t = f   ( t )     C t 1 +   i t     C t
Furthermore, the cell state is parameterized by the weight matrix W c and the bias term b c . The hyperbolic tangent activation function tanh is utilized, along with the Hadamard product .
Step 3: Information Transmission: At time t, the input gate state, denoted as i t , controls the transfer of information from x t to C t . The associated weight matrix and bias term are represented by W i and b i , respectively. Furthermore, the cell state is parameterized by the weight matrix W c and the bias term b c . The hyperbolic tangent activation function tanh is utilized, along with the Hadamard product . In an LSTM network, the output gate selects the relevant information from the current cell state to produce the final output. Governed by a sigmoid layer, this gate selects specific segments of the memory cell state for export, and a tanh layer refines the chosen information to produce the output o t .
o t = σ   ( W o   [ h t 1 ,   x t ] + b o )  
h t = o t     t a n h   C t
where h t signifies the hidden state at the current time instance. At time t, the state of the output gate, represented by o t , is calculated using the weight matrix W o and bias b o .

2.4. Procedures and Frame for the Proposed Model

To accurately predict electricity price data, a novel DROI framework is proposed. The CEEMDAN method is utilized to adaptively decompose time series data into multiple components, which are reconstructed using an econometric t-test to generate data with three distinct frequency states. These three frequency components are processed by CNN to extract trend features, where the CNN channels are weighted by SE Attention, and LSTM is employed to handle time-series dependencies for enhanced forecasting accuracy. To optimize the model’s initial parameters, ISSA is used to find the coefficients that minimize RMSE, thereby improving model interpretability. The overall framework of the proposed method is depicted in Figure 2, with the detailed implementation steps outlined below.

3. Experiment Preparation

This section primarily introduces three key aspects: (1) Reconstruction of the frequency state of the data to be predicted following CEEMDAN decomposition and period division. (2) Benchmarks, evaluation metrics, and network parameters used in the study. (3) Data analysis and decomposition considering economic events and structural breakpoints.

3.1. Data Reconstruction

In the section, correlation analysis and independent sample t-tests are employed to reconstruct the modes into high-frequency, medium-frequency, and low-frequency categories. Modes without correlation to the original sequence (failing the t-test) are designated as high-frequency modes. Modes with correlation but fluctuating around zero are identified as medium-frequency modes. Finally, modes that exhibit correlation and fluctuate around non-zero values (typically the last decomposed modal data) are categorized as low-frequency modes, also referred to as trend components.
After CEEMDAN decomposition, as detailed in Algorithm A1, the electricity price series is separated into 18 components, including 17 i m f components and one trend term r e s , as illustrated in Figure 3. The decomposition sequence is arranged in the form of high volatility to low volatility. The high-frequency components, typically representing high-volatility modules, exhibit irregular trajectories, sharp fluctuations, and are centered around a zero mean. These components are influenced by short-term random factors, including temporary policies, transient supply-demand relations, and investment psychology. However, their impact is limited and transient, primarily reflecting random effects. In contrast, mid-frequency components (low-volatility modules) and low-frequency components exhibit trends similar to the original series, reflecting significant factors like market adjustments, impactful policies, or economic cycles. The r e s component represents the long-term trend of electricity prices, characterized by slow periodic changes. Overall, high-frequency components capture short-term random fluctuations, mid-frequency components reflect policy-induced or cyclical trends with significant impacts, and the low-frequency component (trend term) represents the long-term trend, exerting a decisive influence. As shown in Figure 4, the amplitude of each component increases as the frequency decreases. High-frequency components (random sequences) have a limited impact on the original series, while the influence grows progressively with decreasing frequency.
Based on Figure 3, this section delves into the correlation between each component and the electricity price series, the variance contribution rate of each component, and their average periods. The average period is calculated using the Fast Fourier Transform (FFT) method, with the detailed results presented in Table 2. High-frequency components (shorter periods) exhibit weaker correlations with the original sequence, whereas low-frequency components (longer periods) and the trend component demonstrate stronger correlations with the original series.
As previously analyzed, although the electricity price series exhibits high volatility, the high-frequency components have a relatively minor impact on the original exchange rate compared to their strong periodic characteristics. Thus, these high-frequency components can be aggregated into a single component for analytical forecasting, enhancing the efficiency of subsequent modeling. To identify high-frequency components, we assume that they fluctuate around a zero mean. A one-sample t-test is then conducted to test whether the mean of each decomposed component equals zero, determining their classification as high-frequency components. The test results are presented in Table 3, where components with a t-test p-value greater than 0.01 are identified as high-frequency. Consequently, six components i m f 1 , i m f 2 , i m f 4 , i m f 6 ,   i m f 7 and i m f 12 are categorized as high-frequency components. The final decomposition diagram is illustrated in Figure 4.
Furthermore, from Table 4, similar conclusions can clearly be derived concerning the contribution of each component to the variance of the original sequence. The periodic component contributes the most to the variance, accounting for 82.27%, which highlights its dominant influence on the original series and reflects the highly periodic nature of electricity price fluctuations. Short-period random fluctuations also play a role, with a variance contribution rate of 13.65%. Overall, electricity price fluctuations exhibit an inherent operational trend over the long term, described by the trend component. Medium-frequency components significantly influence electricity prices over shorter periods. Given the relative stability of the Spanish electricity market, the trend component contributes the least to electricity price fluctuations.

3.2. Standard Models, Evaluation Indicators, and Parameter Settings

(1) Standard Models
As the electricity price series is identified as a nonlinear time series, we select only one classical statistical method, ARIMA [34]. Meanwhile, 4 single ML model (LSTM [35], SVR [36], ELM [37] and BP [38]), and 5 hybrid model (LSTM-Attention, RFELM, CCSL, SCSL, CSL) are selected to be benchmark in order to study the forecasting performance of the model. Due to its self-attention mechanism, Transformer can capture data volatility very well. It has good application in electricity price forecasting. Therefore, two hybrid models combined with Transformer (TCN-Transformer-LSTM and ICEEMDAN- TCN-Transformer-LSTM) are selected to be benchmarked in volatile data. To study the robustness of the model. Finally, Naive is introduced as a contrast in the section. Naive is to imitate People’s Daily decisions, according to the electricity price of the previous period, which is directly used as the predicted value of the next period, which can be used to study the economic significance of the model.
(2) Evaluation Indicators
To evaluate the forecasting performance of the model, this study uses two criteria: deterministic forecasting and interval forecasting. Deterministic forecasting offers a straightforward measure of predictive accuracy. Metrics such as mean square error (MSE), mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), and the Lilliefors test are applied. Lower MSE, MAE, RMSE, and MAPE values indicate smaller forecasting errors, demonstrating better model performance. The Lilliefors test examines the goodness-of-fit by testing the normality of residuals. A p-value greater than 0.05 suggests the residual errors are inconsistent with trend information. Interval forecasting, on the other hand, is used to analyze uncertainties in electricity price fluctuations. This study employs interval prediction coverage probability (IPCP), normalized average width of interval forecastings (IPNAW), and cumulative width deviation (AWD) as metrics. A higher IPCP and lower AWD signify the interval captures sufficient true values, improving forecasting reliability. Meanwhile, a smaller IPNAW indicates a narrower forecasting interval and more stable predictive results. The formulas for these calculations are listed in Table 5.
(3) Parameter Settings
This section outlines the key hyperparameters of the hybrid model, as summarized in Table 6. The learning rate reduction factor for the models is set to 0.05. Additionally, Table 6 lists the learning rate, number of hidden layer nodes, and regularization coefficient for both the SCSL and proposed models, which are optimized through a global search using the improved Sparrow Search Algorithm (ISSA).

3.3. Data Research and Decomposition

Previous research highlights the necessity of adopting a cautious approach when assessing the impact of significant events in various domains [40]. This principle is equally relevant to electricity prices. Forecasting electricity prices over an entire period may fail to effectively capture the intrinsic fluctuations of the electricity market, potentially leading to larger forecasting errors. This study examines the electricity market’s response to two critical events: the fluctuations in the energy market in 2020 and the Russia-Ukraine conflict in 2022. Figure 5 illustrates the trend of electricity price volatility from April 2014 to March 2023.
Affected by energy market volatility, Spanish electricity prices fluctuated in 2020 and achieved explosive growth in 2021. In March 2020, two key factors, namely the rapid increase in natural gas prices and the rising cost of carbon emissions, led to a sharp rise and unprecedented volatility in Spain’s electricity market. By early 2022, these prices had climbed to an all-time high [41]. In February 2022, the Russian-Ukrainian political conflict further exacerbated the situation, driving Spanish electricity prices to extreme levels. Subsequently, electricity prices fluctuated sharply due to two primary factors.
Drawing on the examination of events throughout the study period, the dataset is divided into three distinct phases, with the energy price fluctuations and the Russia-Ukraine conflict serving as discontinuity points, as summarized in Table 7. To validate the rationality of this division, the Chow test was employed. The Chow test, a statistical method widely used in time series forecasting, assesses the presence of structural changes. The F-test results for cycle division are presented in Table 6, indicating significant structural shifts both before and after the pandemic and the Russia-Ukraine conflict.
The null hypothesis of the Chow test assumes that the residuals follow an independent and identically distributed normal distribution with unknown variance. Let S R denote the total sum of squared residuals across all data, S 1 the sum of squared residuals for the first period, and S 2 the sum of squared residuals for the second period. Here, N 1 and N 2 represent the number of observations in each period, while k is the total number of parameters. The F-test statistic for the Chow test is calculated as follows:
F   =   S R S 1 + S 2 / k S 1 + S 2 / ( N 1 + N 2 2 k )   ~   F ( k , N 1 + N 2 2 k )
Table 8 presents the defined intervals for each period. The period prior to the energy market turbulence (1 April 2014, to 13 March 2020) is characterized as a stable, long-term phase representing typical electricity market behavior. The period of energy price fluctuations (14 March 2020, to 23 February 2022) reflects the significant disruptions caused by the soaring natural gas prices and mounting carbon emission costs. The period of the Russia-Ukraine conflict (24 February 2022, to 21 March 2023) marks a phase influenced primarily by the conflict, compounded by the ongoing effects of the pandemic. As illustrated in Figure 5, during Dataset 1 (Before the coronavirus outbreak), electricity prices remained relatively stable. However, during Dataset 2 (epidemic shock period) and Dataset 3 (Russia-Ukraine conflict period), electricity prices exhibited pronounced fluctuations.
Therefore, we divide the subsequent experiment into two parts: (1) Model forecasting effect experiment: Dataset 1 was used to predict the proposed model without considering the impact of extreme events (without using obvious trend and fluctuation data). (2) Model robustness test: Datasets 2 and 3 were used to study the forecasting effect, and the stability of the model was studied under the scenario with obvious trend influence and high fluctuation. The subsequent experiments are shown in Table 9.

4. Model Forecasting Effect Experiment

In this section, a data sample is randomly selected to evaluate the forecasting performance of the model in Dataset 1. To ensure the reliability of subsequent experimental results, the data is split into two subsets in a 7:3 proportion: one for training and the other for testing. To reduce the impact of feature dimension disparities, normalization is applied to the data in this study and subsequent experiments. Normalization, a common preprocessing technique in neural networks, enhances network convergence, mitigates gradient explosion during training, and improves predictive accuracy. The data is scaled using the minimum-maximum normalization method, ensuring values fall between 0 and 1.

4.1. Experiment 1: Model Forecasting

This experiment is divided into three small experiments: (1) comparison with a single model, (2) comparison with a mixed model, and (3) interval forecasting. Through these experiments, deterministic evaluation (MSE, RMSE, MAE, MAPE) and interval evaluation (IPCP, AWD, IPNAW) are applied to evaluate the predictive effect and model stability of the proposed model. The above experiments show that the forecasting accuracy of the proposed model is higher than that of other benchmark models.

4.1.1. Experiment 1.1: Research on Basic Model Forecasting

The effectiveness of the proposed hybrid approach is evaluated against five benchmark models: four machine learning models and one statistical model, as detailed in Table 10.
As shown in Table 10, the proposed model achieves the superior forecasting performance among all benchmarks, with the lowest MAPE of 1.3758%. Nevertheless, it is noteworthy that among the individual base models, LSTM exhibits a marginally better performance than the Naive model. This observation motivated the development of multiple hybrid models to leverage the strengths of LSTM for potentially enhanced forecasting accuracy.

4.1.2. Experiment 1.2: Research on Hybrid Model

To assess the performance of the proposed hybrid method, one single machine learning model and four hybrid models are selected as benchmarks, as shown in Table 11. Additionally, an in-depth analysis of the model residuals is conducted, with results presented in Table 12 and illustrated in Figure 6.
Table 11 and Table 12 further demonstrate the forecasting performance and robustness of the proposed model. Among the evaluated models, the proposed model achieves the best predictive accuracy, with residuals following a normal distribution (p-value > 0.05). Additionally, Table 12 and Figure 6 illustrate the residual error distribution, showing that the forecasting errors of the proposed model fluctuate around zero and exhibit relative stability.

4.1.3. Experiment 1.3: Interval Forecasting

To further investigate the model’s predictive stability, its performance in interval forecasting was evaluated against a set of benchmarks models, comprising one machine learning base model and four hybrid models, as presented in Table 13. The comparative results are visually summarized in Figure 7.
Table 13 presents the interval forecasting performance. Interval forecasting provides varying confidence levels for the predicted results, offering insights into their reliability and robustness. At confidence levels below 80%, only CSL, CCSL, and the proposed model achieve complete coverage of true values (IPCP = 100%). Among these models, the proposed model exhibits the narrowest interval range (IPNAW = 0.4336 at a 75% confidence level and IPNAW = 0.4830 at an 80% confidence level), demonstrating the highest predictive accuracy. Additionally, the results indicate that single ARIMA model is unsuitable for electricity price forecasting.
Remark: In the first experiment, interval and deterministic evaluations are combined, demonstrating the proposed model’s strong forecasting performance and stability. Therefore, subsequent experiments focus on analyzing the contributions of each module within the proposed model.

4.2. Experiment 2: Ablation Experiment

This experiment consists of two sub-experiments: (1) evaluation of the decomposition module’s performance; and (2) evaluation of the optimization module’s performance. Deterministic metrics (MSE, RMSE, MAE, MAPE) are employed to assess the predictive accuracy and stability of the proposed model. The experimental results clearly demonstrate the positive impact of the decomposition and optimization modules on the performance of the proposed model.

4.2.1. Experiment 2.1: Decomposition Algorithm Ablation Experiment

To evaluate the impact of the decomposition module, an ablation experiment focusing on decomposition (including the reconstruction process) was conducted, as presented in Table 14.
Table 14 shows the optimization effect of CEEMDAN decomposition and reconstruction. The results show that MAPE of the proposed model is reduced from 2.96641% to 1.3758% and RMSE from 0.0046 to 0.0020. Furthermore, ICEEMDAN decomposition and reconstruction method is introduced for comparison. ICEEMDAN increases the setting of the signal-to-noise ratio compared with the CEEMDAN algorithm to standardize the noise. However, with the addition of signal-to-noise ratio, the forecasting effect is not significantly improved. This may be due to the following reasons: Electricity price data are highly volatile due to market supply and demand. This volatility poses two risks to the Increased Signal-to-Noise Ratio (SNR) module: (1) It may erroneously filter out subtle, meaningful fluctuations stemming from societal shifts in user behavior, mistaking them for noise, thereby discarding critical features of the original signal. (2) It may be susceptible to rare events, which can introduce anomalous errors that distort the signal’s inherent characteristics. Both scenarios can compromise the model’s forecasting performance by altering the fundamental data upon which it relies.

4.2.2. Experiment 2.2: Optimization Algorithm Ablation Experiment

To evaluate the impact of the ISSA optimization module, an ablation experiment focusing on optimization was conducted, as presented in Table 15.
Table 15 presents the optimization effect of the ISSA algorithm. The experimental results indicate that the forecasting performance of the proposed model improves when its parameters are optimized using the ISSA algorithm, with MAPE reducing from 1.6839% to 1.3758%.
Remark: The results of the above experiments indicate that both the CEEMDAN decomposition and reconstruction algorithm and the ISSA parameter optimization algorithm enhance the forecasting performance of the model. Notably, the combination of these two methods (decomposing the data first and then optimizing parameters for each frequency state) significantly improves forecasting accuracy. Specifically, MAPE decreased from 2.3823% to 1.3758%, as illustrated in Table 15.

4.2.3. Experiment 3: Research on Seasonal Forecasting

Based on the previous experiments, Spain, located in southern Europe and surrounded on three sides by the Mediterranean Sea, is influenced by warm, moist air from the Mediterranean and monsoons from the North Atlantic. These climatic conditions create distinct seasonal patterns. To explore the predictive enhancements provided by each module in the proposed model, seasonal forecasting is introduced. The experiment evaluates performance improvements across various seasons using interval and deterministic forecastings, as presented in Table 16 and Table 17.
Table 16 presents the results of ablation experiments for seasonal interval forecasting. Compared to other hybrid models, the proposed model achieves the highest interval coverage and the narrowest interval width. Notably, during the Spanish summer, electricity price volatility increases significantly due to heat waves. At the 90% confidence level and below, only the proposed model achieves full coverage of true values (IPCP = 100%). Additionally, across all seasons, CSL consistently exhibits the lowest interval coverage. Both ISSA and CEEMDAN contribute to optimizing the model’s performance to varying degrees. Furthermore, a seasonal deterministic point experiment is conducted to further investigate the module effects within the proposed model.
Table 17 presents the results of ablation experiments for seasonal point forecasting. In every season, the proposed model achieves the lowest forecasting error. Regarding the ISSA and CEEMDAN optimization modules: (1) Both modules enhance the forecasting performance of CSL across all seasons; and (2) CEEMDAN demonstrates significant improvement in forecasting accuracy during spring and summer. This is attributed to its ability to perform local fitting for varying data frequency states, effectively capturing local fluctuations induced by seasonal factors, such as minor heat waves.
Remark: The ISSA multi-objective optimization algorithm is crucial for determining key hyperparameters of the model, including the number of hidden layer nodes, learning rate, and regularization coefficient. By optimizing these parameters, ISSA effectively reduces forecasting errors caused by suboptimal parameter settings. Meanwhile, CEEMDAN enhances CNN’s ability to extract critical trend information through wave frequency decomposition. Combined with the Attention mechanism, this approach improves both the model’s predictive accuracy and the effectiveness of interval coverage.

5. Model Robustness Test

To validate the robustness of the proposed CSCSL system, it is applied to electricity price data from the epidemic cycle and the Russia-Ukraine conflict cycle. Given the high volatility of the forecasts, interval forecasting is utilized in this experiment. Additionally, TCN and transformer mechanisms, known for their strong spatial information extraction capabilities, are incorporated. For this study, TCN-Transformer-LSTM (TCL) and ICEEMDAN-TCL (ITCL) are introduced, corresponding to Experiment 4 and Experiment 5, respectively.

5.1. Experiment 4: Research on the Epidemic Cycle

This experiment conducted a comprehensive forecasting for the energy price fluctuation period. During this time, the Spanish electricity market exhibits a general upward trend with pronounced volatility, driven by the pandemic and other factors. To evaluate the robustness of the research model, periodic data are utilized. In the experiment, the training and validation sets are divided in a 7:3 ratio, as depicted in Figure 8. Table 18 summarizes the interval error for each model during this period. At a 95% confidence level, the forecasting interval coverage of SCL and CSCSL reaches approximately 90%, significantly outperforming other models.

5.2. Experiment 5: Research on the Russia-Ukraine Conflict Cycle

This experiment conducted a comprehensive forecasting for the Russia-Ukraine political conflict period. During this time, energy prices across the EU experienced significant fluctuations due to political and geopolitical tensions, and Spanish electricity prices followed a similar trend. To evaluate the robustness of the research model, periodic data were utilized. The training and validation sets were divided in a 7:3 ratio, as depicted in Figure 9. Table 19 presents the interval error for each model during this period. The CSCSL model achieved a forecasting interval coverage of 100% at a 95% confidence level, indicating that all true values were contained within the predicted confidence interval. The CSL model also performed well, with an IPCP coverage rate of 99.9581%. While the proposed model demonstrated stronger forecasting performance, its forecasting interval was wider compared to other models.

5.3. Experiment 6: The Diebold-Mariano (DM) Test

In this section, the DM test is introduced, and the sample error t-test is used to check whether the forecasting efficiency of the two models is the same. By predicting, we receive the predicted error sequence E A and E B . E A and E B are the true values (before data processing) of the two models minus the predicted values.
d ¯ = E A E B n
D M = E A E B i = 1 n ( ( E A E B ) d ¯ ) n 1
If the Diebold-Mariano (DM) statistic follows a normal distribution, it suggests no significant difference between the two models. Otherwise, model performance can be evaluated based on the study framework, as illustrated in Figure 10 and Figure 11. Figure 10 depicts the forecasting performance of each model during the epidemic cycle, while Figure 11 illustrates the results for the Russia-Ukraine war cycle. A negative DM value indicates that model B has a smaller error compared to model A, suggesting that model A demonstrates superior forecasting performance.
Combined with Experiments 4 and 5, the proposed model demonstrates considerable robustness to the prolonged effects of sudden events. This is particularly evident in electricity markets affected by long-term emergencies, such as the epidemic shock, which exhibit both high volatility and pronounced long-term trends. The proposed model leverages feature decomposition (CEEMDAN) to extract trend components from such data and conducts predictive research separately within distinct modules. As indicated by the interval forecasting results and the DM test, the forecasting error of the proposed model is significantly smaller compared to other models (Table 18 and Figure 10).
However, for unexpected events with long-term market impacts, the proposed model achieves significantly higher interval forecasting accuracy compared to other models, albeit with a larger forecasting bandwidth. In such cases, combining the proposed model with other models (e.g., TTL, SVR) can be considered to enhance forecasting accuracy (Table 19 and Figure 11).

6. Conclusions

Accurate electricity price forecasting is critical in highly competitive markets for plant operators, market operators, and participants. This study focuses on addressing the challenges of short-term electricity price forecasting, using the Spanish electricity market as a case study. The market data is divided into multiple subsets based on economic events and breakpoint tests. Decomposition and reconstruction techniques are then employed to segment the data into modal datasets, with ISSA determining the optimal parameters. For each frequency state dataset, CNN is utilized for feature extraction, enhanced by SE Attention for channel weighting, and LSTM is applied for time series forecasting. Compared with other comparative methods, the average Mean Absolute Percentage Error (MAPE) of this method is reduced by 46.01%. This can effectively help electricity retailers and industrial users alleviate the “cost mismatch risk” while assisting power generation companies in optimizing resource allocation, thereby enhancing the overall profit level of the industry.
The benchmark suite in this study comprises one econometric model, six machine learning models, seven hybrid models, and naive models designed to simulate daily decision-making. The forecasting performance and robustness of the proposed model are evaluated using both fluctuating and non-fluctuating datasets. Additionally, the study accounts for seasonal factors and performs a detailed analysis using seasonal models. The experimental results reveal that: (1) the proposed model achieves superior forecasting performance compared to other benchmarks; (2) the decomposition and reconstruction modules contribute to significant model optimization; (3) the proposed model outperforms Naive methods and demonstrates promising application potential. Future research could focus on: (1) Performance of economic analyses on each decomposed module to assess the impact of major events or economic policies; and (2) Integration of error correction mechanisms for datasets with pronounced volatility to improve forecasting accuracy.
However, this study has several potential limitations that require further exploration. First, the case study is confined to the Spanish electricity market, and its applicability to other markets with different characteristics (e.g., varying regulatory frameworks or energy mix structures) remains untested. Second, while the study accounted for the impact of economic events on electricity prices and conducted breakpoint tests, it did not delve into the underlying political and economic factors or the specific mechanisms through which they exert influence.
Building on the aforementioned limitations and findings, future research can be advanced in the following aspects: (1) Expand the data scope to include multi-regional and multi-type electricity markets, and incorporate cross-market comparative analysis to enhance the model’s generalization ability. (2) Integrate econometric analysis into the decomposition module, and introduce dummy variables to quantify the impact of major economic events (such as carbon policy adjustments and international natural gas price shocks) on each modal dataset. This will help establish linkages between economic mechanisms and model features, thereby improving the interpretability of forecasting results.

Author Contributions

Formal analysis, N.C.; Writing—original draft, N.C.; Software, N.C. and J.F.; Visualization, N.C., L.Y. and J.H.; Writing—review and editing, N.C., C.G., L.Y., J.H. and J.F.; Data cu-ration, N.C. and C.G.; Methodology, N.C. and J.H.; Investigation, C.G.; Conceptualization, J.H.; Resources, J.H.; Supervision, J.H.; Project administration, J.H.; Validation, J.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by Youth Program of National Natural Science Foundation of China under Grant 72103186, Innovation Centre for Digital Business and Capital Development of BTBU under Grant SZSK202309, and BTBU Digital Business Platform Project by BMEC.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets presented in this article are not readily available because the data are part of an ongoing study. Requests to access the datasets should be directed to corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

This study presents a four-stage modeling framework—Decomposition -Reconstruction-Optimization-Integration (DROI)—coupled with an econometric breakpoint test, which is applied to assess the forecasting performance of Spanish electricity price data across different time segments. Specifically, the CEEMDAN decomposition method is adopted to decompose complex signals into intrinsic modes; this process preserves critical features while mitigating noise, and the data is further reconstructed according to distinct frequency states. The Improved Sparrow Search Algorithm (ISSA) is utilized to optimize the initial parameters of the model, thereby minimizing errors induced by human factors. Within the forecasting framework, Convolutional Neural Networks (CNN) are employed to extract features from frequency states, with the integration of an Attention mechanism to assign weights to channels and highlight key attributes. Meanwhile, Long Short-Term Memory (LSTM) networks undertake the task of time series forecasting.

Appendix A.1. The Decomposition Method

Step 1: Data preparation.
x ( t ) = x ( t ) i = 1 t ( x i x ¯ ) 2 t  
where n represents the total number of data and x ( t ) denotes the original data.
Step 2: White noise mode decomposition
t k x = 1 i I M F ( t ) + r i
I M F 1 ( t ) ¯ = 1 k i = 1 k I M F ( t )
r 1 ( t ) = x ( t ) I M F 1 ( t ) ¯
where t k x represents the raw data with Gaussian white noise, k denotes the number of decomposed modes, r i ( t ) is the residual of the I-th mode.
Step 3: Extract residual modes.
x ( t ) = i = 1 k I M F i ( t ) ¯ + r k ( t )
Algorithm A1. fully adaptive noise ensemble empirical modal decomposition (CEEMDAN)
EMD function:
m 1 ( t ) = x m a x ( t ) + x m i n ( t ) 2
d i ( t ) = m i ( t ) m i 1 ( t )
Until
S D = i = 0 T [ | d k 1 ( t ) d k ( t ) | 2 d k 1 2 ( t ) ] < h
Obtained
I M F 1 = d i ( t )
r 1 ( t ) = x ( t ) I M F 1 ( t )
After iteration
x ( t ) = i = 1 n I M F n ( t ) + r n ( t )
Input: Time-series X = { X i R p × R , 1 i n } ;
N s t d = The standard deviation of Gaussian white noise
N R = The number of times noise is added
M a x i t e r = The maximum number of filter iterations allowed
Output:  Y = { X i j R p × R , 1 i n , 1 i m } ;   x i = j = 1 m x i j
1# Standardize the data X
2 x ( t ) = x ( t ) i = 1 t ( x i x ¯ ) 2 t 1 i n
3# Add white gaussian noise, and realize the application of empirical mode decomposition for each white noise
4 x t k = x ( t ) + N s t d × n o i s e i
5# Decomposition of white noise using EMD function
6# Store modal data
7While the number of sign change of second-order difference >2
8for i   ← 1:   N R
9        if      T h e   n u m b e r   o f   W h i t e   n o i s e   m o d u l e   k + 1
10        # Get Gaussian white noise m o d e s _ w h i t e _ n o i s e     n o i s e { k }
11                                       m o d e s _ w h i t e _ n o i s e N s t d × n o i s e i = 1 n ( n o i s e i n o i s e ¯ ) 2 n
12    # Use the EMD function to extract the modal
13        end
14        else
15        # Use the EMD function to iterate
16        end
17    # Record number of iterations
18  end
19 k k + 1
20end
21# Perform decomposition and output the decomposition result Y

Appendix A.2. The Optimization Algorithm ISSA

Step 1: Random variable chaotic diffusion initialization.
z i + 1 = ( 2 z i ) m o d 1 + R N
where the initial value z 0 and R are random numbers in (0, 1), and N represents the number of sparrows. The sequence of z is generated by continuous iteration
Step 2: Sparrow food search process.
w t = 0.2 sin ( π 2 × t M )
i , j t + 1 x = i , j t + 1 w t x e i α T , R 2 < S T i , j t + 1 w t x + Q L , R 2 > S T
where t denotes the current number of iterations, M represents the maximum number of iterations, ST (0.5 ≤ ST ≤ 1) indicates the environment safety threshold, α (0 < α < 1) is a random number, R 2 also represents random number ( R 2   [ 0 ,   1 ] ) , Q is a random number that follows a normal distribution within the range [0, 1], L represents a 1 × D moment matrix, where each element in the matrix is equal to 1.
Step 3: Lévy flight mechanism.
i t + 1 x = i t x + l l e v y ( λ )
s = μ v 1 γ
μ ~ N ( 0 , μ 2 σ )
v ~ N ( 0,1 )
σ μ = τ 1 + γ sin π γ 2 γ τ 1 + γ 2 . 2 1 + γ 2
where γ is typically set to 1.5, i t x denotes the position of the i-th individual in the t-th iteration, ⊕ represents the multiplication of elements on an element-by-element basis. Additionally, l indicates the control parameter for adjusting the step length,.   l = 0.01 × ( i j t x p t x ) . p t x denotes the best position attained by the discoverer during the t-th iteration. The function levy(λ) models defines a trajectory that follows the Lévy distribution, demonstrating the Lévy flight strategy as described in the preceding formula.
Step 4: Variable spiral search strategy.
i , j t + 1 x = e z l c o s 2 π l Q e w o r s t t x i , j t x i 2 , i > N 2 p t + 1 x + i , j t x p t + 1 x A + L e z l cos 2 π l , i N 2
z = e k cos ( π ( 1 t M ) )
where k represent the coefficient of change. Based on the optimization characteristics of each function, we set k = 5 to ensure that the algorithm maintains an appropriate search range. Define L as a uniformly distributed random number within the interval [−1, 1]. Let t denote the current iteration number and M the he maximum number of iterations. Let p t + 1 x denote the best position occupied by the discoverer in the (t + 1)-th iteration. Let A be a 1 × D matrix in which each element is randomly assigned a value of either 1 or −1, and set A + = A T ( A A T ) 1 .
Step 5: Iterative optimization.
i , j t + 1 x = b e s t t x + β i j t x b e s t t x , i f   f i f g p t + 1 x + K i j t x b e s t t x ( f i f w ) + ε , i f   f i = f g
where β represents a random variable from a standard normal distribution, serving to regulate the step size. K indicates the direction of movement for an individual sparrow and serves as a step control parameter, taking values within the range of −1 to 1. ε denotes a small constant used to ensure that the denominator does not equal zero. Finally, the best and worst fitness values in the current iteration are represented by f w and f g , respectively, while f i represents the fitness of the i-th iteration

Appendix A.3. The Forecasting Model

(1) Convolutional Neural Networks (CNN)
The calculation formula of the two-dimensional convolution layer is
G m , n = f h m , n = j = 1 m i = 1 n h j , i f m j , n i
where f denotes the input, h represents the kernel, m and n refer to the row and column indices of the resulting matrix, respectively, while j and i represent the element positions.
The calculation formula of two-dimensional pooling layer is
y k i j = 1 R i j i = 1 n j = 1 m x k i j
where y k i j represents the average pooled output value of R i j in the rectangular region related to the kth feature map, x k i j represents the element at ( i , j ) in the rectangular region R i j , and R i j represents the number of R i j elements in the rectangular region.
(2) SE Attention
The SE module applies a filter v c to weight the input data X, enhancing the learning of convolutional features. This process improves the network’s sensitivity to informative features, thereby boosting its performance.
u c = v c X = i = 1 C c s v x s
where ∗ represents convolution. This module is mainly divided into extrusion and calibration processes.
Step 1: Extrusion, global information embedding
z c = F s q u c = 1 H × W i = 1 H i = 1 W u c ( i , j )
The statistical data z c ∈R is derived from the contraction U by applying global average pooling over its spatial dimensions H × W.
Step 2: Excitation, adaptive recalibration
s = F e s Z , W = σ ( W 2 δ ( W 1 z ) )
x ~ c = F s c a l e u c , s c = s c u c
where δ denotes the ReLU function, x ~ = [ x ~ 1 , x ~ 2 , , x ~ c ] and F s c a l e ( u c , s c ) represents the channel-wise multiplication between the scalar s c and the feature map u c R H × W . The dimensionality is reduced first and then raised by the ReLU activation function to make better use of the aggregated information in step 1 extrusion.
(3) LSTM networks
Step 1: Forget gate.
f t = σ   (   W f     [ h t 1 ,   x t ] + b f   )  
where f t represents the state of the forget gate at time t. In the LSTM cell, the forget gate is governed by a weight parameter W f , a bias term b f , and an S-shaped activation function σ , which collectively regulate the flow of information. These components jointly determine whether to keep or discard data from the prior time step when handling new inputs.
Step 2: Signal Storage.
f t = σ   ( W f     [ h t 1 ,   x t ] + b f )
C t = t a n h ( W c     [ h t 1 ,   x t ] +   b c
C t = f   ( t )     C t 1 +   i t     C t
Furthermore, the cell state is parameterized by the weight matrix W c and the bias term b c . The hyperbolic tangent activation function tanh is utilized, along with the Hadamard product .
Step 3: Information Transmission.
o t = σ   ( W o     [ h t 1 ,   x t ] + b o )  
h t = o t     t a n h   C t
where h t signifies the hidden state at the current time instance. At time t, the state of the output gate, represented by o t , is calculated using the weight matrix W o and bias b o .

Appendix B

To investigate the convergence speed and performance of ISSA, this study comprehensively tested five swarm intelligence optimization algorithms, such as the bat algorithm (BA), particle swarm optimization (PSO), genetic algorithm (GA) and cuckoo search algorithm (CSA), using three commonly used minimization benchmark functions to evaluate their performance. The three basic functions used in this study are the Rosenbrock function, the Rastrigin function, and the Griewank function. Their specific function expressions are shown in Table A1. It is important to note that to test the convergence performance of different algorithms on the benchmark functions, all algorithms were run through 1000 iterations, with an initial population size of 50. To further investigate the impact of search dimension on algorithm convergence performance, three additional experiments were conducted for each algorithm, with the search space dimensions set to dim = 10, dim = 30, and dim = 50, respectively. Furthermore, each benchmark function optimization test was independently run 30 times. Results were output after each iteration reached the maximum number of iterations. The output corresponding to the minimum value among the 30 independent runs was used as the test result. These results are shown in Figure A1. As can be seen from Figure 2, Figure 3, Figure 4, Figure 5, Figure 6, Figure 7 and Figure 8, compared with BA, PSO, GA, and CSA, ISSA can converge to the minimum fitness value at the 500th iteration in most cases. Especially for Rastrigin and Griewank functions with many local minima, ISSA can effectively escape from the local optimum and converge to the global optimum quickly at a higher convergence rate.
Table A1. Benchmark function description.
Table A1. Benchmark function description.
FunctionValue RangeGlobal MinimumFunction Expression
Rosenbrock x 2.084 , 2.084 0 i = 1 dim 1 100 x i + 1 x i 2 2 + x i 1 2
Rastrigin x 5.12 , 5.12 0 10 dim + i = 1 dim x i 2 10 cos 2 π x i
Griewank x 600 , 600 0 1 + 1 4000 i = 1 dim x i 2 i = 1 dim cos x i i
Figure A1. Comparison of the convergence speed of different benchmark functions in different optimization algorithms. (1) Rosenbrock function at dim = 10; (4) Rastrigin function at dim = 10; (7) Griewank function at dim = 10; (2) Rosenbrock function at dim = 30; (5) Rastrigin function at dim = 30; (8) Griewank function at dim = 30; (3) Rosenbrock function at dim = 50; (6) Rastrigin function at dim = 50; (9) Griewank function at dim = 50.
Figure A1. Comparison of the convergence speed of different benchmark functions in different optimization algorithms. (1) Rosenbrock function at dim = 10; (4) Rastrigin function at dim = 10; (7) Griewank function at dim = 10; (2) Rosenbrock function at dim = 30; (5) Rastrigin function at dim = 30; (8) Griewank function at dim = 30; (3) Rosenbrock function at dim = 50; (6) Rastrigin function at dim = 50; (9) Griewank function at dim = 50.
Sustainability 17 11210 g0a1

References

  1. Wu, H.; Liang, Y.; Heng, J.-N.; Ma, C.-X.; Gao, X.-Z. MSV-Net: Multi-Scale Visual-Inspired Network for Short-Term Electricity Price Forecasting. Energy 2024, 291, 130350. [Google Scholar] [CrossRef]
  2. Agakishiev, I.; Härdle, W.K.; Kopa, M.; Kozmik, K.; Petukhina, A. Multivariate Probabilistic Forecasting of Electricity Prices with Trading Applications. Energy Econ. 2025, 141, 108008. [Google Scholar] [CrossRef]
  3. Zhang, B.; Tian, H.; Berry, A.; Roussac, A.C. A Local-Temporal Convolutional Transformer for Day-Ahead Electricity Wholesale Price Forecasting. Sustainability 2025, 17, 5533. [Google Scholar] [CrossRef]
  4. Contreras, J.; Espinola, R.; Nogales, F.J.; Conejo, A.J. ARIMA Models to Predict Next-Day Electricity Prices. IEEE Trans. Power Syst. 2003, 18, 1014–1020. [Google Scholar] [CrossRef]
  5. Zhou, M.; Yan, Z.; Ni, Y.X.; Li, G.; Nie, Y. Electricity Price Forecasting with Confidence-Interval Estimation through an Extended ARIMA Approach. IEE Proc.—Gener. Transm. Distrib. 2006, 153, 187–195. [Google Scholar] [CrossRef]
  6. Girish, G.P. Spot Electricity Price Forecasting in Indian Electricity Market Using Autoregressive-GARCH Models. Energy Strategy Rev. 2016, 11–12, 52–57. [Google Scholar] [CrossRef]
  7. Ghimire, S.; Deo, R.C.; Casillas-Pérez, D.; Salcedo-Sanz, S. Two-Step Deep Learning Framework with Error Compensation Technique for Short-Term, Half-Hourly Electricity Price Forecasting. Appl. Energy 2024, 353, 122059. [Google Scholar] [CrossRef]
  8. Chen, X.; Dong, Z.Y.; Meng, K.; Xu, Y.; Wong, K.P.; Ngan, H.W. Electricity Price Forecasting with Extreme Learning Machine and Bootstrapping. IEEE Trans. Power Syst. 2012, 27, 2055–2062. [Google Scholar] [CrossRef]
  9. Li, C.; Guo, Z. Short-Term System Marginal Price Forecasting with Hybrid Module. In Proceedings of the International Conference on Power System Technology, Kunming, China, 13–17 October 2002; Volume 4, pp. 2426–2430. [Google Scholar]
  10. Tang, Q.; Gu, D. Day-Ahead Electricity Prices Forecasting Using Artificial Neural Networks. In Proceedings of the 2009 International Conference on Artificial Intelligence and Computational Intelligence, Shanghai, China, 7–8 November 2009; Volume 2, pp. 511–514. [Google Scholar]
  11. Shrivastava, N.A.; Panigrahi, B.K.; Lim, M.H. Electricity Price Classification Using Extreme Learning Machines. Neural Comput. Appl. 2016, 27, 9–18. [Google Scholar] [CrossRef]
  12. 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]
  13. Wang, T.; Fu, L.; Zhou, Y.; Gao, S. Service Price Forecasting of Urban Charging Infrastructure by Using Deep Stacked CNN-BiGRU Network. Eng. Appl. Artif. Intell. 2022, 116, 105445. [Google Scholar] [CrossRef]
  14. Cantillo-Luna, S.; Moreno-Chuquen, R.; Lopez Sotelo, J.A. Intra-Day Electricity Price Forecasting Based on a Time2Vec-LSTM Neural Network Model. In Proceedings of the 2023 IEEE Colombian Conference on Applications of Computational Intelligence (ColCACI), Bogotá, Colombia, 26–28 July 2023; pp. 1–6. [Google Scholar]
  15. Abedinia, O.; Amjady, N.; Shafie-Khah, M.; Catalão, J.P. Electricity Price Forecast Using Combinatorial Neural Network Trained by a New Stochastic Search Method. Energy Convers. Manag. 2015, 105, 642–654. [Google Scholar] [CrossRef]
  16. Shejul, K.; Harikrishnan, R.; Gupta, H. The Improved Integrated Exponential Smoothing Based CNN-LSTM Algorithm to Forecast the Day Ahead Electricity Price. MethodsX 2024, 13, 102923. [Google Scholar] [CrossRef]
  17. Pourdaryaei, A.; Mohammadi, M.; Mubarak, H.; Abdellatif, A.; Karimi, M.; Gryazina, E.; Terzija, V. A New Framework for Electricity Price Forecasting via Multi-Head Self-Attention and CNN-Based Techniques in the Competitive Electricity Market. Expert Syst. Appl. 2024, 235, 121207. [Google Scholar] [CrossRef]
  18. Liu, H.; Mi, X.; Li, Y. Comparison of Two New Intelligent Wind Speed Forecasting Approaches Based on Wavelet Packet Decomposition, Complete Ensemble Empirical Mode Decomposition with Adaptive Noise and Artificial Neural Networks. Energy Convers. Manag. 2018, 155, 188–200. [Google Scholar] [CrossRef]
  19. Zhang, T.; Tang, Z.; Wu, J.; Du, X.; Chen, K. Short Term Electricity Price Forecasting Using a New Hybrid Model Based on Two-Layer Decomposition Technique and Ensemble Learning. Electr. Power Syst. Res. 2022, 205, 107762. [Google Scholar] [CrossRef]
  20. 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]
  21. Afanasyev, D.O.; Fedorova, E.A. The Long-Term Trends on the Electricity Markets: Comparison of Empirical Mode and Wavelet Decompositions. Energy Econ. 2016, 56, 432–442. [Google Scholar] [CrossRef]
  22. Shang, J.; Gao, J.; Jiang, X.; Liu, M.; Liu, D. Optimal Configuration of Hybrid Energy Systems Considering Power to Hydrogen and Electricity-Price Prediction: A Two-Stage Multi-Objective Bi-Level Framework. Energy 2023, 263, 126023. [Google Scholar] [CrossRef]
  23. Luo, H.; Shao, Y. Advanced Optimal System for Electricity Price Forecasting Based on Hybrid Techniques. Energies 2024, 17, 4833. [Google Scholar] [CrossRef]
  24. Das, R.; Bo, R.; Chen, H.; Ur Rehman, W.; Wunsch, D. Forecasting Nodal Price Difference Between Day-Ahead and Real-Time Electricity Markets Using Long-Short Term Memory and Sequence-to-Sequence Networks. IEEE Access 2022, 10, 832–843. [Google Scholar] [CrossRef]
  25. Krishna Prakash, N.; Singh, J.G. Electricity Price Forecasting Using Hybrid Deep Learned Networks. J. Forecast. 2023, 42, 1750–1771. [Google Scholar]
  26. Yu, H.; Wang, Z.; Xie, Y.; Wang, G. A Multi-Granularity Hierarchical Network for Long- and Short-Term Forecasting on Multivariate Time Series Data. Appl. Soft Comput. 2024, 157, 111537. [Google Scholar] [CrossRef]
  27. Shen, Z.Y.; Ban, W.C. Machine Learning Model Combined with CEEMDAN Algorithm for Monthly Precipitation Prediction. Earth Sci. Inform. 2023, 16, 1821–1833. [Google Scholar] [CrossRef]
  28. Xue, J.; Shen, B. A Novel Swarm Intelligence Optimization Approach: Sparrow Search Algorithm. Syst. Sci. Control Eng. 2020, 8, 22–34. [Google Scholar] [CrossRef]
  29. Ouyang, C.; Qiu, Y.; Zhu, D. Adaptive Spiral Flying Sparrow Search Algorithm. Sci. Program. 2021, 2021, 6505253. [Google Scholar] [CrossRef]
  30. Hong, Y.-Y.; Taylar, J.V.; Fajardo, A.C. Locational Marginal Price Forecasting Using Deep Learning Network Optimized by Mapping-Based Genetic Algorithm. IEEE Access 2020, 8, 91975–91988. [Google Scholar] [CrossRef]
  31. Xu, Y.; Liu, T.; Du, P. Volatility Forecasting of Crude Oil Futures Based on Bi-LSTM-Attention Model: The Dynamic Role of the COVID-19 Pandemic and the Russian-Ukrainian Conflict. Resour. Policy 2024, 88, 104319. [Google Scholar] [CrossRef]
  32. Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar]
  33. Chang, J.; Hou, J.; Gong, H.; Sun, Y. Optimization of CNN-LSTM Air Quality Prediction Based on the POA Algorithm. Sustainability 2025, 17, 5347. [Google Scholar] [CrossRef]
  34. Shumway, R.H.; Stoffer, D.S. Time Series Analysis and Its Applications (Springer Texts in Statistics); Guide Books; Springer: Berlin/Heidelberg, Germany, 2005. [Google Scholar]
  35. Graves, A. Long Short-Term Memory. In Supervised Sequence Labelling with Recurrent Neural Networks; Studies in Computational Intelligence; Springer: Berlin/Heidelberg, Germany, 2012; Volume 385, pp. 37–45. ISBN 978-3-642-24796-5. [Google Scholar]
  36. Aslam, S.; Ayub, N.; Farooq, U.; Alvi, M.J.; Albogamy, F.R.; Rukh, G.; Haider, S.I.; Azar, A.T.; Bukhsh, R. Towards Electric Price and Load Forecasting Using CNN-Based Ensembler in Smart Grid. Sustainability 2021, 13, 12653. [Google Scholar] [CrossRef]
  37. Huang, G.-B.; Zhu, Q.-Y.; Siew, C.-K. Extreme Learning Machine: Theory and Applications. Neurocomputing 2006, 70, 489–501. [Google Scholar] [CrossRef]
  38. Rumelhart, D.E.; Hintont, G.E.; Williams, R.J. Learning Representations by Back-Propagating Errors. Nature 1986, 323, 533–536. [Google Scholar] [CrossRef]
  39. Wu, Z.; Zhou, J.; Yu, X. Forecast Natural Gas Price by an Extreme Learning Machine Framework Based on Multi-Strategy Grey Wolf Optimizer and Signal Decomposition. Sustainability 2025, 17, 5249. [Google Scholar] [CrossRef]
  40. Huang, A.; Liu, X.; Rao, C.; Zhang, Y.; He, Y. A New Container Throughput Forecasting Paradigm under COVID-19. Sustainability 2022, 14, 2990. [Google Scholar] [CrossRef]
  41. Abadie, L.M. Energy Market Prices in Times of COVID-19: The Case of Electricity and Natural Gas in Spain. Energies 2021, 14, 1632. [Google Scholar] [CrossRef]
Figure 1. SE Attention weighting process.
Figure 1. SE Attention weighting process.
Sustainability 17 11210 g001
Figure 2. The framework of the proposed model.
Figure 2. The framework of the proposed model.
Sustainability 17 11210 g002
Figure 3. The CEEMDAN decomposition result.
Figure 3. The CEEMDAN decomposition result.
Sustainability 17 11210 g003
Figure 4. The reconstruction results after CEEMDAN decomposition.
Figure 4. The reconstruction results after CEEMDAN decomposition.
Sustainability 17 11210 g004
Figure 5. Spanish electricity price data. Note: 1. In March 2020, Spain experienced a concurrent rise in natural gas prices and carbon emission costs; 2. In February 2022, the Russia-Ukraine war broke out, which had a huge impact on the European electricity market.
Figure 5. Spanish electricity price data. Note: 1. In March 2020, Spain experienced a concurrent rise in natural gas prices and carbon emission costs; 2. In February 2022, the Russia-Ukraine war broke out, which had a huge impact on the European electricity market.
Sustainability 17 11210 g005
Figure 6. The forecasting errors offered by different models.
Figure 6. The forecasting errors offered by different models.
Sustainability 17 11210 g006
Figure 7. Interval forecasting results offered by the proposed model. Note: The confidence level is 95%.
Figure 7. Interval forecasting results offered by the proposed model. Note: The confidence level is 95%.
Sustainability 17 11210 g007
Figure 8. Training and forecasting data during the epidemic period.
Figure 8. Training and forecasting data during the epidemic period.
Sustainability 17 11210 g008
Figure 9. Training and forecasting data during the Russia–Ukraine conflict period.
Figure 9. Training and forecasting data during the Russia–Ukraine conflict period.
Sustainability 17 11210 g009
Figure 10. The DM test of the epidemic period. Note: 1. The ITTL and SVR forecasting model of DM test p value is greater than 0.05. 2. The lower model is set to Model A, and the left model is set to Model B. A positive DM value (red) indicates that the corresponding left model has less error, and a negative DM value (blue) indicates that the corresponding lower model has less error.
Figure 10. The DM test of the epidemic period. Note: 1. The ITTL and SVR forecasting model of DM test p value is greater than 0.05. 2. The lower model is set to Model A, and the left model is set to Model B. A positive DM value (red) indicates that the corresponding left model has less error, and a negative DM value (blue) indicates that the corresponding lower model has less error.
Sustainability 17 11210 g010
Figure 11. The DM test of the epidemic period. Note: The lower model is set to Model A, and the left model is set to Model B. A positive DM value (red) indicates that the corresponding left model has less error, and a negative DM value (blue) indicates that the corresponding lower model has less error.
Figure 11. The DM test of the epidemic period. Note: The lower model is set to Model A, and the left model is set to Model B. A positive DM value (red) indicates that the corresponding left model has less error, and a negative DM value (blue) indicates that the corresponding lower model has less error.
Sustainability 17 11210 g011
Table 1. Literature research in the field of electricity price forecasting.
Table 1. Literature research in the field of electricity price forecasting.
CategoriesMethodsRefs.AdvantagesDisadvantagesMAPE(%)
Econometric modelsARIMA[4,5]It has strong interpretabilityThe percentage error is relatively large2.2573
GARCH[6]Compared with ARIMA, it effectively evaluates the implied volatility within a time series.1. For periods of low volatility, the forecasting is not as effective as ARIMAnot applicable
2. The percentage error is relatively large
Machine learning modelsBP[9,10]Has the ability to approximate any function with finite discontinuities with arbitrary precision1. More sensitive to noise2.9536
2. Highly dependent on the choice of hyperparameters
ELM[11]Higher generalization ability and extremely fast speedDifficult to capture the dependence of time2.6173
LSTM[14,24]Hyperparameter adjustment is difficultExcels at extracting patterns and understanding long-term dependencies from nonlinear time series data2.0606
CNN[17]Maybe limited in processing global informationEffective at capturing local features2.9060
Hybrid modelsDecomposition or optimization[19,20,21,22,23,25]1. Facilitate feature extraction
2. Reduce modal noise
3. Improve forecasting accuracy
Increased model complexity1.3758
Note: The selected dataset exhibits significant volatility after 2021, and the GARCH model is not applicable to this dataset.
Table 2. Analysis results of imf and trend item res based on CEEMDAN decomposition.
Table 2. Analysis results of imf and trend item res based on CEEMDAN decomposition.
ComponentSample SizeAverage Period (Days)Coefficient of Correlation with the Original SequenceVariance Contribution Rate (%)
imf147,8110.130.0642 **1.09
imf247,8110.250.0901 **0.09
imf347,8110.500.1612 **1.62
imf447,8110.500.2189 **7.40
imf547,8111.000.2162 **4.93
imf647,8111.000.1662 **2.68
imf747,8112.330.1344 **2.41
imf847,8113.500.1600 **4.98
imf947,8117.000.1735 **7.12
imf1047,81115.580.1232 **3.16
imf1147,81123.170.1384 **4.65
imf1247,81145.290.1191 **2.84
imf1347,811104.830.1342 **5.44
imf1447,811181.080.2590 **6.93
imf1547,811398.420.3432 **18.91
imf1647,811664.040.3397 **17.74
imf1747,8111992.130.2701 **3.26
res47,8111992.130.05655.44
Note: ** indicates a significance level of 1% and correlation is the Pearson correlation coefficient.
Table 3. t-test of electricity price sequence based on CEEMDAN decomposition.
Table 3. t-test of electricity price sequence based on CEEMDAN decomposition.
ComponentSample SizeDetection Value = 0
T-ValueDegree of
Freedom
Significance95% Confidence Level
UpperFloor
imf147,811−0.147547,8100.8827 −0.00000.0000
imf247,811−1.463747,8100.1433 −0.00000.0000
imf347,811−2.914247,8100.0036 −0.0000−0.0000
imf447,811−2.037447,8100.0416 −0.0001−0.0000
imf547,8113.914347,8100.0001 0.00000.0001
imf647,8110.744547,8100.4566 −0.00000.0000
imf747,8112.221347,8100.0263 0.00000.0000
imf847,8113.927747,8100.0001 0.00000.0001
imf947,8115.980747,8100.0000 0.00010.0001
imf1047,8115.554747,8100.0000 0.00000.0001
imf1147,8117.325447,8100.0000 0.00010.0001
imf1247,8110.668847,8100.5036 −0.00000.0000
imf1347,811−9.668547,8100.0000 −0.0002−0.0001
imf1447,811−0.13147,8100.0000 −0.00000.0000
imf1547,811−5.605747,8100.0000 −0.0002−0.0001
imf1647,81132.798547,8100.0000 0.00080.0009
imf1747,81156.128847,8100.0000 0.00060.0006
Res47,8118160.71247,8100.0000 0.11460.1147
Table 4. The variance contribution rate of each structural component sequence to the electricity price sequence.
Table 4. The variance contribution rate of each structural component sequence to the electricity price sequence.
Structural ComponentVariance Contribution Rate
High frequency component (Random series)13.65%
Intermediate frequency component (Periodic series)82.27%
Low-frequency component (Trend series)4.07%
Table 5. Explanation and formulas for the rules of performance evaluation.
Table 5. Explanation and formulas for the rules of performance evaluation.
CategoryErrorFormula
Ascertainment errorMSE E = i = 1 n ( y i y ^ i ) 2 n
RMSE R M S E = i = 1 n ( y i y ^ i ) 2 n
MAPE M A P E = i = 1 n | y i y ^ i y i | n
MAE M A E = i = 1 n | y i y ^ i | n
Lilliefors testIf p is greater than 0.05, there is not enough reason to think that the residuals do not conform to the normal distribution
Interval error [39]IPCP I P C P = 1 n i = 1 n C i
w h e r e   C i = 1 ,     i f   i [ L i , U i ] 0 ,     o t h e r ;
AWD A W D = 1 n i = 1 n i α A W D
w h e r e   i α A W D = ( i α L y i ) / ( i α U i α L ) , y i < i α L 0 , y i i α L ( y i i α U ) / ( i α U i α L ) , y i > i α U .
IPNAW I P N A W = 1 n i = 1 n U i L i F ¯ F _
Note: yi is the actual electricity price, y i ^ is the forecasting value, n is the sample number, α is the confidence level, L i is the predicted value of lower bound of interval, U i is the predicted value of upper bound of interval, F ¯ is the upper of forecast, F _ is the lower of forecast.
Table 6. Hyperparameter settings of the compared models.
Table 6. Hyperparameter settings of the compared models.
ModelMeaningValue
CSLInitial learning rate0.01
L2 regularization parameter0.001
LSTM hidden layer neurons6
CCSLInitial learning rate0.01
L2 regularization parameter/
LSTM hidden layer neurons6
SCSLInitial learning rateISSA Global Search
L2 regularization parameter
LSTM hidden layer neurons
CSCSLInitial learning rateISSA Global Search
L2 regularization parameter
LSTM hidden layer neurons
Table 7. Electricity price division chow test.
Table 7. Electricity price division chow test.
Discontinuity PointDatasetF-Valuep-ValueConclusion
14 March 2020Dataset1109,725.28 0.00 Identify the structural breaks.
Dataset2
24 February 2022Dataset216,587.28 0.00 Identify the structural breaks.
Dataset3
Table 8. Electricity price cycle division.
Table 8. Electricity price cycle division.
DatasetDescriptionInterval
Dataset1Before the energy market turbulence1 April 2014–14 March 2020
Dataset2The energy price fluctuations14 March 2020–24 February 2022
Dataset3The Russia-Ukraine political conflict24 February 2022–21 March 2023
Table 9. Experiment division table.
Table 9. Experiment division table.
ExperimentGoal
Section 4: Model forecasting effect experiment
(without large fluctuations and extreme points)
Evaluate model performance
    Experiment 1: Model forecastingEvaluate the forecasting accuracy
        Experiment 1.1: Research on basic model forecasting
        Experiment 1.2: Research on hybrid model forecasting
        Experiment 1.3: Research on interval forecasting
    Experiment 2: Ablation experimentEvaluate the network structure
        Experiment 2.1: Decomposition algorithm ablation experiment
        Experiment 2.2: Optimization algorithm ablation experiment
    Experiment 3: Research on seasonal forecastingEvaluate the forecasting accuracy
Section 5: Model robustness test
(with a large number of volatility cases and extreme points)
Evaluate model stability
    Experiment 4: Research on the epidemic cycle Evaluate the forecasting accuracy
    Experiment 5: Research on the Russia-Ukraine conflict cycle Evaluate the forecasting accuracy
    Experiment 6: The DM testEvaluate model stability
Table 10. Research on basic model forecasting.
Table 10. Research on basic model forecasting.
ModelMSERMSEMAEMAPE
LSTM9.16 × 10−60.00300.00232.0606
SVR1.28 × 10−50.00360.00272.4348
ARIMA8.60 × 10−60.00290.00252.2573
BP1.71 × 10−50.00410.00332.9536
ELM1.44 × 10−50.00380.00292.6173
CNN1.92 × 10−50.00440.00292.9060
Transformer2.95 × 10−50.00540.00414.5552
Naive1.09 × 10−50.00330.00232.0772
The proposed model3.99 × 10−60.00200.00151.3758
Note: Naive is to imitate the consumption decisions of the public, and take the electricity price of the previous period directly as the predicted value of the next period, which has a strong reference.
Table 11. Research on Hybrid model.
Table 11. Research on Hybrid model.
ModelMSERMSEMAEMAPELilliefors
LSTM8.84 × 10−60.0030 0.0024 2.1765 0.0074
LSTM-attention8.93 × 10−60.0030 0.0026 2.3644 0.0000
CSL1.22 × 10−50.0035 0.0027 2.3823 0.1426
CCSL5.78 × 10−60.0024 0.0019 1.6839 0.1232
SCSL1.20 × 10−50.00350.00262.28530.0000
The proposed model3.99 × 10−60.0020 0.0015 1.3758 0.3390
Note: 1. Lilliefors normality test: If p is greater than 0.05, there is not enough reason to think that the residuals do not conform to the normal distribution. 2. CCSL represents a CSL model enhanced by CEEMDAN, which performs decomposition and reconstruction of the original sequence. 3.SCSL refers to a CSL model that incorporates ISSA for parameter optimization.4.The proposed model represents the proposed hybrid model that integrates CEEMDAN, ISSA, CNN, SE Attention, and LSTM architectures for enhanced forecasting capability.
Table 12. Mixed model residual table.
Table 12. Mixed model residual table.
Residuals of Composite ModelMaxMinMeanSkewnessKurtosis
LSTM0.0105−0.00820.00140.01994.0061
LSTM-Attention0.0033−0.0062−0.00220.50602.9786
CSL0.0108−0.01010.00130.03213.5058
CCSL0.0075−0.00480.00150.06523.7906
SCSL0.0143−0.00890.00280.43783.2791
CSCSL0.0062−0.00630.00020.09623.5658
Note: Residual is the difference between true value and predicted value.
Table 13. Interval forecasting results.
Table 13. Interval forecasting results.
Confidence IntervalModelIPCP(%)AWDIPNAW
95%LSTM100.0000 0.0000 0.7419
SVR100.0000 0.0000 0.7264
ARIMA50.8333 0.3294 0.9567
BP100.0000 0.0000 0.6484
ELM100.0000 0.0000 0.7258
RFELM99.7183 0.0027 0.6984
LSTM-Attention100.0000 0.0000 0.6780
CSL100.0000 0.0000 0.7496
CCSL100.0000 0.0000 0.7891
The proposed model100.0000 0.0000 0.7387
90%LSTM100.0000 0.0000 0.6226
SVR99.7183 0.0024 0.6096
ARIMA43.8889 0.5318 0.8029
BP98.5915 0.0118 0.5442
ELM100.0000 0.0000 0.6091
RFELM99.7183 0.0027 0.5861
LSTM-Attention100.0000 0.0000 0.5690
CSL100.0000 0.0000 0.6291
CCSL100.0000 0.0000 0.6622
The proposed model100.0000 0.0000 0.6199
85%LSTM100.0000 0.0000 0.5449
SVR99.1549 0.0069 0.5335
ARIMA40.0000 0.5626 0.7026
BP97.7465 0.0159 0.4762
ELM99.4366 0.0043 0.5330
RFELM98.8732 0.0086 0.5129
LSTM-Attention99.4805 0.0040 0.4980
CSL100.0000 0.0000 0.5505
CCSL100.0000 0.0000 0.5796
The proposed model100.0000 0.0000 0.5426
80%LSTM99.7183 0.0020 0.4845
SVR97.4648 0.0188 0.4750
ARIMA37.7778 0.5833 0.6255
BP96.9014 0.0243 0.4240
ELM99.1549 0.0063 0.4745
RFELM98.0282 0.0153 0.4567
LSTM-Attention98.9610 0.0077 0.4433
CSL100.0000 0.0000 0.4901
CCSL100.0000 0.0000 0.5160
The proposed model100.0000 0.0000 0.4830
75%LSTM99.7183 0.0021 0.4349
SVR95.2113 0.0319 0.4263
ARIMA35.5556 0.6052 0.5615
BP94.6479 0.0384 0.3806
ELM97.7465 0.0150 0.4260
RFELM96.3380 0.0263 0.4099
LSTM-Attention98.1818 0.0132 0.3979
CSL100.0000 0.0000 0.4399
CCSL100.0000 0.0000 0.4631
The proposed model100.0000 0.0000 0.4336
Table 14. Optimization effect study of CEEMDAN.
Table 14. Optimization effect study of CEEMDAN.
ModelMSERMSEMAEMAPE
ISSA-CNN-SE Attention-LSTM1.20 × 10−50.00350.00262.2853
ICEEMDAN-ISSA-CNN-SE Attention-LSTM9.43 × 10−60.0031 0.0022 1.9877
The proposed model3.99 × 10−60.00200.00151.3758
Note: The optimal parameters obtained by ISSA optimization algorithm are as follows: the learning rate is 0.0247, the number of hidden layer neurons is 6, the regularization coefficient is 0.0001, and the corresponding fitness (RMSE) is 0.0042.
Table 15. Compares the optimization effect of ISSA.
Table 15. Compares the optimization effect of ISSA.
ModelMSERMSEMAEMAPE
CNN-SE Attention-LSTM1.22 × 10−50.0035 0.0027 2.3823
CEEMDAN-CNN-SE Attention-LSTM5.78 × 10−60.0024 0.0019 1.6839
The proposed model3.99 × 10−60.0020 0.0015 1.3758
Table 16. Season interval forecasting hybrid model points.
Table 16. Season interval forecasting hybrid model points.
Confidence Level (%)ModelSpringSummer
IPCP(%)AWDIPNAWIPCP(%)AWDIPNAW
95CSL99.5772 0.0039 0.6887 99.7886 0.0020 0.8801
CCSL100.0000 0.0000 0.6792 100.0000 0.0000 0.8673
SCSL100.0000 0.0000 0.7329 99.7886 0.0020 0.9101
The proposed model100.0000 0.0000 0.6788 100.0000 0.0000 0.8538
90CSL98.9429 0.0091 0.5780 99.5772 0.0038 0.7386
CCSL100.0000 0.0000 0.5697 99.7886 0.0018 0.7279
SCSL99.7886 0.0017 0.6151 99.7886 0.0019 0.7638
The proposed model100.0000 0.0000 0.6230 100.0000 0.0000 0.7166
85CSL97.0402 0.0231 0.5058 98.0973 0.0147 0.6464
CCSL99.7886 0.0014 0.4985 99.7886 0.0018 0.6370
SCSL99.1543 0.0063 0.5383 99.1543 0.0065 0.6685
The proposed model100.0000 0.0000 0.5452 100.0000 0.0000 0.6271
80CSL95.9831 0.0317 0.4503 96.4059 0.0274 0.5755
CCSL99.7886 0.0016 0.4438 99.7886 0.0018 0.5671
SCSL99.1543 0.0067 0.4792 98.5201 0.0113 0.5951
The proposed model100.0000 0.0000 0.4854 100.0000 0.0000 0.5583
75CSL94.2918 0.0427 0.4042 95.1374 0.0355 0.5166
CCSL99.5772 0.0028 0.3984 99.5772 0.0032 0.5091
SCSL97.4630 0.0174 0.4302 96.6173 0.0234 0.5342
The proposed model99.7886 0.0011 0.4357 100.0000 0.0000 0.5011
Confidence Level (%)ModelAutumnWinter
IPCP(%)AWDIPNAWIPCP(%)AWDIPNAW
95CSL99.5772 0.0040 0.6802 100.0000 0.0000 0.8558
CCSL100.0000 0.0000 0.6179 100.0000 0.0000 0.8235
SCSL99.7886 0.0020 0.7829 100.0000 0.0000 0.8545
The proposed model100.0000 0.0000 0.6518 100.0000 0.0000 0.8063
90CSL99.3658 0.0057 0.5708 99.7886 0.0018 0.7182
CCSL100.0000 0.0000 0.5185 100.0000 0.0000 0.6911
SCSL99.7886 0.0020 0.6570 100.0000 0.0000 0.7171
The proposed model99.7908 0.0018 0.5470 100.0000 0.0000 0.6767
85CSL98.5201 0.0120 0.4996 99.7886 0.0018 0.6286
CCSL100.0000 0.0000 0.4538 100.0000 0.0000 0.6048
SCSL99.5772 0.0036 0.5750 99.7886 0.0017 0.6276
The proposed model99.7908 0.0018 0.4787 100.0000 0.0000 0.5922
80CSL98.0973 0.0155 0.4447 99.3658 0.0046 0.5596
CCSL99.5772 0.0028 0.4040 100.0000 0.0000 0.5384
SCSL99.1543 0.0064 0.5119 99.5772 0.0033 0.5587
The proposed model99.7908 0.0018 0.4262 100.0000 0.0000 0.5272
75CSL97.2516 0.0207 0.3992 98.7315 0.0088 0.5023
CCSL99.5772 0.0031 0.3626 100.0000 0.0000 0.4833
SCSL98.3087 0.0119 0.4595 99.5772 0.0034 0.5015
The proposed model99.5816 0.0032 0.3826 100.0000 0.0000 0.4732
Table 17. Hybrid model seasonal forecasting.
Table 17. Hybrid model seasonal forecasting.
SeasonModelMSEMAPERMSEMAE
SpringCSL4.31 × 10−52.84270.00490.0036
CCSL9.67 × 10−61.94960.00310.0024
SCSL1.58 × 10−52.62540.00430.0033
The proposed model6.31 × 10−61.54190.00250.0019
SummerCSL1.77 × 10−52.56730.00420.0030
CCSL7.80 × 10−61.82450.00280.0022
SCSL1.87 × 10−52.53800.00400.0029
The proposed model5.02 × 10−61.51470.00220.0018
AutumnCSL4.53 × 10−53.89480.00670.0050
CCSL2.26 × 10−52.94500.00480.0037
SCSL2.96 × 10−53.03970.00540.0039
The proposed model2.47 × 10−52.86350.00500.0037
WinterCSL2.42 × 10−54.43100.00660.0051
CCSL2.24 × 10−53.72470.00470.0040
SCSL3.58 × 10−53.74770.00600.0045
The proposed model6.52 × 10−61.65710.00260.0019
Table 18. Forecasting data during the epidemic cycle.
Table 18. Forecasting data during the epidemic cycle.
ModelCSLCSCSLTTLITTLSVRRFELM
IPCP(%)87.084789.137475.779257.134858.881080.4919
AWD0.12350.10400.23480.40910.40110.1895
IPNAW0.68890.46840.62740.65080.41810.5093
Note: The 95% confidence level was used for interval forecasting.
Table 19. Forecasting data during Russia–Ukraine conflict period.
Table 19. Forecasting data during Russia–Ukraine conflict period.
ModelCSLCSCSLTTLITTLSVRRFELM
IPCP(%)99.9581100.0000 99.790299.034899.832098.6140
AWD0.00040.0000 0.00170.00630.00120.0094
IPNAW0.77550.6311 0.45310.36630.40790.3624
Note: The 95% confidence level was used for interval forecasting.
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.

Share and Cite

MDPI and ACS Style

Chen, N.; Gao, C.; Yuan, L.; Heng, J.; Fan, J. An Integrated Framework for Electricity Price Analysis and Forecasting Based on DROI Framework: Application to Spanish Power Markets. Sustainability 2025, 17, 11210. https://doi.org/10.3390/su172411210

AMA Style

Chen N, Gao C, Yuan L, Heng J, Fan J. An Integrated Framework for Electricity Price Analysis and Forecasting Based on DROI Framework: Application to Spanish Power Markets. Sustainability. 2025; 17(24):11210. https://doi.org/10.3390/su172411210

Chicago/Turabian Style

Chen, Nuo, Caishan Gao, Luqi Yuan, Jiani Heng, and Jianwei Fan. 2025. "An Integrated Framework for Electricity Price Analysis and Forecasting Based on DROI Framework: Application to Spanish Power Markets" Sustainability 17, no. 24: 11210. https://doi.org/10.3390/su172411210

APA Style

Chen, N., Gao, C., Yuan, L., Heng, J., & Fan, J. (2025). An Integrated Framework for Electricity Price Analysis and Forecasting Based on DROI Framework: Application to Spanish Power Markets. Sustainability, 17(24), 11210. https://doi.org/10.3390/su172411210

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop