## 3 Methodology
### Tcm-Abc-Lstm  
To better address the difficulties associated with hyperparameter tuning in LSTM networks, this section describes an improved artificial bee colony optimization algorithm as a hyperparameter selector for LSTM networks, which is called TCM-ABC-LSTM. Leveraging the inherent strengths of the ABC algorithm as a hyperparameter selector, our proposed methodology ensures expedited convergence, heightened prediction accuracy, and enhanced robustness of the resultant LSTM network models. Notably, the ABC algorithm's aptitude for tackling NP-hard problems and swiftly identifying global optimal solutions or approximate global optima highlights its effectiveness in the complex environment of hyperparametric optimization. Tent chaotic mapping group initialization further improves the efficiency of the algorithm, allowing it to quickly traverse the solution space and find the global optimal or near-global-optimal solution faster than other meta-heuristic algorithms. The pseudo-code of the TCM-ABC algorithm is shown in Algorithm 1. ```
1:Initialize population using Tent chaotic mapping
2:Evaluate the fitness of the population
3:Set Iteration = 1
4:while Iteration < Maximum number of Iteration do
5: Employee Base Phase
6: Probability Calculation Phase
7: Omlocker Bee Phase
8: Scout Bee Phase
9: Ernroll the best solution obtained so far
10: Iteration = Iteration + 1
11:endwhile
12:Training LSTM with Optimal Population
```  
**Algorithm 1** Pseudocode of TCM-ABC-LSTM  
First, the ABC initializes the worker bee population by tent chaotic mapping (TCM), which serves to distribute the population uniformly in the solution space, to accelerate the bee's search process and to avoid falling into local optima. The pseudo-code of the TCM initialization operator is shown in Algorithm 2. ```
1:while i = 1,2,...,n do
2:while j = 1,2,...,m do
3: Initialize population of worker bees \(W\) by Equations (1)-(3)
4:endwhile
5:endwhile
```  
**Algorithm 2** Pseudocode of TCM initialization operator  
In the worker bee phase following the initialization process, the worker bee evaluates the fitness value of the newly generated nectar source. Under the support of the TCM initialization operator, the searchability of the solution is enhanced. The described bee phase is demonstrated in Algorithm 3. ```
1:for all worker bee \(w\) in W do
2: Evaluate the fitness of \(w\)
3:endfor
```  
**Algorithm 3** Worker Bee Phase  
In the onlooker bee phase, worker bees share information about the location of the nectar source with onlooker bees in the beehive. The onlooker bee selects the worker bee to continue exploring the new solution based on the roulette probability. The pseudo-code for this process is represented in Algorithm 4:Finally, the ABC enters the Scout Bee Phase if the adaptation does not improve after n iterations, replacing the current solution with a randomly generated one to avoid falling into a local optimum. We argue that the behavior of bees in the ABC algorithm has some similarities with LSTM neural network parameter tuning and that the behavior of worker bees exploiting a nectar source corresponds to finding a solution within the hyperparametric feasible solution space of the neural network. Onlooker bees can decide whether to exploit or not and are capable of small-scale fine-tuning. The scout bees randomly search for nectar sources and are able to prevent falling into a local optimum. Therefore, we choose to combine the ABC algorithm with LSTM in an attempt to achieve excellent prediction results. TCM-ABC is used to train LSTM networks to solve nonlinear regression (predicting price fluctuations). The main difficulty in developing accurate neural network models lies in finding the most appropriate hyperparameters to train the neural network. The main drawbacks of traditional training algorithms include local optimum stagnation, slow convergence, and poor accuracy, thus motivating researchers to look for reliable alternatives to address these drawbacks.