# Hybrid Crow Search Algorithm-LSTM System for Enhanced Stock Price Forecasting
## 3 Proposed Method
### System Architecture  
This system comprises four modules. The first is the technical indicator, which uses the technical indicator and original stock-price data. It extracts features that exhibit a high correlation with the closing price based on Pearson's correlation coefficients. This extracted feature set serves as the dataset of this module. This dataset is then transformed into a three-dimensional structure with a time step of three days. Normalization is employed to enhance the comparability between features. In this module, the features of the technical-indicator data from the previous three days are referenced to predict the closing price on the following day. The prediction is obtained using a deep LSTM network architecture with memory capabilities and an early stopping mechanism. The primary objective is to predict the closing price of the following day by leveraging the technical indicators of the past three days and the original stock data. The structure of this module is illustrated in Figure 10. \begin{table}
\begin{tabular}{c c} \hline
**Correlation Coefficient** & **Degree of Correlation** \\ \hline
1.0 & Perfect \\ \(-1.0\) & \\ \hline
0.7 to 1.0 & Very strong \\ \(-1.0\) to \(-0.7\) & \\ \hline
0.4 to 0.7 & strong \\ \(-0.7\) to \(-0.4\) & \\ \hline
0.3 to 0.4 & Medium \\ \(-0.4\) to \(-0.3\) & \\ \hline
0.2 to 0.3 & Weak \\ \(-0.3\) to \(-0.2\) & \\ \hline
0.1 to 0.2 & Very weak \\ \(-0.2\) to \(-0.1\) & \\ \hline
0 & No correlation \\ \hline \end{tabular}
\end{table} 
Table 2: Pearson’s correlation coefficient reference data. Figure 10: Technical-indicator module architecture. The second module is price fluctuation, which calculates \(\pm\)10% limits of the closing price based on the defined price-fluctuation limits. Every 0.2% step is considered to generate 100 features, which, in addition to the original basic stock data, comprises the dataset for this module. This dataset is then transformed into a three-dimensional structure with a time-step of 3 days. Normalization is applied to enhance the comparability between steps. For each prediction, the \(\pm\)10% values of the closing prices of the previous three days are used as references for the closing price on the next day. The LSTM neural-network architecture with an early stopping mechanism is used to obtain the predictions. This module uses the range of closing prices from the first three days, adhering to the government-set price-fluctuation limits and original stock-price data to predict the closing price on the next day. The architecture of this module is depicted in Figure 11.  
The third module is the VMD subsignal sequence, which decomposes the closing price time series into six subsignals via VMD. Each subsignal is normalized using the basic stock information to generate a dataset with a time-step of 3 days. This dataset is then input into the LSTM network to obtain predictions, and the predictions for each subsignal are added to obtain the final predic7. This module aims to decompose a complex time series into several subsignal sequences to simplify the complexity and oscillation amplitude of the original sequence. Thus, the complex time series is simplified, allowing the neural network to individually predict each subsignal sequence. Subsequently, each component is restored using the following calculation:  
\[Y_{\text{pre}}=\sum_{k=1}^{k}\text{IMF}_{k} \tag{11}\]  
where \(y_{\text{pre}}\) represents the final prediction of the third module, and \(\text{IMF}_{k}\) indicates the predicted value of the \(k\)th IMF. The architecture of this module is shown in Figure 12.  
The final module assigns weights to values predicted by the three values and optimizes them using the CSA to obtain the final prediction. The flowchart of the proposed CSLSTM (crow search algorithm-long short-term memory) system is shown in Figure 13. The CSA employs the following steps to update the weights:  
1. Initialize the CSA parameters and assign each crow a random position.