## 2 Materials and Methods
### Ics-Snn  
As shown in Figure 4, ICS-SNN is the new model that combines the previous two methods together. ICS is responsible for continuously selecting new hyperparameters, and the SNN needs to incorporate these parameters into the model, then train and validate their effectiveness. There are several hyperparameters which used to be changed manually when SNNs are used as shown in Table 1.  
**Time step. ** Time step means how many data are used to predict the price for the next time. If the number is set to be small, it is very likely that the model does not have enough prior knowledge to output the accurate value we expect. In contrast, if it is set to be too big, not only does it require more computing resources but it also takes more time to perform matrix operations. Time spent on different time steps is shown in Figure 5. \begin{table}
\begin{tabular}{c c} \hline \hline
**Hyperparameter Name** & **Search Range** \\ \hline Time step & [5; 20] \\ \hline Neuron number & [500, 2000] \\ \hline Batch size & [10,000, 20,000] \\ \hline Scaler scope & [4; 6] \\ \hline Decay rate & [0.5, 0.8] \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Selected hyperparameters and their Ranges. Figure 4: ICS-SNN model structure. Figure 5: Time spent on different time steps. Count of Neurons.How to find the correct count of neurons for hidden layers is always a headache problem. A small quantity may result in underfitting, as the network may not learn correctly. However, excessive quantity may lead to overfitting, as learning too much from the network makes it impossible to generalize. Therefore, there must be an appropriate number of neurons to ensure good training. Scaler Scope.After data normalization, the process of seeking the optimal solution becomes smoother and can converge to the optimal solution more quickly. \"MinMaxScaler\" is a method of data normalization used to scale data to a specified range. It maps the data to a specified minimum and maximum value by performing a linear transformation on the data. \[X_{scaled}=\frac{(X-X_{min})\times(B-A)}{X_{max}-X_{min}}+A \tag{13}\]  
where \(X\) is one of the values which needs to be normalized, \(X_{min}\) and \(X_{max}\) are the minimum and maximum values of \(X\). \(A\) and \(B\) are the specified minimum and maximum value we want \(X\) to be limited to. Finally, \(X_{scaled}\) is the value input in the model. Batch Size.A small batch size increases computational time and causes severe gradient oscillations, hindering convergence. Conversely, an excessively large batch size reduces gradient diversity across batches, leading to local minima entrapment. The longer it takes to complete each epoch and the smoother the gradient between each iteration, the greater the batch size, which directly affects the mean and variance calculated by batch normalization, making them closer to the true mean and variance of the training set data distribution, thereby improving the regularization effect. Therefore, when computing resources allow, increasing batch size can not only accelerate training speed but also improve accuracy. Membrane Potential Decay Rate.In the absence of input pulses, the membrane voltage decays over time due to the membrane decay rate. Threshold.When the membrane potential exceeds the threshold of a neuron, the neuron will generate a pulse. The setting of the threshold is the triggering condition for pulse neurons to generate pulses and, usually, the threshold is a fixed parameter. Choosing an appropriate threshold has a significant impact on the pulse firing of neurons. Too high or too low a threshold may cause neurons to be unable to emit pulses correctly or frequently. And we consider the threshold as a hyperparameter in an attempt to bring great possibilities. In the past, researchers always relied on experience to change parameters, which resulted in low accuracy, low efficiency, and time-consuming results. The ICS algorithm provides a way for automatically searching for solutions. So, it is natural to combine the ICS and SNNs, and we call it ICS-SNN.