## 3 Materials and Methods
### Proposed New Version of EMD Based on Akima Spline Interpolation Technique  
The proposed new EMD algorithm is based on the Akima spline interpolation technique for clean as well as noisy signal \(y(t)\) is summarized as follows.  
* Extract the first oscillatory component \(k^{*}(t)\) from the noisy signal \(y(t)\) by the Akima spline interpolation technique.
* Determine the upper signal envelope \(\left\{U\left(t\right)\right\}\) and lower envelope \(\left\{L\left(t\right)\right\}\).
* Join all the minima, and maxima through the Akima spline interpolation technique concerning to find out the mean of both the upper and lower envelope, i.e., \(M\left(t\right)\): \[M(t)=\frac{U(t)+L(t)}{2}\] (13)
* In order to acquire the first component, the mean envelope determined in step 3 will be subtracted from the actual signal, i.e., \[k(t)=y(t)-M(t)\] (14)
* Repeat steps 1-4 for the component \(k(t)\) until a stopping criterion is satisfied, and take the resulting \(k(t)\) as \(k^{*}(t)\).  
If the remaining signal, i.e., \(r(t)=y(t)-k^{*}(t)\) has still some oscillation components, then it can be further decomposed with the help of a new EMD. The addition of \(|\delta_{i+1}+\delta_{i}|/2\), and\(|\delta_{i-1}+\delta_{i-2}|/2\) terms forces \(d_{i}=0\) when \(\delta_{i}=\delta_{i+1}=0\), i.e., \(d_{i}=0\) when \(v_{i}=v_{i+1}=v_{i+2}\), and hence it eliminates the overshoot problem when the data are constant for more than two consecutive nodes. After developing the proposed method, we  
Figure 2: Flowchart of the basic LSTM network.  
will integrate it with the LSTM network to develop our new hybrid model for stock price prediction. The proposed method can be thought of as a two-stage process in which the EMD, EEMD, SEMD, and the new novel method are used in the first stage to implement the decomposition of the nonlinear and nonstationary stock price time series data into various subgroups known as IMFs, and the hybrid LSTM model has been built for prediction in the second stage. Figure 3 depicts the entire process graphically before going over each step of how to do it.  
Step 1: Real-world stock index time series data for this study were gathered from the yahoo finance website. The original stock index time series data were then preprocessed to ensure that they met the requirements for the breakdown of the EMD and its various versions, including the proposed new one.  
Step 2: The actual stock price time series data are divided into various IMFs using the EMD, EEMD, SEMD, and new Akima-EMD methods, having left only one residual.  
Step 3: In this step, the Pearson coefficient of correlation between each IMF (residue) and actual stock prices are calculated. Those IMFs having approximately zero correlation with the original data are separated, and the remaining strongly correlated components with the actual data are used to build the hybrid Akima-EMD-LSTM model. The results of the Pearson coefficient of correlation and other statistical measures are presented in Section 4.2.  
Figure 3: Flowchart of our improved hybrid model.  
Step 4: In this step, we used different ensemble models such as EMD-LSTM, EEMD-LSTM, SEMD-LSTM, and the proposed Akima-EMD-LSTM for prediction. It is evident from the empirical results presented that our proposed hybrid ensemble model (Akima-EMD-LSTM) outperforms the other hybrid ensemble models in terms of minimum values of statistical metrics such as RMSE, MAE, and MAPE.  
Step 6: Once the hybrid Akima-EMD-LSTM model is developed for the correlated subcomponents with the actual data, our next step is to predict the future daily closing stock prices from our proposed model.  
Step 7: Finally, the final predicted values are obtained, and a comparison is made between the predicted and hold-out datasets. Furthermore, the suggested model is compared with other machine learning methods based on different performance metrics such as RMSE, MAE, and MAPE.