## 3 Research Methods
### Genetic Fuzzy System (GFS)  
This study uses the \(K\), \(D\), and \(RSI\) technical indicators to establish membership functions for Buy (BUY), Sell (SELL), and Hold (HOLD) actions. To identify the optimal parameters for these membership functions, a genetic-evolution-based fuzzy algorithm is employed. This approach aims to enhance the buy-sell strategy by optimizing the parameters of the membership functions through genetic evolution. The pygad package [31] is used to implement the GAs in this study. The application rules for the \(K\), \(D\), and \(RSI\) technical indicators are established to generate BUY, SELL, and HOLD signals based on specific thresholds. These rules help determine the appropriate trading actions according to the current values of the indicators. The rules are as follows:  
\(K\)--Indicator Application Rules:  
- BUY Signal: If \(K\) value \(\leq\)\(KB_{H}\), then it is a BUY signal. - SELL Signal: If \(K\) value \(\geq\)\(KS_{L}\), then it is a SELL signal. - HOLD Signal: If \(KH_{L}\) < \(K\) value < \(KH_{H}\), then it is a HOLD signal. - D--Indicator Application Rules:  
- BUY Signal: If \(D\) value \(\leq\)\(DB_{H}\), then it is a BUY signal. - SELL Signal: If \(D\) value \(\geq\)\(DS_{H}\), then it is a SELL signal. - HOLD Signal: If \(DH_{L}\) < \(D\) value < \(DH_{H}\), then it is a HOLD signal. \(RSI\)--Indicator Application Rules:  
- BUY Signal: If \(RSI\) value \(\leq\)\(RB_{H}\), then it is a BUY signal. - SELL Signal: If \(RSI\) value \(\geq\)\(RS_{H}\), then it is a SELL signal. - HOLD Signal: If \(RH_{L}\) < \(RSI\) value < \(RH_{H}\), then it is a HOLD signal. The rules for each indicator are summarized [32] in Table 3:Since HOLD indicates no action, we can logically optimize the rules in Table 3 as follows: \begin{tabular}{c c c c c c c c c c} \hline \hline _RSI_ & & \multicolumn{2}{c}{BUY} & \multicolumn{2}{c}{HOLD} & \multicolumn{2}{c}{SELL} \\ \hline \(K\backslash D\) & BUY & HOLD & SELL & BUY & HOLD & SELL & BUY & HOLD & SELL \\ \hline BUY & A.BUY & A.BUY & A.BUY & A.BUY & A.HOLD & A.HOLD & A.BUY & A.SELL & A.SELL \\ \hline HOLD & A.BUY & A.HOLD & A.BUY & A.HOLD & A.HOLD & A.HOLD & A.SELL & A.HOLD & A.SELL \\ \hline SELL & A.BUY & A.HOLD & A.BUY & A.HOLD & A.HOLD & A.SELL & A.SELL & A.SELL \\ \hline \hline \end{tabular}   
Since HOLD indicates no action, we can logically optimize the rules in Table 3 as follows: \begin{tabular}{c c c} 1. & If both \(K\) and \(D\) indicators signal BUY, then ACTION is A.BUY. \\ 2. & If both \(K\) and \(D\) indicators signal SELL, then ACTION is A.SELL. \\ 3. & If both \(K\) and \(RSI\) indicators signal BUY, then ACTION is A.BUY. \\ 4. & If both \(K\) and \(RSI\) indicators signal SELL, then ACTION is A.SELL. \\ \hline \hline \end{tabular}   
Using the aforementioned technical indicator application rules, we can establish the membership functions as shown in Table 4. This table contains a total of 16 membership function parameters and the corresponding output membership functions. When the \(K\) value is less than or equal to \(KB_{H}\), the ACTION is set to BUY. When the \(K\) value is between \(KH_{L}\) and \(KH_{H}\), it is determined as HOLD. When the \(K\) value is greater than or equal to \(KS_{L}\), the ACTION is set to SELL. This same method of determination is applied to the other indicators, as shown in Figure 5.  
The initial values of the membership functions can be defined based on experience or generated randomly. As shown in Table 5, the \(K\) value ranges between 0 and 100. A \(K\) value above 80 indicates that the market is overheated and may reverse downwards, which is a signal to sell the stock. A \(K\) value below 20 indicates that the market is too cold and may reverse upwards, which is a signal to buy the stock. A \(K\) value between 20 and 80 indicates no action. Table 5 shows the initial values of the membership function parameters for the \(K,D,  
Figure 5: Membership functions of \(K\) values.