Next Article in Journal
Improving the Accuracy of Lane Detection by Enhancing the Long-Range Dependence
Next Article in Special Issue
Single and Multiple Separate LSTM Neural Networks for Multiple Output Feature Purchase Prediction
Previous Article in Journal
Enhanced Information Graph Recursive Network for Traffic Forecasting
Previous Article in Special Issue
Performance Improvement of Speech Emotion Recognition Systems by Combining 1D CNN and LSTM with Data Augmentation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Hybrid Forecast Model of EEMD-CNN-ILSTM for Crude Oil Futures Price

1
Hebei University of Science and Technology, Shijiazhuang 050018, China
2
Hebei Intelligent Internet of Things Technology Innovation Center, Shijiazhuang 050018, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(11), 2521; https://doi.org/10.3390/electronics12112521
Submission received: 28 April 2023 / Revised: 30 May 2023 / Accepted: 31 May 2023 / Published: 2 June 2023
(This article belongs to the Special Issue Recent Advances in Data Science and Information Technology)

Abstract

:
Crude oil has dual attributes of finance and energy. Its price fluctuation significantly impacts global economic development and financial market stability. Therefore, it is necessary to predict crude oil futures prices. In this paper, a hybrid forecast model of EEMD-CNN-ILSTM for crude oil futures price is proposed, which is based on Ensemble Empirical Mode Decomposition (EEMD), Convolutional Neural Network (CNN), and Improved Long Short-Term Memory (ILSTM). ILSTM improves the output gate of Long Short-Term Memory (LSTM) and adds important hidden state information based on the original output. In addition, ILSTM adds the learning of cell state at the previous time in the forget gate and input gate, which makes the model learn more fully from historical data. EEMD decomposes time series data into a residual sequence and multiple Intrinsic Mode Functions (IMF). Then, the IMF components are reconstructed into three sub-sequences of high-frequency, middle-frequency, and low-frequency, which are convenient for CNN to extract the input data’s features effectively. The forecast accuracy of ILSTM is improved efficiently by learning historical data. This paper uses the daily crude oil futures data of the Shanghai Energy Exchange in China as the experimental data set. The EEMD-CNN-ILSTM is compared with seven prediction models: Support Vector Regression (SVR), Multi-Layer Perceptron (MLP), LSTM, ILSTM, CNN-LSTM, CNN-ILSTM, and EEMD-CNN-LSTM. The results of the experiment show the model is more effective and accurate.

1. Introduction

Crude oil performs an essential role in human survival and development. It is a vital strategic resource and one of the most important energy sources [1]. Since China entered the 21st century, rapid industry development requires more crude oil and energy security has become increasingly important [2]. Therefore, if the crude oil price changes significantly, it will impact the economic development and financial market of China and even the whole world in a short time [3,4].
The development of machine learning has provided possibilities for predicting nonlinear and medium to long-term time series data, thus compensating for the limitations of traditional econometric models. A traditional fully connected neural network has many parameters and quickly loses time series information. The Recurrent Neural Network (RNN) has realized the extraction of information from the time dimension and has the memory ability of early data. In recent years, this model has achieved significant breakthroughs in speech recognition [5], text recognition [6], machine translation [7], and time series data analysis [8]. Still, RNN has apparent shortcomings, namely, “gradient vanishing” and “gradient explosion”. When the time series data’s length is longer, the independent variable of the activation function is smaller or larger, and the weight adjustment effect is lost in the process of product transmission of the chain rule. LSTM improves the shortcomings of RNN by gated mechanism.
The ILSTM put forward in this paper adds the calculation of the cell state at the previous time in the input gate and forget gate of LSTM to ensure the complete learning of the historical state. In addition, the output gate of LSTM is improved, and crucial hidden state information is added based on the original output to enhance the output result. Therefore, ILSTM can further improve prediction precision. This paper puts forward a hybrid forecast model of EEMD-CNN-ILSTM for crude oil futures prices. Compared with simple models, EEMD-CNN-ILSTM exhibits a more complex structure and integrates multiple components, resulting in higher prediction accuracy. It employs EEMD for preprocessing the closing price of crude oil futures historical data, extracts spatial or frequency-domain features using CNN, and uses ILSTM for sequence modeling and prediction. This model can also be applied to other time series forecasting tasks. EEMD is an enhanced version of Empirical Mode Decomposition (EMD), which solves the mode aliasing problem using noise-assisted data. EMD can also be combined with CNN-ILSTM, but EEMD offers several advantages over EMD in terms of signal decomposition. EEMD demonstrates better robustness, higher quality in extracting mode functions, improved frequency characteristics, and the ability to control noise interference. Therefore, we choose to integrate EEMD with CNN-ILSTM instead of EMD. EEMD decomposes the initial data into a residual sequence and several IMF components, each having the same characteristic time scale. In this paper, the IMF components are integrated according to low-frequency, medium-frequency, and high-frequency, aiming to reduce the model’s complexity and overall training time. CNN is responsible for further mining features in different component data and covers the shortage of ILSTM in feature extraction. Based on the closing price data of crude oil futures, this paper analyzes the Pearson Correlation Coefficient (PCC). It takes the West Texas Intermediate (WTI) crude oil closing price, the Dow Jones Industrial Average (DJIA), and the US Dollar Index (USDX) as the influencing factors. By introducing seven different comparison models, R Squared ( R 2 ), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE) are used to evaluate the forecast results as a whole [9]. The MAE, RMSE, and R 2 of EEMD-CNN-ILSTM are 8.397, 11.504, and 0.9886, respectively. By comparison, the EEMD-CNN-ILSTM model is more accurate and effective. In summary, this paper’s contributions are as follows:
(1)
This paper applies the signal decomposition method to time series prediction. The IMF components are integrated into low-frequency, medium-frequency, and high-frequency according to the Zero-Crossing Rate (ZCR). Thus, the number of components input into the model is fixed, which ensures the high availability of the model and solves the problem of long training time for too many input components.
(2)
By studying the structure and principle of RNN and LSTM models, this paper proposes ILSTM. ILSTM adds the calculation of the cell state at the previous time to the forget gate and input gate of LSTM and improves the output gate by adding important hidden state information on the basis of the original output so that the model can learn more fully from historical data.
(3)
This paper proposes a hybrid model of crude oil futures price prediction based on EEMD-CNN-ILSTM. The introduction of EEMD helps CNN to extract the features of different frequency signals better. Through comparative experiments, it is verified that the hybrid model based on EEMD-CNN-ILSTM for crude oil futures price prediction has the highest prediction accuracy and is superior to the other seven prediction models.

2. Related Work

EMD and EEMD are practical tools for analyzing nonlinear and non-stationary signal sequence data. For instance, Yu et al. forecasted crude oil prices using an EMD-based neural network [10]. Chen et al. used EMD decomposition to forecast China containerized freight index [11]. Shu et al. combined EMD decomposition with CNN and LSTM to forecast stock prices [12]. Wu et al. predicted crude oil prices by EEMD and LSTM hybrid model [13]. Tang et al. used EEMD combined with a randomized algorithm to predict oil and natural gas prices [14]. Through reading relevant papers, it is found that the decomposition and integration method is usually adopted in the application of EEMD, and its feasibility in time series data prediction is also confirmed [15]. However, in practice, when a new day’s data is inputted, the number of IMF components decomposed by EEMD may change, meaning the model needs to be retrained. In this paper, IMF components are combined into three categories of low-frequency, medium-frequency, and high-frequency according to the ZCR for training, thus improving the model’s usability and reducing its training time.
In recent decades, many domestic and foreign researchers used traditional statistical and econometric methods to predict crude oil prices. For example, the autoregressive integrated moving average model [16], generalized autoregressive conditional heteroscedasticity [17], vector autoregressive [18], random walk [19], and error correction model [20] were used to forecast crude oil price. However, traditional statistical methods cannot thoroughly study the nonlinear and non-stationary characteristics of time series data, and the forecast accuracy is relatively poor.
The artificial neural network can learn complex nonlinear data, which solves the shortcomings of traditional statistical methods in forecasting time series data [21]. RNN can remember previous data, so it can be used for time series forecasting. However, the RNN cannot learn the long-term dependencies in the data, and the problems of “gradient disappearance” and “gradient explosion” will occur [22].
LSTM effectively overcomes the shortcomings of RNN and adopts gated technology to learn long-term dependencies in the data. For instance, Manowska et al. used LSTM to forecast crude oil consumption [23], and Liu et al. used LSTM to predict and analyze renewable energy supply risk [24]. Due to the prediction model being single, extracting the data feature is often insufficient, and it is challenging to achieve a high-precision forecast. Yang et al. used EEMD, LSTM, linear regression, and Bayesian ridge regression methods to prove the superiority of decomposing the original data into multiple sub-sequence values by EEMD, then using LSTM to predict each subsequence value, respectively, for final integration [25]. CNN can be used in predicting time series data. Sun et al. proposed a CNN-LSTM soybean yield prediction model, which confirmed that the hybrid model combined with CNN was better than a single LSTM model [26]. Zhang et al. used the CNN-LSTM hybrid model to predict air quality [27]. Kim and Sun, and Zhang et al. used the feature extraction of CNN to further improve the prediction accuracy.

3. Models

3.1. EEMD

In 1998, Huang and Shen et al. proposed the EMD method, which can be used to decompose time series data [28]. EMD decomposes a set of time series data into several IMF components, each representing the change frequency and trend of the original data on different scales. However, EMD has the disadvantage of mode aliasing. The so-called mode aliasing means that there are signals with different frequencies or scales in an IMF component, or signals with the same frequency or scale are decomposed into different IMF components. Due to the above problems, in 2009, Wu and Huang et al. [29] put forward EEMD using the noise-assisted data analysis method. EEMD can decompose the initial time series data into one residual sequence (Res) and n IMF components. Noise amplitude and ensemble numbers in EEMD decomposition are crucial parameters that affect modal decomposition. According to the previous research results [30,31] and crude oil futures data characteristics, the noise amplitude is set to 0.04, and ensemble numbers are set to 100. Finally, we use the daily closing price data of crude oil futures from 26 March 2018 to 18 November 2022, in the Shanghai Energy Exchange of China as the experimental data set. Figure 1 shows the decomposition of the closing price into one residual sequence and eight IMF components.
As the data decomposed by EEMD is historical, considering the input of future data, the number of decomposition results may change, which means that the model trained after decomposing historical data may need help to deal with the input data in the future. At the same time, considering that the more components, the more time it will take. Therefore, this paper calculates the ZCR [32] of each component by
Z C R = 1 2 N 1 n = 1 N 1 | s g n [ x ( n ) ] s g n [ x ( n 1 ) ] | ,
where x(n) is the n-th data value, N is the total length of a frame of data, and sgn () is formulated as:
s g n [ x ( n ) ] = { 1 ,     x ( n ) 0 1 ,     x ( n ) < 0 .
ZCR represents the ratio of sign change in each component data, which can approximately reflect the fluctuation frequency of data. As shown in Table 1, the ZCR of IMF1 is higher than 40% as a high-frequency component, the ZCR of IMF2 is between 10% and 40% as medium-frequency component, and the ZCR of IMF3~IMF8 is less than 10% as low-frequency components [33]. Xu et al. utilized the EMD-CNN-LSTM composite model to predict short-term power load by categorizing the IMF components and residual sequence into three categories: high-frequency, medium-frequency, and low-frequency [33]. On the other hand, Li. employed the EEMD-ARIMA-LSTM combination model to forecast crude oil futures prices by categorizing the IMF components into high-frequency and low-frequency, then adding a residual sequence, resulting in a total of three categories [34]. Experimental results, as shown in Table 2, demonstrate that the EEMD-CNN-ILSTM model performs best when utilizing the four components of low-frequency, medium-frequency, high-frequency, and a residual sequence. Therefore, the number of the prediction model’s input data components is reduced from nine to a fixed number of four. Only four components of low-frequency, medium-frequency, high-frequency, and residual sequence need to be trained, and the training time is greatly reduced, as shown in Figure 2.

3.2. CNN

CNN has a good feature extraction function. Three-dimensional convolution can extract temporal and spatial features at the same time, which can be used for behavior recognition and video processing. Two-dimensional convolution can be used to extract local features of pictures, which can be used in the field of image processing. One-dimensional convolution has only one convolution direction, which can be used in a sequence model. In this model, CNN can extract the frequency features of low-frequency, medium-frequency, high-frequency, and residual sequence, then input them into ILSTM. Its convolution operation C is formulated as:
C = f ( w x + b ) ,
where b is the bias vector, x is the input feature, w is the weight of a one-dimensional convolution kernel, f is the activation function, and denotes the convolution operation.

3.3. ILSTM

LSTM has advantages in analyzing long-term dependencies of time series data because it adopts the ideas of gate and cell state and avoids the long-term dependencies of RNN. There are three gates in LSTM: the forget gate, the input gate, and the output gate. Figure 3 illustrates the structural unit of LSTM.
The structural unit of ILSTM is shown in Figure 4. Compared with LSTM, ILSTM introduces a candidate hidden state h ˜ t in the output gate, stores the original hidden state information into h ˜ t , then adds i t × t a n h ( h ˜ t ) . Such calculations can perfect the information with greater weight in the hidden state. In addition, the previous cell state C t 1 is added to the input gate and the forget gate, which affects the data update. The detailed calculation process is as follows [23].
The memory cell of LSTM receives the output value h t 1 at the previous time, and the current input value x t to enter the forget gate and obtains the information f t that needs to be forgotten.
Compared with LSTM, C t 1 is added to the forget gate algorithm of ILSTM, which impacts the current data forgetting. The forget gate algorithm of ILSTM is formulated as:
f t = σ ( W f · [ h t 1 , x t , C t 1 ] + b f ) ,
where C t 1 is the cell state at the previous time, σ is the sigmoid activation function, b f is the bias of the forget gate, and W f is the weight of the forget gate.
The input gate i t of the LSTM can update the cell state, and i t determines how much data can enter the memory cell C t . Then, the current input data x t and the previous hidden state information h t 1 are operated by the tan h function to obtain a new candidate value C ˜ t .
Compared with LSTM, C t 1 is added to the input gate of ILSTM. The input gate algorithm of ILSTM is formulated as:
i t = σ ( W i · [ h t 1 , x t , C t 1 ] + b i ) ,
C ˜ t = t a n h ( W c ˜ · [ h t 1 , x t , C t 1 ] + b c ˜ ) ,
where b i is the bias of the input gate, C t 1 is the cell state of the previous time, W i is the weight of the input gate, W c ˜ is the weight of the candidate cell state, and b c ˜ is the bias of the candidate cell state. By increasing the operation of C t 1 , the input gate provides greater weight for retaining current data.
Then, the output values of i t and f t are combined to obtain the current cell state information C t formulated as:
C t = f t × C t 1 + i t × C ˜ t .
The output gate o t of the LSTM determines the part of the output. The equation t a n h ( C t ) scales the cell state value to [−1, 1], preventing gradient disappearance.
Compared with LSTM, ILSTM introduces h ˜ t , which can store the original hidden state information, then add the equation i t t a n h ( h ˜ t ) , thus perfecting the hidden state information. The equation t a n h ( h ˜ t ) is used to extract essential hidden state information. i t can determine the crucial hidden state information to be retained. The output gate algorithm of ILSTM is formulated as:
o t = σ ( W o · [ h t 1 , x t ] + b o ) ,
h ˜ t = o t × t a n h ( c t ) ,
h t = h ˜ t + i t × t a n h ( h ˜ t ) ,
where b o is the bias of the output gate, W o is the weight of the output gate.
In summary, based on LSTM, ILSTM increases the calculation of C t 1 for the forget gate and the input gate, introduces h ˜ t into the output gate, then uses i t t a n h ( h ˜ t ) to further extract the data features. Here, the i t from the input gate controls the weight allocation of the input information in the cell state. The t a n h function helps alleviate the gradient vanishing problem. Therefore, adding i t t a n h ( h ˜ t ) to the original output determines which important parts of the hidden state will be passed to the model’s output or the next time step. Thus, ILSTM has better prediction effectiveness than LSTM.

3.4. EEMD-CNN-ILSTM

Crude oil futures data exhibits characteristics, such as periodic fluctuations, nonlinearity, and non-stationarity. The EEMD-CNN-ILSTM model demonstrates strong nonlinear modeling capabilities and the ability to learn complex relationships within sequences. Figure 5 shows the overall structure diagram of EEMD-CNN-ILSTM. The model mainly consists of seven parts. The input layer is the first part. In this paper, crude oil futures data is the research object, and the closing price of WTI, DJIA, and USDX as the influencing factors. The EEMD decomposition layer is the second part, which decomposes the crude oil futures closing price into components of various frequencies by EEMD, then reconstructs them into four components: high-frequency, medium-frequency, low-frequency, and a residual sequence for subsequent input to the neural network. We combine the Open, High, Low, Settle, Close, USDX, DJIA, and WTI with one of the high-frequency, medium-frequency, low-frequency, and residuals to form nine characteristics, respectively. We inputted the nine characteristics into the CNN-ILSTM model to predict the crude oil futures closing price at high frequency, medium frequency, low frequency, and residuals separately. The data preprocessing layer is the third part, which involves standardizing the data, performing preprocessing operations, and constructing three-dimensional time series data. These steps help ensure that the data remains within the same order of magnitude. The feature extraction layer is the fourth part, which uses the CNN convolution operation to extract hidden features from four components. The prediction layer is the fifth part, which uses the optimized ILSTM model to predict the four components. The sixth part is the combination layer, which summarizes and sums the prediction results of each component. The last is the output layer, which carries out the reverse scaling of the summarized results to get the final prediction result.

4. Experiment

4.1. Experimental Environment

The experiment was carried out in Windows 10 operating system with Intel(R)Core(TM) i5-12400F, NVIDIA GTX1660S, and RAM 16.00 GB. The programming language used for the experiment was Python 3.8.0, and the compiler was PyCharm 2022 1.0 × 64. Anaconda 22.9.0 was used as the platform for deep learning training, and Keras 2.9.0 and TensorFlow 2.9.1 were used as the deep learning framework.

4.2. Data Collection and Analysis

This paper uses the crude oil futures data of the Shanghai Energy Exchange in China as the experimental data set. This experiment obtains data from https://tushare.pro/ (accessed on 19 November 2022). Tushare is an open community of big data, which provides abundant financial data, such as market data (including stocks, funds, futures, and digital cash) and fundamental data of companies (including corporate finance, and fund managers). In this experiment, DJIA, S&P 500, USDX, WTI closing price, Russell 2000, NASDAQ, and crude oil futures closing prices are selected for correlation analysis by PCC [35]. The correlation coefficient R can be calculated by:
R = i = 1 n ( x i x ¯ ) ( y i y ¯ ) i = 1 n ( x i x ¯ ) 2 i = 1 n ( y i y ¯ ) 2 ,
where x ¯ and x i are the average value and the i-th value of the candidate influencing factors, respectively, and y ¯ and y i are the average value and the i-th value of the crude oil futures’ closing price, respectively.
When the absolute value of PCC is closer to 1, the correlation is stronger. The PCC obtained are shown in Table 3. Finally, WTI closing price, USDX, and DJIA are selected as the relevant influencing factors. It can be found from Figure 6, Figure 7 and Figure 8 that there is a strong correlation between them. All the data mentioned above is represented in daily units.
Thus, the experiment dataset consisted of the Open, High, Low, Settle, and Close of crude oil futures, USDX, DJIA, and WTI from 26 March 2018 to 18 November 2022. There are a total of 1131 pieces of experimental data, of which the training data is the first 70% of the data set with 792 pieces, and the test set is the last 30% with 339 pieces.

4.3. Data Preprocessing and Scaling

Furthermore, 26 March 2018 is the first trading date of Shanghai crude oil futures data, so it is essential to align the data of influencing factors with crude oil futures data. In addition, due to the differences between the opening and closing dates at home and abroad, the initial data need to be filled. The missing value is filled using the previous two data. Finally, the influencing factors are combined with crude oil futures data, and Table 4 presents some of the samples of experimental data.
When the difference between different feature values in the data set is significant, it is easy to cause the algorithm to fail to thoroughly learn the data features, thus reducing the model’s training accuracy. Therefore, it is necessary that the choice of MinMaxScaler to process the data in this experiment [12]. The process of scaling features is formulated as:
X n o r m = X X m i n X m a x X m i n ,
where X m i n and X m a x refer to the data’s minimum boundary and maximum boundary, and X is each item in the data set. In this experiment, the feature is scaled to a specific interval [0, 1] so that all data are mapped to the same scale, thus accelerating the convergence speed of the model.

4.4. Constructing Time Series Data

The data used in this experiment should be transformed into three-dimensional time series data according to step size and sequence length. As shown in Figure 9, the sequence length is set to 4, and the step size is set to 1. The data length is 1131, the experimental data is constructed in three dimensions, and the data dimension (1128, 4, 9) represents the data divided into 1128 groups, 4 rows, and 9 columns. The dimension (1128, 4, 9) represents a time series dataset with 1128 samples. Each sample consists of 4-time steps. Each time step corresponds to daily data. There are nine features available for each time step. The nine features are formed by combining the Open, High, Low, Settle, Close, USDX, DJIA, WTI, with one of the high-frequency, medium-frequency, low-frequency, and residuals. According to the time series data, the data from DATA1 to DATA4 form the first group. Then, the data from DATA2 to DATA5 form the second group, and so on. Finally, the training data set is the first 70% of the data set, and the test data set is the last 30%.

4.5. Parameter Tuning

The neural network parameters contain model hyper parameters and model parameters. Hyper parameters include epochs, batch size, learning rate, and the number of neurons in the hidden layer. Model parameters include bias, weight, and other values that can be automatically obtained during training. In this experiment, we find a range of optimal hyper-parameters by experience. Then, the grid search algorithm is used to optimize further and adjust parameters to make the model have good generalization ability. The grid search method is an exhaustive search of all candidate parameter values to find all possible combinations, and the combination with the best result is taken as the final parameter. Try different combinations of all hyper-parameters in the given range of values until the optimal result is found. The batch size is 32, the step size is 4, the epochs is 50, and the number of neurons in the hidden layer is 64. Table 5 presents the detailed experimental parameters.

5. Model Comparison

To verify the prediction model’s accuracy of the crude oil futures price based on EEMD-CNN-ILSTM, EEMD-CNN-LSTM, CNN-ILSTM, CNN-LSTM, ILSTM, LSTM, MLP, and SVR are used as comparison models. In this paper, we take R 2 , RMSE, and MAE as the criteria to evaluate the model’s overall performance. Table 6 shows the evaluation results using the test data set.
Table 6 shows that the traditional regression model SVR has the worst prediction result, ILSTM is better than LSTM, CNN-ILSTM is better than CNN-LSTM, and EEMD-CNN-ILSTM has the best prediction effect. Figure 10, Figure 11 and Figure 12 illustrate the values of MAE, RMSE, and R 2 , respectively.
Compared with LSTM, MAE and RMSE of ILSTM decrease by 3.568 and 4.071, respectively, and R 2 increases from 0.9403 to 0.9574. Compared with LSTM, MAE and RMSE of CNN-LSTM decrease by 4.994 and 5.45, respectively, and R 2 increases from 0.9403 to 0.9625. Compared with ILSTM, MAE and RMSE of CNN-ILSTM decrease by 2.049 and 2.026, respectively, and R 2 increases from 0.9574 to 0.9648. Compared with CNN-LSTM, MAE and RMSE of CNN-ILSTM decrease by 0.623 and 0.647, respectively, and R 2 increases from 0.9625 to 0.9648. The feature extraction function of CNN can further improve the forecast accuracy, and ILSTM has improved the forecast accuracy compared with LSTM. The predicted value of LSTM, ILSTM, CNN-LSTM, and CNN-ILSTM versus true value are shown in Figure 13.
Table 6 shows that the prediction accuracy is improved after EEMD decomposition and reconstruction based on the model of CNN-LSTM or CNN-ILSTM. Compared with EEMD-CNN-LSTM, MAE and RMSE of EEMD-CNN-ILSTM decrease by 1.863 and 1.313, respectively, and R 2 increases from 0.9858 to 0.9886. The predicted value of CNN-LSTM, CNN-ILSTM, EEMD-CNN-LSTM, and EEMD-CNN-ILSTM versus true value are shown in Figure 14.
To assess the reliability of the models, the Friedman analysis is applied [36]. EEMD-CNN-ILSTM is compared to seven other advanced models: EEMD-CNN-LSTM, CNN-ILSTM, CNN-LSTM, LSTM, ILSTM, MLP, and SVR. The average ranking R j is calculated to demonstrate that EEMD-CNN-ILSTM outperforms other models. The calculation process of R j is formulated as:
R j = 1 N i = 1 N r i j ,
where r i j represents the rank of the i-th model in the j-th performance measure. N represents the total number of models being compared. The final average ranking calculation results are shown in Figure 15.
The calculation process of Friedman analysis is formulated as:
X r 2 = 12 N k ( k + 1 ) [ j = 1 k R j 2 k ( k + 1 ) 2 4 ] ,
where k is the number of models and X r 2 is a random variable that follows a chi-squared distribution with k − 1 degrees of freedom. With a significance level of 0.05 and 7 degrees of freedom [36], the critical value was determined to be 14.067. The Friedman statistic was calculated as 16.0, which exceeded the critical value, indicating the presence of significant differences among the models.

6. Discussion

The results of this experiment show the comprehensive evaluation index of EEMD-CNN-ILSTM for crude oil futures price prediction is optimal. Compared with LSTM, the forecast accuracy of ILSTM is improved due to the calculation of C t 1 in the input gate and forget gate and the improvement of the output gate. After CNN is combined with LSTM or ILSTM, the feature extraction of CNN convolution operation improves the prediction accuracy. After EEMD is combined with CNN-LSTM or CNN-ILSTM, the forecast precision is further improved because EEMD decomposes and reconstructs the original data.
The improvement of EEMD-CNN-ILSTM’s forecast accuracy of crude oil futures price lies in as follows:
(1)
Decomposition of original data by EEMD. After EEMD decomposition, the low, middle, and high-frequency components of IMF and the residual sequence are input into CNN to extract hidden features, thus making up for the shortcoming of LSTM and ILSTM in extracting features.
(2)
ILSTM adds the calculation of C t 1 in the input gate and the forget gate to ensure the complete learning of the historical state and introduces the crucial hidden state information in the output gate so that the model can learn more fully from historical data. However, ILSTM has the limitation of longer training time than LSTM.

7. Conclusions

This paper presents a hybrid prediction model of crude oil futures price based on EEMD-CNN-ILSTM. Compared with EEMD-CNN-LSTM, CNN-ILSTM, CNN-LSTM, ILSTM, LSTM, MLP, and SVR, the prediction results are all the best in the overall evaluation. It is proved that the hybrid model integrates the characteristics of EEMD, CNN, and ILSTM, and effectively improves forecasting accuracy. Compared with the prediction results of ILSTM and LSTM, ILSTM has higher prediction accuracy. After introducing CNN and EEMD, the result is that the model combined with ILSTM is better than the model combined with LSTM. After EEMD decomposition and reconstruction, it can help CNN further extract hidden features from data. The hybrid model of EEMD-CNN-ILSTM for crude oil futures price prediction performs best in comprehensive evaluation indexes of MAE, RMSE, and R 2 . In summary, the strengths of this paper are as follows:
(1)
Compared with LSTM, ILSTM is an improvement of LSTM. ILSTM adds learning of cell state at the previous time in the input gate and forget gate and i t × t a n h ( h ˜ t ) in the output gate to further extract important hidden state information, further eases the problems of “gradient disappearance” and “gradient explosion” of RNN and improve the forecasting accuracy.
(2)
Fix the number of components after EEMD decomposition. After EEMD decomposition and reconstruction, the low, medium, and high-frequency components of IMF and the residual sequence are obtained, which ensures a fixed number of inputs, ensuring the increased availability of the model and reducing the overall prediction time.
(3)
A novel hybrid model based on EEMD-CNN-ILSTM for crude oil futures price prediction is proposed, which covers the shortage of a single forecasting model. By comparison, the overall evaluation results of the EEMD-CNN-ILSTM hybrid model for crude oil futures price are optimal.
However, the hybrid model based on EEMD-CNN-ILSTM for crude oil futures price prediction has several limitations. First, the model exhibits high complexity, requiring significant computational resources and time. Additionally, crude oil futures prices are influenced by various external factors, such as global economic conditions, political events, natural disasters, and so on. These factors are not fully captured by the model, resulting in potential limitations in the accuracy of its predictions. In our future research, we plan to add the analysis of news text and use it as an influencing factor to improve prediction accuracy.

Author Contributions

Conceptualization, J.W.; methodology, J.W. and Z.X.; software, T.Z.; validation, T.L.; investigation, T.L. and T.Z.; writing—original draft preparation, T.Z. and T.L. writing—review and editing, J.W. and Z.X.; visualization, T.Z. and T.L.; supervision, Z.X. and J.W.; project administration, T.Z. and T.L.; funding acquisition, J.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Innovation Foundation of Hebei Intelligent Internet of Things Technology Innovation Center under Grant AIOT2203.

Data Availability Statement

Data available on request due to restrictions privacy. The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kamyk, J.; Kot-Niewiadomska, A.; Galos, K. The criticality of crude oil for energy security: A case of Poland. Energy 2021, 220, 119707. [Google Scholar] [CrossRef]
  2. Rehman, O.U.; Ali, Y. Optimality study of China’s crude oil imports through China pakistan economic corridor using fuzzy topsis and cost-benefit analysis. Transp. Res. Part E Logist. Transp. Rev. 2021, 148, 102246. [Google Scholar] [CrossRef]
  3. Mo, B.; Nie, H.; Jiang, Y. Dynamic linkages among the gold market, us dollar and crude oil market. Phys. A 2018, 491, 984–994. [Google Scholar] [CrossRef]
  4. Wang, K.H.; Su, C.W. Does high crude oil dependence influence Chinese military expenditure decision-making? Energy Strategy Rev. 2021, 35, 100653. [Google Scholar] [CrossRef]
  5. Liao, Y.; Hong, W.; Wang, W.; Wang, Y.; Chen, S. An overview of RNN-based mandarin speech recognition approaches. J. Chin. Inst. Eng. 1999, 22, 535–547. [Google Scholar] [CrossRef]
  6. Naz, S.; Umar, A.I.; Ahmad, R.; Ahmed, S.B.; Shirazi, S.H.; Razzak, M.I. Urdu Nasta’liq text recognition system based on multi-dimensional recurrent neural network and statistical features. Neural Comput. Appl. 2017, 28, 219–231. [Google Scholar] [CrossRef]
  7. Cho, K.B.; Van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. arXiv 2014, arXiv:1406.1078. [Google Scholar]
  8. Rius, A.; Ruisanchez, I.; Callao, M.; Rius, F. Reliability of analytical systems: Use of control charts, time series models and recurrent neural networks (RNN). Chemom. Intell. Lab. Syst. 1998, 40, 1–18. [Google Scholar] [CrossRef]
  9. Elbaz, K.; Zhou, A.; Shen, S.L. Deep reinforcement learning approach to optimize the driving performance of shield tunnelling machines. Tunn. Undergr. Space Technol. 2023, 136, 105104. [Google Scholar] [CrossRef]
  10. Yu, L.; Wang, S.; Lai, K.K. Forecasting crude oil price with an EMD-based neural network ensemble learning paradigm. Energy Econ. 2008, 30, 2623–2635. [Google Scholar] [CrossRef]
  11. Chen, Y.; Liu, B.; Wang, T. Analysing and forecasting China containerized freight index with a hybrid decomposition-ensemble method based on EMD, grey wave and ARMA. Grey Syst. Theory Appl. 2021, 11, 358–371. [Google Scholar] [CrossRef]
  12. Shu, W.; Gao, Q. Forecasting stock price based on frequency components by EMD and neural networks. IEEE Access 2020, 8, 206388–206395. [Google Scholar] [CrossRef]
  13. Wu, Y.X.; Wu, Q.B.; Zhu, J.Q. Improved EEMD-based crude oil price forecasting using LSTM networks. Phys. A 2019, 516, 114–124. [Google Scholar] [CrossRef]
  14. Tang, L.; Wu, Y.; Yu, L. A randomized-algorithm-based decomposition-ensemble learning methodology for energy price forecasting. Energy 2018, 157, 526–538. [Google Scholar] [CrossRef]
  15. Tang, L.; Lv, H.; Yu, L. An EEMD-based multi-scale fuzzy entropy approach for complexity analysis in clean energy markets. Appl. Soft Comput. 2017, 56, 124–133. [Google Scholar] [CrossRef]
  16. Xiang, Y.; Zhuang, X.H. Application of ARIMA model in short-term prediction of international crude oil price. Adv. Mater. Res. 2013, 798, 979–982. [Google Scholar] [CrossRef]
  17. Hou, A.; Suardi, S. A nonparametric GARCH model of crude oil price return volatility. Energy Econ. 2011, 34, 618–626. [Google Scholar] [CrossRef]
  18. Ramyar, S.; Kianfar, F. Forecasting crude oil prices: A comparison between artificial neural networks and vector autoregressive models. Comput. Econ. 2017, 53, 743–761. [Google Scholar] [CrossRef]
  19. Murat, A.; Tokat, E. Forecasting oil price movements with crack spread futures. Energy Econ. 2008, 31, 85–90. [Google Scholar] [CrossRef]
  20. Lanza, A.; Manera, M.; Giovannini, M. Modeling and forecasting cointegrated relationships among heavy oil and product prices. Energy Econ. 2005, 27, 831–848. [Google Scholar] [CrossRef]
  21. Zhao, Y.; Li, J.; Yu, L. A deep learning ensemble approach for crude oil price forecasting. Energy Econ. 2017, 66, 9–16. [Google Scholar] [CrossRef]
  22. Yin, Q.; Zhang, R.; Shao, X.L. CNN and RNN mixed model for image classification. Matec Web Conf. 2019, 277, 02001. [Google Scholar] [CrossRef]
  23. Manowska, A.; Bluszcz, A. Forecasting crude oil consumption in Poland based on LSTM recurrent neural network. Energies 2022, 15, 4885. [Google Scholar] [CrossRef]
  24. Liu, B.; Chen, J.; Wang, H.; Wang, Q. Renewable energy and material supply risks: A predictive analysis based on an LSTM model. Front. Energy Res. 2020, 8, 163. [Google Scholar] [CrossRef]
  25. Yang, Y.; Yang, Y. Hybrid method for short-term time series forecasting based on EEMD. IEEE Access 2020, 8, 61915–61928. [Google Scholar] [CrossRef]
  26. Sun, J.; Di, L.; Sun, Z.; Shen, Y.; Lai, Z. County-level soybean yield prediction using deep CNN-LSTM model. Sensors 2019, 19, 4363. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  27. Zhang, J.; Li, S. Air quality index forecast in Beijing based on CNN-LSTM multi-model. Chemosphere 2022, 308, 136180. [Google Scholar] [CrossRef]
  28. Huang, N.E.; Shen, Z.; Long, S.R.; Wu, M.C.; Shih, H.H.; Zheng, Q.; Yen, N.C.; Tung, C.C.; Liu, H.H. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. J. R. Soc. Interface 1998, 454, 903–995. [Google Scholar] [CrossRef]
  29. Wu, Z.; Huang, N.E. Ensemble empirical mode decomposition: A noise-assisted data analysis method. Adv. Adapt. Data Anal. 2009, 1, 1–41. [Google Scholar] [CrossRef]
  30. Ma, Z.; Wen, G.; Jiang, C. EEMD independent extraction for mixing features of rotating machinery reconstructed in phase space. Sensors 2015, 15, 8550–8569. [Google Scholar] [CrossRef] [Green Version]
  31. Guo, Y.; Cao, X.; Liu, B.; Peng, K. El Niño index prediction using deep learning with ensemble empirical mode decomposition. Symmetry 2020, 12, 893. [Google Scholar] [CrossRef]
  32. Joo, S.; Choi, J.; Kim, N.; Lee, M.C. Zero-crossing rate method as an efficient tool for combustion instability diagnosis. Exp. Therm. Fluid Sci. 2021, 123, 110340. [Google Scholar] [CrossRef]
  33. Xu, Y.; Xiang, Y.F.; Ma, T.X. Short-term Power Load Forecasting Method Based on EMD-CNN-LSTM Hybrid Model. J. North China Electr. Power Univ. 2022, 49, 2. [Google Scholar]
  34. Li, S. Prediction of Crude Oil Futures Price Based on EEMD-ARIMA-LSTM Combination Model. Master’s Thesis, Shandong University, Jinan, China, 22 May 2021. [Google Scholar]
  35. Adler, J.; Parmryd, I. Quantifying colocalization by correlation: The Pearson correlation coefficient is superior to the Mander’s overlap coefficient. Cytom. Part A 2010, 77A, 733–742. [Google Scholar] [CrossRef] [PubMed]
  36. Shen, S.L.; Elbaz, K.; Shaban, W.M.; Zhou, A. Real-time prediction of shield moving trajectory during tunnelling. Acta Geotech. 2022, 17, 1533–1549. [Google Scholar] [CrossRef]
Figure 1. EEMD decomposition results.
Figure 1. EEMD decomposition results.
Electronics 12 02521 g001
Figure 2. Four components after reconstruction.
Figure 2. Four components after reconstruction.
Electronics 12 02521 g002
Figure 3. LSTM structure.
Figure 3. LSTM structure.
Electronics 12 02521 g003
Figure 4. ILSTM structure.
Figure 4. ILSTM structure.
Electronics 12 02521 g004
Figure 5. EEMD-CNN-ILSTM structure overview.
Figure 5. EEMD-CNN-ILSTM structure overview.
Electronics 12 02521 g005
Figure 6. Chart of the closing price of WTI and crude oil futures.
Figure 6. Chart of the closing price of WTI and crude oil futures.
Electronics 12 02521 g006
Figure 7. Chart of the closing price of USDX and crude oil futures.
Figure 7. Chart of the closing price of USDX and crude oil futures.
Electronics 12 02521 g007
Figure 8. Chart of the closing price of DJIA and crude oil futures.
Figure 8. Chart of the closing price of DJIA and crude oil futures.
Electronics 12 02521 g008
Figure 9. Time series construction process.
Figure 9. Time series construction process.
Electronics 12 02521 g009
Figure 10. MAE comparison.
Figure 10. MAE comparison.
Electronics 12 02521 g010
Figure 11. RMSE comparison.
Figure 11. RMSE comparison.
Electronics 12 02521 g011
Figure 12. R 2 comparison.
Figure 12. R 2 comparison.
Electronics 12 02521 g012
Figure 13. Predicted value of LSTM, ILSTM, CNN-LSTM, CNN-ILSTM, and true value.
Figure 13. Predicted value of LSTM, ILSTM, CNN-LSTM, CNN-ILSTM, and true value.
Electronics 12 02521 g013
Figure 14. Predicted value of CNN-LSTM, CNN-ILSTM, EEMD-CNN-LSTM, EEMD-CNN-ILSTM, and true value.
Figure 14. Predicted value of CNN-LSTM, CNN-ILSTM, EEMD-CNN-LSTM, EEMD-CNN-ILSTM, and true value.
Electronics 12 02521 g014
Figure 15. Friedman ranks of the applied models.
Figure 15. Friedman ranks of the applied models.
Electronics 12 02521 g015
Table 1. Zero crossing rate of each IMF component.
Table 1. Zero crossing rate of each IMF component.
ComponentIMF1IMF2IMF3IMF4IMF5IMF6IMF7IMF8
ZCR57.3%22.6%9.9%3.8%1.1%0.2%0%0%
Table 2. The experiment results for different component categories.
Table 2. The experiment results for different component categories.
ModuleExperimentComponentEvaluation
EEMD-CNN-ILSTMExperiment 1high-frequency
medium-frequency
low-frequency
R 2 = 0.9742
RMSE = 18.312
MAE = 13.848
Experiment 2high-frequency
low-frequency
residual
R 2 = 0.9789
RMSE = 16.116
MAE = 11.675
Experiment 3high-frequency
medium-frequency
low-frequency
residual
R 2 = 0.9858
RMSE = 11.504
MAE = 8.397
Table 3. Pearson Correlation Coefficient.
Table 3. Pearson Correlation Coefficient.
DataWTIUSDXDJIAS&P 500NASDAQRussell 2000
R0.9320.5580.4050.3560.1820.317
Table 4. Experimental Data.
Table 4. Experimental Data.
DateOpenHighLowSettleCloseUSDXDJIAWTI
14/11/2022680.5684.6661.6677.1665.113,09633,61585.235
15/11/2022663670.3644.4659.6649.713,05533,568.786.865
16/11/2022644.7648.7637.2641.9640.213,04433,600.485.334
17/11/2022643.6645.2624.8634.8628.913,04133,669.685.035
Table 5. Model parameter.
Table 5. Model parameter.
ModelLayerParameters
SVRSVRkernel = ‘rbf’, C = 1.0, epsilon = 0.1
MLPDenseactivation = ‘sigmoid’, units = 64
batch size = 32, epochs = 50
LSTMLSTMactivation = tanh, units = 64
batch size = 32, epochs = 50
ILSTMILSTMactivation = ‘tanh’, units = 64
batch size = 32, epochs = 50
CNN-LSTMConv1Dfilters = 64, padding = ‘valid’, kernel_size = 2,
activation = sigmoid
MaxPooling1Dpadding = ‘valid’, pool_size = 1
LSTMactivation = ‘tanh’, units = 64
batch size = 32, epochs = 50
CNN-ILSTMConv1Dfilters = 64, padding = ‘valid’, kernel_size = 2,
Activation = sigmoid
MaxPooling1Dpadding = ‘valid’, pool_size = 1
ILSTMactivation = ‘tanh’, units = 64
batch size = 32, epochs = 50
Table 6. Model comparison.
Table 6. Model comparison.
ModelMAERMSE R 2
SVR37.87246.7410.8112
MLP26.90231.7470.9129
LSTM21.64926.2720.9403
ILSTM18.08122.2010.9574
CNN-LSTM16.65520.8220.9625
CNN-ILSTM16.03220.1750.9648
EEMD-CNN-LSTM10.26012.8170.9858
EEMD-CNN-ILSTM8.39711.5040.9886
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

Wang, J.; Zhang, T.; Lu, T.; Xue, Z. A Hybrid Forecast Model of EEMD-CNN-ILSTM for Crude Oil Futures Price. Electronics 2023, 12, 2521. https://doi.org/10.3390/electronics12112521

AMA Style

Wang J, Zhang T, Lu T, Xue Z. A Hybrid Forecast Model of EEMD-CNN-ILSTM for Crude Oil Futures Price. Electronics. 2023; 12(11):2521. https://doi.org/10.3390/electronics12112521

Chicago/Turabian Style

Wang, Jingyang, Tianhu Zhang, Tong Lu, and Zhihong Xue. 2023. "A Hybrid Forecast Model of EEMD-CNN-ILSTM for Crude Oil Futures Price" Electronics 12, no. 11: 2521. https://doi.org/10.3390/electronics12112521

APA Style

Wang, J., Zhang, T., Lu, T., & Xue, Z. (2023). A Hybrid Forecast Model of EEMD-CNN-ILSTM for Crude Oil Futures Price. Electronics, 12(11), 2521. https://doi.org/10.3390/electronics12112521

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