## 3 Data Processing and Parameter Determination
### Determination of SSA-LSTM Model Parameters  
The sparrow search algorithm is a collective intelligence optimization method unveiled in 2020. Since its inception, it has received widespread attention in the academic community. However, in practical applications, parameter selection for the algorithm often relies on experience, and the optimal parameters might vary for different models. The key parameters of the sparrow search algorithm include population size, number of iterations, and proportion of discoverers, among others [28; 29; 30]. Inappropriate parameter settings might result in decreased prediction performance or excessively long training times. To circumvent these issues, the potential range of parameters is initially determined based on the existing data. Subsequently, numerical experiments are employed to precisely ascertain the optimal value for each parameter. In the application of the SSA, the selected population size is typically between 30 and 100. To further investigate how population size affects the algorithm's efficacy, experiments were conducted every 10 units. Under the premise of fixed iteration times and other parameters, the fitness values and prediction durations under different population sizes were analyzed. As shown in Figure 3, with the increase in the population size, the fitness reaches its optimum when the population size is 30. Afterward, the optimal fitness shows an initial increase followed by a decrease, indicating that the performance of the sparrow search algorithm is not entirely positively correlated with the population size. Moreover, with the growth of the population size, the computation time also shows a significant \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Number** & \multicolumn{5}{c}{**Input Value**} & \multicolumn{5}{c}{**Expected Value**} \\ \hline
1 & \(-0.382\) & \(-0.421\) & \(0.539\) & \(0.921\) & \(0.921\) & \(0.921\) & \(0.763\) \\
2 & \(-0.421\) & \(0.539\) & \(0.921\) & \(0.921\) & \(0.921\) & \(0.763\) & \(0.158\) \\
3 & \(0.539\) & \(0.921\) & \(0.921\) & \(0.921\) & \(0.763\) & \(0.158\) & \(-0.013\) \\
4 & \(0.921\) & \(0.921\) & \(0.921\) & \(0.763\) & \(0.158\) & \(-0.013\) & \(0.934\) \\
5 & \(0.921\) & \(0.921\) & \(0.763\) & \(0.158\) & \(-0.013\) & \(0.934\) & \(0.618\) \\
6 & \(0.921\) & \(0.763\) & \(0.158\) & \(-0.013\) & \(0.934\) & \(0.618\) & \(0.237\) \\
7 & \(0.763\) & \(0.158\) & \(-0.013\) & \(0.934\) & \(0.618\) & \(0.237\) & \(0.763\) \\
8 & \(0.158\) & \(-0.013\) & \(0.934\) & \(0.618\) & \(0.237\) & \(0.763\) & \(-0.105\) \\
9 & \(-0.013\) & \(0.934\) & \(0.618\) & \(0.237\) & \(0.763\) & \(-0.105\) & \(0.224\) \\
10 & \(0.934\) & \(0.618\) & \(0.237\) & \(0.763\) & \(-0.105\) & \(0.224\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Test set sample. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Number** & \multicolumn{5}{c}{**Input Value**} & \multicolumn{5}{c}{**Expected Value**} \\ \hline
1 & \(-0.711\) & \(0.618\) & \(-1.000\) & \(-0.500\) & \(0.868\) & \(-0.382\) & \(-0.197\) \\
2 & \(0.618\) & \(-1.000\) & \(-0.500\) & \(0.868\) & \(-0.382\) & \(-0.197\) & \(-0.724\) \\
3 & \(-1.000\) & \(-0  
increasing trend. Therefore, considering both time and performance, 30 is determined to be the optimal population size. On the other hand, if the number of iterations is set too high, it might lead to overfitting, where the algorithm performs exceptionally well on the training data but poorly on new, unseen data. Furthermore, excessive iterations could also lead to a waste of computational resources and time. Therefore, it is crucial to find an optimal number of iterations that provides a balance between accuracy and computational efficiency. Conversely, excessive iteration might lead the algorithm to over-iterate before reaching the optimal solution, which is not only counterproductive but also increases computational time. Therefore, selecting an appropriate number of iterations is crucial for ensuring both prediction efficiency and accuracy.