## 3 Proposed Approach
### Proposed AGBCPT  
Before describing the proposed AGBCPT, the notation is introduced in Table 3.  
The proposed AGBCPT is described below:  
* Selected companies: \(S\) = {\(s_{1}\), \(s_{2}\), \(\ldots\), \(s_{i}\), \(\ldots\), \(s_{n}\)}, \(1\leq i\leq n\), where \(n\) is the number of companies, and the closing prices of all the companies, with the \(i\)-th represented as \(CP_{i}=[cp_{1}^{i},cp_{2}^{i},\,cp_{3}^{i},\,\ldots,\,\,cp_{i}^{i},\,\ldots,\, \,cp_{iTotal}^{i}]\), \(1\leq t\leq dTotal\), \(1\leq i\leq Num\)_Companies_, where \(dTotal\) is the last trading day and \(Num\)_Companies_ is the number of companies. * Population size \(pSize\), max generation \(maxGeneration\), mutation rate \(mRate\), crossover rate \(cRate\), and parameter for the max-min arithmetical crossover operator \(d\). * Chromosome with highest fitness value \(bestChro\). * Randomly initialize the population with population size \(pSize\). Each chromosome has six genes: the correlation coefficient threshold (\(cLimit\)), the entry width of the Bollinger Bands (\(BBentryWidth\)), the out width of the Bollinger Bands (\(BBoutWidth\)), the correlation coefficient calculation days (\(cDay\)), the moving average calculation days (\(mDay\)), and the forward observation days (\(oDay\)). * Use the following steps to calculate the correlation coefficient matrix of \(n\) companies \(MT_{(n)}\). \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Description** \\ \hline \(cLimit\) & Correlation coefficient threshold \\ \(dTotal\) & Final trading day \\ \(mDay\) & Moving average calculation days \\ \(cDay\) & Correlation coefficient calculation days \\ \(oDay\) & Forward observation days \\ \(T\) & Trading day \\ \(BBentryWidth\) & Entry width of Bollinger Bands \\ \(BBoutWidth\) & Out width of Bollinger Bands \\ \(TPset=\emptyset\) & Trading pair candidate set \\ \(tps(s_{i},s_{i})=(s_{i},s_{i})\) & Trading pair set \((s_{i},s_{i})\) \\ \(tpC(s_{i},s_{i})\) & Trading pair cost \((s_{i},s_{i})\) \\ \(tpP(s_{i},s_{i})\) & Trading pair income \((s_{i},s_{i})\) \\ \(Profit(s_{i},s_{i})\) & Trading pair profit \((s_{i},s_{i})\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: AGBCPT notation. **STEP 2.1:**: Obtain the historical closing prices \(CPs_{i}\) and \(CPs_{j}\) of two companies \(s_{i}\) and \(s_{j}\) from the trading days (\(T-cDay_{q}\)) to (\(T-1\)) according to \(cDay_{q}\) in chromosome \(C_{q}\) as  
\[ \begin{array}{l}CPs_{i}=\left\{cp_{T-cDay_{q}}^{s_{i}},\ cp_{T-cDay_{q}+1}^{s_{i} },\ldots,\ cp_{T-1}^{s_{i}}\right\},\text{ and}\\ CPs_{j}=\left\{cp_{T-cDay_{q}}^{s_{j}},\ cp_{T-cDay_{q}+1}^{s_{j}},\ldots,\ cp_{T-1}^{s_{j}}\right\}.\end{array} \]
**STEP 2.2:**: Calculate the correlation coefficient of \(s_{i}\) and \(s_{j}\) using  
\[CC_{s_{i}s_{j}}=\frac{\sum_{k=T-cDay_{q}}^{T-1}\left(cp_{k}^{s_{i}}-\mu_{s_{i}} \right)\left(cp_{k}^{s_{j}}-\mu_{s_{j}}\right)}{\sqrt{\sum_{k=T-cDDay_{q}}^{T-1 }\left(cp_{k}^{s_{i}}-\mu_{s_{i}}\right)^{2}\left(cp_{k}^{s_{j}}-\mu_{s_{j}} \right)^{2}}}. \tag{10}\]
**STEP 2.3:**: Repeat Steps 2.1 and 2.2 to complete the correlation coefficient matrix \(MT_{(n)}\). **STEP 3:**: Use the following steps to select the stock pairs whose \(CC_{sisj}\) is less than \(cLimiti_{q}\) and then calculate the stock pair's entry and exit bands according to \(BBentryWidth_{q}\), \(BBoutWidth_{q}\), and \(mDay_{q}\) of chromosome \(C_{q}\). **STEP 3.1:**: Generate the trading pair candidate set according to \(TPset=\left\{tp(s_{i},s_{j})\right\}|CC_{sisj}\)\(\leq cLimiti_{q}\)], where \(cLimiti_{q}\) is the correlation coefficient threshold from chromosome \(C_{q}\). **STEP 3.2:**: Obtain the closing prices \(CPs_{i}\) and \(CPs_{j}\) from trading days (\(T-mDay_{q}\)) to (\(T-1\)) of both \(s_{i}\) and \(s_{j}\) of \(tp(s_{i},s_{j})\) in \(TPset\) as  
\[ \begin{array}{l}CPs_{i}=\left\{cp_{T-mDay_{q}}^{s_{i}},\ cp_{T-mDay_{q}+1}^{s_ {i}},\ldots,\ cp_{T-1}^{s_{i}}\right\},\text{ and}\\ CPs_{j}=\left\{cp_{T-mDay_{q}}^{s_{j}},\ cp_{T-mDay_{q}+1}^{s_{j}},\ \ldots,\ cp_{T-1}^{s_{j}}\right\}.\end{array}