Abstract
Investment is always an interesting and important issue for people since the international financial crises are hard to predict and the government’s policy may have an influence on economic activities. In the past, many researches have been proposed on portfolio issues. In some of these studies, the group stock portfolio (GSP) is utilized to provide various alternative stocks to an investor. The diverse group stock portfolio (DGSP) optimization approach has then been designed because the diversity of industries within a group can affect the performance of a final GSP. However, these approaches still have some problems to be solved. In this paper, we propose an algorithm to improve the efficiency and effectiveness of the previous work. In the proposed approach, a new chromosome representation and an enhanced fitness function are applied to find a better DGSP with lower risk than before. Moreover, we design a fuzzy grouping genetic algorithm (FGGA) based on the concept of collective intelligence which utilizes the fuzzy logic to dynamically tune the parameters in the evolution process for finding an appropriate DGSP. A mechanism is also designed to repair non-feasible chromosomes in the population. Through the above improvements, the proposed approach can not only focus on finding the best solution but also speed up the evolution process. Finally, experiments made on real datasets show the merits of the proposed approach.
Keywords
Introduction
Investment is an interesting issue in the daily life of people because depositing money in banks is unable to resist inflation. Thus, they will study how to increase wealth through different financial management. However, the international financial crises are unpredictable and the national policies change quickly. Choosing appropriate financial products to form investment plans is a difficult problem. Since the mean-variance (M-V) model was proposed by Markowitz in 1952 [26], many scholars have believed the model can effectively spread the risk and different researches have been conducted based on it [43]. Given a set of assets and an expected return, the goal of the M-V model is to find weights of assets that can not only help reach desired expected return but also minimize risk.
From the artificial intelligence point of view, how to find the appropriate weights of a given set of assets can be thought of as an optimization problem [31]. Hence, many researches in finding weights of a portfolio by using optimization techniques such as particle swarm algorithms [34], ant colony algorithms [20] and genetic algorithms (GA) [10, 23] have been proposed. Furthermore, some hybrid approaches have been designed as well for portfolio optimization [12, 19]. For instance, El hachloufi et al. used classification and GA for stock portfolio optimization [12]. Gupta et al. employed support vector machines and GA for asset portfolio optimization [19]. Chen et al. used a hybrid of the imperialist competitive algorithm (ICA) and the firefly algorithm (FA) to deal with a multi-period portfolio selection problem in an uncertain investment environment [4]. Huo et al. derived sequential portfolio selection into classic multi-armed bandit setting problem and introduced an algorithm to construct a portfolio [22]. Li et al. transformed the trade-off model of portfolio selection into a special non-convex and non-smooth composite problem [24].
Along with the change of the global economy, it is necessary to adjust the portfolio appropriately. The group stock portfolio (GSP), which was proposed by Chen et al., could be utilized to handle the problem [7]. In other words, an alternative stock could be suggested by a GSP to an investor when he/she wants to replace a stock in a portfolio by a new stock. More specifically, a GSP consists of a set of stock groups. When investors are not satisfied with a suggested stock, they can ask a substitute stock from the same group to replace the original one. In that paper, a GSP is encoded into a chromosome using grouping, stock, and stock portfolio parts. Since investors have their own preference, the fitness of each chromosome is evaluated by both the objective and subjective criteria. The objective criteria include the return on investment (ROI) and the value at risk (VaR). The subjective criteria are the investment capital penalty (ICP) and the portfolio penalty (PP). Besides, since the stock group is considered, the fitness function also evaluates the group balance and the diversity of each individual to make sure that the numbers of stocks in different groups are nearly the same and the types of stocks in a group are various. Because dividing stocks into groups is a grouping problem which is defined by Falkenauer in [14, 15], the grouping genetic algorithm is thus employed for the GSP optimization. Moreover, the diversity of industries of stocks in a group would influence the final result. Thus, the diversity was taken into consideration and another algorithm has been proposed to find diverse group stock portfolio (DGSP) using the grouping genetic algorithm [8].
To ensure metaheuristic algorithms to obtain high-quality solutions, setting appropriate parameters for genetic operations to get various solutions is a critical and important task. Like most of the metaheuristic algorithms, the GGA has difficulty in setting proper parameters and getting a good balance between exploration and exploitation. In recent years, based on the collective intelligence which is a group intelligence formed in different ways, e.g., collective efforts and consensus decision making, many algorithms have been designed to deal with various tasks [11, 38]. For instance, De-Los-Cobos-Silva et al. developed hybrid methods in accordance with the collective intelligence to solve nonlinear constrained optimization problems [11]. Zhang et al. proposed a metaheuristic discrete bat algorithm based on the collective intelligence of bat populations for maximizing the spread of influence [37]. By mimicking the decision making process of human groups, an optimization algorithm was proposed by Vincenzo et al. for solving complex problems [38]. Fuzzy logic, which is much closer to human thinking and natural language, is often used for dynamically tuning the parameters in metaheuristic algorithms [3, 21]. To conquer this problem, based on the concept of the collective intelligence, we utilize fuzzy logic to enhance the previous approach [5].
However, some problems still remain in the existing approaches [7, 8]. The first one is the purchased unit used in chromosome representation may lead to larger profit fluctuation of a portfolio, or say, riskier. The second problem is that infeasible individuals in the population are also evaluated in the previous approaches that may increase computation time.
Hence, considering the above mentioned problems, the goal of this paper is to develop a more sophisticated optimization algorithm for finding a diverse group stock portfolio (DGSP). To deal with the first problem, a new encoding scheme is designed to represent the weights of groups. For the second problem, a mechanism is designed to repair non-feasible chromosomes in a population so that the metaheuristic algorithms can not only be more focused on the process of finding the best solution but also save unnecessary effort to eliminating infeasible solutions [17, 39]. As a result, the fuzzy grouping genetic algorithm with a new chromosome representation and a new fitness function are presented to reach the goal.
In chromosome representation, the grouping, stock, and proportion parts are used to encode a possible DGSP. The grouping and stock parts mean the number of groups and their contained stocks. Every group in the proportion part has two genes, a buying signal and a weight of the group. They are used to indicate whether a group is active and its weight.
In chromosome evaluation, a proper fitness function is designed to evaluate a possible DGSP. The evaluation criteria used in the fitness function can be divided into three categories: stock groups, the proportions part of stocks in a portfolio, and the user preferences. The aim of evaluating stock groups is to get more balanced and diverse groups. The goal of evaluating the proportions part of the stocks in a portfolio is to get better weights for stocks to reach bigger returns. The aim of evaluating user preference is to meet a user’s preference. The grouping part contains two components: group balance and diversity. The proportion part contains three components: Sharpe ratio, stability factor, and proportion balance. The preference part contains only one component: risk tolerance. We used Sharpe ratio [33] to replace ROI in the fitness function in [7, 8], and proposed a new factor which is the risk tolerance. The Sharpe ratio is designed to measure the expected return per unit of risk and the risk tolerance represents a user’s preference for the risk. Next, the genetic operations including the crossover, mutation, and inversion are executed to produce chromosomes for the next generation. Finally, the experiments on some real financial datasets were conducted to illustrate the effectiveness of the proposed approach. The difference between the proposed approach and the previous approach [5] is described as follows. An improved encoding scheme is presented and used for the proposed approach to find a better DGSP. The enhanced fitness function consists of factors for stock groups, the proportion part of stocks in a portfolio, and the user preferences, is designed in this paper. A mechanism is designed to repair non-feasible chromosomes in the population to make the proposed approach can focus on finding the best solution and saving unnecessary computation effort for infeasible solutions. Experimental results on some real financial datasets were obtained to verify and show the merits of the proposed approach.
Fuzzy logic control
Since Zadeh proposed the fuzzy set theory [40, 41], many researches related to it have sprung up. Fuzzy logic is a logic based on the fuzzy set, and it is much closer to human thinking and natural language than a traditional logic system. Therefore, fuzzy logic is more comfortable on the description of the data with uncertainty in the real world. A fuzzy logic controller consists of the knowledge base and rule base, inference mechanism, fuzzification, and defuzzification. The knowledge base consists of membership functions for fuzzifying the crisp input and defuzzifying the fuzzy outputs to crisp values. The process of fuzzifying crisp inputs into fuzzy ones is also known as fuzzification and the process of defuzzifying fuzzy outputs to crisp ones is known as defuzzification. The inference mechanism is the process of converting fuzzy inputs to fuzzy outputs according to the rule base and the membership functions. The interaction between the components is shown in Fig. 1.

The process of a fuzzy logic controller.
Fuzzy logic can apply expert knowledge with natural language to control systems [13, 28]. For instance, Nayak et al. proposed a clustering method with fuzzy logic which can decide better cluster heads and provide all sensors higher stability and longer lifetime in a wireless sensor network [28]. Their method is effective in solving the energy consumption problem for the sensors in WSN.
In addition, to enhance the performance of a fuzzy logic controller, metaheuristic algorithms have been employed to tune its parameters [1, 34]. For instance, Amador-Angulo and Castillo proposed a fuzzy bee colony optimization algorithm for deriving the optimal distribution of the membership functions for a fuzzy controller to effectively solve complex nonlinear problems [1]. Collotta et al. presented a fuzzy-based approach for dealing with the energy consumption problem in industrial wireless sensor networks by using the particle swarm optimization [9].
As to fuzzy logic used in portfolio selection, taking particle filtering and anomaly detection into consideration, Nakano et al. designed a knowledge-based system for portfolio selection [29]. Their main idea was utilizing the fuzzy logic with particle filtering and anomaly detection to construct profitable investment portfolios.
Besides, fuzzy logic is often used for dynamically tune the parameters in metaheuristic algorithms [2, 30] because it is not easy to set appropriate parameter values for the algorithms when the execution environments are different. For example, Castillo et al. used fuzzy logic to decide the alpha parameter in the ant colony optimization [3]. Herrera et al. reviewed many aspects of the adaptation of GA parameters based on fuzzy logic, such as population, crossover and mutation [21]. They also reviewed some common implementation for inputs, outputs and rules in the fuzzy logic for tuning genetic algorithms. In this paper, we focus on designing an algorithm that can tune the parameters of genetic operations during the evolution process by fuzzy logic controller for optimizing a DGSP.
This section states the main components of the proposed approach, including the encoding scheme, fuzzy logic controller, genetic operations, infeasible solution adjustment, and fitness function.
Encoding scheme
Given n stocks, represented as S = {s1, s2, … s n }, the proposed approach is to obtain K stock groups to form a group stock portfolio that can minimize the risk and maximize the return. The encoding scheme is shown in Fig. 2 [5, 8].

The encoding scheme for a chromosome C q .
Figure 2 shows that the chromosome representation composes of three parts: grouping, stock, and proportion. The stock distribution in the grouping part is expected to make the portfolio provided to users with lower risk. Only one stock in each group is chosen and all the chosen stocks thus form a stock portfolio. Therefore, if the number of groups is K, it means at most K stocks could be selected from the groups to form a stock portfolio. In the proportion part, each group G i includes the pair of genes b i and p i , where b i represents a buying signal and p i represents the proportion of an asset purchased for the i-th group. A stock s i in group G i is selected and purchased if the value of b i is larger than or equal to a threshold λ. The value of λ is set at 0.5 in this paper. Hence, the length of the three parts in an individual is K, 2K, and S, respectively. Below, the encoding scheme is illustrated by a simple example.
Example 1. Suppose that ten stocks (s1, s2, s3 … s10) are considered to form a portfolio. If the number of group K is 3, a chromosome C1 could be encoded as shown in Fig. 3.

An example of the encoding scheme.
Figure 3 shows that the grouping part consists of three groups, G1, G2 and G3, and the numbers of stocks in the groups are 3, 3 and 4, respectively. Since the values of b1 and b3 are larger than 0.5, they indicate two stocks will be selected from G1 and G3 to form a possible stock portfolio. Besides, their purchased proportions are 0.4 and 0.6. In this example, totally twelve stock portfolios (=3×4) can be generated by the chromosome.
The components of the fuzzy logic controller used in the proposed approach are stated in this section. Before describing them, the following two measurements are explained. They are the convergence rate M
t
and the diversity rate D
t
. The parameter M
t
is the tendency for the optimization search process to approach a particular solution at the t-th generation. It is defined as follows:
The membership functions used for the convergence rate M t and the diversity rates D t are shown in Fig. 4(a), and for crossover, mutation, and inversion rates are shown in Fig. 4(b).

Membership functions for the proposed approach.
Figure 4 shows that two membership functions, Low and High, are used for the convergence and diversity rates. Note that the minimal value of the convergence rate M t is 1. However, the minimal value of the membership functions for the convergence rate M t is 0. Therefore, the value of the convergence M t should be subtracted by 1, and it should be set as 1 if the value is larger than 1 after subtraction. Three membership functions, Low, Medium and High, are employed for the crossover, mutation and inversion rates. According to the parameters, a1, a2, b1, b2 and b3, the given values of numerical variables are transformed into fuzzy terms and values. For example, one of the parameter settings for the two membership functions is shown in Fig. 5(a), (b). Experiments for the different numbers of linguistic terms are also conducted and compared.

The parameter setting for membership functions used in the proposed approach.
To get a trade-off between exploration and exploitation, it is necessary to have robust rule bases. The main principles of the associated rules in the rule bases employed in the proposed approach are explained as follows. In the early evolution, when convergence has not yet happened, the fuzzy logic controller will increase the crossover rate and decrease the mutation and inversion rates. The reason for setting like that is to keep the proposed approach has the ability for local searching because solutions are still diverse. Because the chromosomes may converge in later iterations, the fuzzy logic controller will increase the mutation and inversion rates and decrease the crossover rate to increase the diversity of chromosomes. By using the two principles in the fuzzy logic controller, we expect a much better solution could be obtained at the end of the search process by the proposed approach. To reach the goal, the rule base of the crossover rate (p c ), mutation rate (p m ) and inversion rate (p i ) are given in Tables 1 to 3.
The rule base of the crossover rate
The rule base of the crossover rate
The rule base of the mutation rate
The rule base of the inversion rate
Based on these rules shown above, the linguistic terms for the three genetic operators, including crossover, mutation and inversion rates at the t+1 generation can be determined by their states at the t generation. The different rule bases setting experiments are also conducted and compared.
Three types of inference mechanisms are commonly used in fuzzy logic: the Mamdani-type inference [25], Sugeno-type inference [35] and Tsukamoto-type inference [36]. The proposed approach uses the Mamdani-type inference [25] as the inference mechanism. Hence, the universes of discourses of the crossover, mutation and inversion rates at the t -th generation can be formed.
Defuzzification
As to the defuzzification operator, the weighted average is adopted in the proposed approach because of its simplity and efficiency. Its mathematical expression is shown as follows:
In this section, the three genetic operations used in the proposed approach are described. They are crossover, mutation, and inversion. Note that the crossover operations are executed on grouping part and stock portfolio, the mutation operations are executed on the stock part and stock portfolio, and the inversion operation is executed only on the grouping part. The genetic operations are the same as that used in the previous approach [8].
Infeasible solution adjustment
In this section, the mechanism for infeasible solution adjustment is described. Traditionally, infeasible solutions suffer from the penalty given by fitness function and are eliminated. It means that some solutions with a chance to get better are discarded. The idea of infeasible solution adjustment is that some infeasible solutions can be converted into good feasible solutions after a slight adjustment. Moreover, this adjustment help the algorithm more focus on the process of finding the best solution.
The infeasible solutions mainly occur when the number of the purchased groups does not meet a user’s requirement. The way to adjust an infeasible solution is to find a suitable and feasible solution which can fill or delete groups to meet a user’s requirement. To find a suitable feasible solution at the beginning of the adjustment, all the possible feasible solutions are generated. Next, each possible feasible solution is evaluated. The way to evaluate a possible feasible solution is to generate stock portfolio combinations based on the proportion part of the solution, and the evaluation value E including the ROI and risk variance of the combination is calculated by formula (4):
In the genetic algorithm, each chromosome represents a solution. It is very important to design a good fitness function to decide the quality of a chromosome. Because the goal of the proposed approach is to optimize diverse group stock portfolios, designing a sophisticated fitness function for evaluating chromosomes effectively is needed.
According to Fig. 2, a proper fitness function is designed to evaluate three parts: the grouping part, the proportion part, and the user preference part. The aim of evaluating the grouping part is to get a more even and diverse grouping, the aim of evaluating the proportion part is to get a portfolio with higher pay and lower risk, and the aim of evaluating the user preference part is to meet a user’s requirement. Here, based on the fitness function used in the previous approach [7, 8], an enhanced fitness function for obtaining a DGSP is designed and shown as follows:
The three functions applied in the three parts are introduced below. The first function GP (C
q
) can be calculated as follows:
As explained earlier, GB (C
q
) is the Group balance and DF (C
q
) is the Diversity. These two components can be calculated by using formula (10) and formula (11). The first component GB (C
q
) can be calculated as follows:
As explained earlier, SR (C
q
) is the average Sharpe ratio of the chromosome C
q
, SF (C
q
) is the stability of the chromosome C
q
, and PB (C
q
) is the proportion balance of the chromosome C
q
. The three components can be calculated by using formulas (14), (17) and (21). The first component SR (C
q
) can be calculated as follows:
To ensure a negative value of the Sharpe ratio does not interfere with the final fitness value, if the value of SR (C
q
) is less than 0, the value will be changed into a positive number which is close to 0. The second components SF (C
q
) can be calculated as follows:
The third component PB (C
q
) can be calculated below:
In this section, the detail of the algorithm for obtaining a DGSP by the fuzzy GGA is stated as follows.
STEP 1: Form an initial population with pSize chromosomes using the procedure described in Section 3.2.2.
STEP 2: For each chromosome C q , calculate its fitness value by the following sub-steps.
Sub-step 2.1: Find the quality of the grouping part of C q as follows.
Sub-step 2.1.1: Measure the group balance of C q by formula (10).
Sub-step 2.1.2: Measure the diversity of C q by formula (11).
Sub-step 2.1.3: Set the quality of the grouping part of C q according to formula (9).
Sub-step 2.2: Use the grouping part in C q to generate possible stock portfolios and denote them as a set SP = {SP i |1 < i < |G1| * |G2| * … {G K |}. Each stock portfolio SP i is a combination generated from the grouping part.
Sub-step 2.3: Find the quality of the proportion part of C q as follows.
Sub-step 2.3.1: Evaluate the Sharpe ratio of each SP i by formula (15).
Sub-step 2.3.2: Evaluate the stability factor of each SP i by formula (18).
Sub-step 2.3.3: Set the Sharpe ratio of C q by formula (14).
Sub-step 2.3.4: Set the stability factor of C q by formula (17).
Sub-step 2.3.5: Measure the proportion balance of C q by formula (21).
Sub-step 2.3.6: Set the quality of the proportion part of C q according to formula (13).
Sub-step 2.4: Find the quality of the user preference part of C q as follows.
Sub-step 2.4.1: Evaluate the risk tolerance of each SP i by formula (24).
Sub-step 2.4.2: Set the quality of the user preference part of C q according to formulas (22) and (23).
Sub-step 2.5: Set the fitness value of C q according to formula (8).
STEP 3: Execute the selection operation on the population to form the next population.
STEP 4: Employ the fuzzy logic controller to find the crossover, mutation and inversion rates.
Sub-step 4.1: Calculate the convergence rate M t using formula (1).
Sub-step 4.2: Calculate the diversity rate D t using formula (2).
Sub-step 4.3: Convert the crisp inputs into fuzzy inputs in accordance with the antecedent of rules in the rule bases.
Sub-step 4.4: Use the max-min composition of the fuzzy inputs derived from the rules to get the universe of discourses.
Sub-step 4.5: Perform the defuzzification operator of the weighted average to calculate the updated parameters,
STEP 5: Perform the crossover operation on the population.
STEP 6: Perform the mutation operation on the population.
STEP 7: Perform the inversion operation on the population.
STEP 8: For each infeasible chromosome C q , execute the adjustment mechanism by the following sub-steps.
Sub-step 8.1: Check the status of the groups in all the chromosomes in the population and decide whether the chromosomes are infeasible.
Sub-step 8.2: According to a user’s desired number of stocks, generate all the possible feasible alternative solutions.
Sub-step 8.3: Evaluate each alternative solution as follows.
Sub-step 8.3.1: Use the grouping part of the alternative solution to generate a subset randomly, named SP′, of the set SP. Because SP′ is generated randomly, some equivalent elements (combinations) derived from the grouping part of the alternative solution may be included in SP′.
Sub-step 8.3.2: Calculate the ROI and the risk variance of each
Sub-step 8.3.3: Set the estimated suitable value E of each alternative solution according to formula(4).
Sub-step.8.4: Replace the old chromosome by the feasible alternative solution which has the highest estimated suitable value.
Sub-step 8.5: Adjust the proportion in the proportion part in each offspring chromosome.
STEP 9: Repeat Steps 2 to 8 until the stop criterion is satisfied.
STEP 10: Output the DGSP with the highest fitness value.
Experimental results
In this section, experiments were conducted to show the performance of the proposed approach. In Section 5.1, the experimental datasets are stated. Then, the analysis of the proposed approach is given in Section 5.2. The parameter setting for GGA was given in Table 4. For fuzzy logic, the rule bases were shown as Tables 1 to 3. In infeasible adjustment, the size for sampling is half of all the possible combinations.
Parameter setting
Parameter setting
For each method, we performed ten experiments and compare the results in average. The methods to be compared and the parameters to be measured are described in the following sections.
Training and testing datasets
To verify the effectiveness of the proposed approach, we used a real dataset in the paper. It contains 31 stocks. The dataset was obtained from the Taiwan Stock Exchange (TSE) from 2010/01/01 to 2018/02/09. We use the stocks from 2010/01/01 to 2016/12/31 as a training dataset, from 2017/01/01 to 2017/12/31 as a testing dataset, and from 2018/01/01 to 2018/02/09 as another testing dataset. The stocks were chosen from 16 categories, namely semiconductor, computer and peripheral equipment, plastic, optoelectronic, communication network, and so on. The 31 stock average price series are shown in Fig. 6.

The average price series of 31 stocks from 2010 to 2016.
We can observe between 2010 and 2016 the trend of stocks has risen and fallen, which is why we chose such a long training set. Such a turbulent training set can bring more accurate results. For the 2017 testing dataset, the series of the average prices of the 31 stocks are shown in Fig. 7.

The average price series of 31 stocks during 2017.
As for the 2018 testing dataset, the stock price series are shown in Fig. 8. The overall stock market trend in 2018 is declining. The average difference observed from the table is negative, and the Sharpe ratio is also smaller than that in 2017. On 2018/02/09, the stock price was at the lowest point of the entire market trend (from 2010 to 2018).

The average price series of 31 stocks during 2018/01/01 to 2018/02/09.
In this section, two measurements are introduced for the comparison between different methods. One is Avg. ROI and the other is week price fluctuation. In the experiments, the Avg. ROI is the average ROI of all possible portfolios in a solution after GGA evolution. We name the largest ROI and the smallest ROI in the portfolio MaxROI and MinROI, respectively. The sum of ROI can be calculated using formula (5). The Avg. ROI can be calculated by the above ROI divided by the cardinality of the possible portfolios. In ten experiments, we name the average of all Avg. ROI (each experiment) AvgAvg ROI. In a similar way, we have AvgMaxROI and AvgMinROI.
The week price fluctuation represents a kind of risk and can be calculated by a similar method in [33]. The formula to calculate the week price fluctuation of a stock is shown as follows:
In the 2017 testing dataset, because the dataset has 12 months, it means the dataset has 48 weeks. The average week stock price is to calculate the average of the prices of the 48 weeks. In the experiments, the week price fluctuation of a portfolio is to calculate the average of that of the stocks, and the average week price fluctuation is the average of those values. In ten experiments, the average of the average week price fluctuation can be calculated. For short, we name it week price fluctuation.
In the following section, the comparison of the proposed, the previous approach and the benchmark are given to show the merits of the proposed approach. The previous approach, refers to the algorithm used to optimize a DGSP using the GGA with fixed crossover, mutation and inversion rates [8]. As to the proposed approaches, we named the proposed approach as NINF for the proposed approach without the infeasible adjustment and fuzzy logic controller, as INF for the proposed approach only with the infeasible adjustment, and as IF for the proposed approach with the infeasible adjustment and fuzzy logic controller. The average ROI of the benchmark (BM) is measured. Its procedure is shown below. It first forms all feasible portfolios according to the number of stocks in a portfolio and the number of stocks in a given dataset. For example, the number of portfolios will be fifteen when the numbers of stocks in a portfolio and in a given dataset are 2 and 6, respectively. Then, the buy-and-hold strategy is adopted to calculate the ROI of every portfolio and take the average ROI of them.
Evaluating the proposed approach in terms of fitness
In this section, the average fitness of NINF, INF and IF are compared. The average fitness in each generation is shown in Fig. 9.

The average fitness values of NINF, INF, and IF.
We can observe the convergence of the proposed approaches from Fig. 9. The fitness in the approach NINF with no individual repair mechanism and no fuzzy logic is lower than that in the other two approaches in each generation. The fitness in the approach INF with only the individual repair mechanism but no fuzzy logic is larger than the approach NINF. Comparing the approach INF and IF, the fitness in INF is much lower than that in IF at the beginning when the fitness in INF catches up with that in IF after around 200 generations, and the fitness in IF converged after 170generations.
The converged generation and time are shown in Table 5. The converged generation in the approach IF is less than that in the approach INF, and so does the time in the approach IF.
Comparison of convergence between the proposed approaches
The effectiveness of the factors in the fitness function, fuzzy logic controller and infeasible solution adjustment for the proposed approach after the evolution process is shown in Fig. 10.

The effectiveness of the factors in the fitness function and fuzzy logic controller.
From Fig. 10, comparing NINF and INF, we can see that the CrossoverRate and InversionRate of IF actually decreased to small values, and the MutationRate of IF increased to a large value through the fuzzy logical controller at the last generation. As a consequence of the effect of the fuzzy logical controller and infeasible solution adjustment, the fitness value of IF was better than that by NINI and INF. In other words, the results indicate IF has the benefit for avoiding premature convergence and finding a more near optimal solution.
Experiments were then made to evaluate the influences of the number of groups (K) and the desired stock number (D) to the proposed approach. The results of IF using different K and D values on the two testing periods are given in Table 6.
The influences of the number of groups and the desired stock number to IF
The influences of the number of groups and the desired stock number to IF
From Table 6, according to the fitness values of IF with different parameter settings, we can observe that the fitness values are the smallest and largest when the values of K and D are the same and the difference of K and D is one, respectively. These results provide a suggestion that the K and D values should not be set at the same value when applying IF on the other datasets. The observation can further be verified again by their average ROIs and week price fluctuations. When the values of the K and D are different, the derived DGSP can have a larger probability to reach a higher average ROI and a smaller week price fluctuation than that have the same value.
In this section, the proposed approaches are compared to the previous one [8] and the BM on the ROI and week price fluctuation. Their related information is shown in Table 7.
Comparison of ROI and Week Price Variance in the proposed and previous approaches
Comparison of ROI and Week Price Variance in the proposed and previous approaches
For ROI, the proposed approaches are similar to the previous approach in 2017. But, the ROI values of the proposed approaches are better than those of the previous approach and the BM. The reason for the result is because the proposed approaches tend to buy the stocks whose risk is stable, while the previous approaches tend to buy the stocks whose ROI is high. We can also observe that the week price fluctuation of the proposed approaches is much lower than those of the previous approaches. It means that the proposed approach can actually find a DGSP with lower risk and have a similar ability to the previous approach in getting the profit. From the experimental results, we can conclude that the proposed approach is effective and efficient.
Portfolio optimization is an interesting issue for investors because it is important to find a proper portfolio to avoid risk and resist inflation when suffering from financial crises. Hence, lots of optimization approaches with different criteria were proposed in the past decades. To deal with the problems in the existing algorithms, based on the concept of collective intelligence, this paper has proposed a fuzzy GGA-based approach for finding a profitable DGSP. It first encodes the possible DGPSs using the encoding scheme. An enhanced fitness function is then employed to evaluate chromosomes. The mechanism for repairing infeasible solutions and a parameter adjuster based on fuzzy logic are employed to increase the efficiency and effectiveness of the proposed approach. The experimental results on real datasets indicate that the proposed approach can not only speed up the evolution process but also obtain a profitable DGSP. In the future, we will continue to enhance the proposed approach in different ways. For example, the multi-objective evolutionary algorithm can be utilized to derive more diverse non-dominated solutions, or the trading strategies can be used to find trading signals for reducing risk and increase profit. In addition, using hybrid methods based on collective intelligence to enhance the proposed approach could also be a valuable direction to be investigated.
Footnotes
This is a modified and expanded version of the paper “An approach for diverse group stock portfolio optimization using the fuzzy grouping genetic algorithm,” which was presented at The Asian Conference on Intelligent Information and Database Systems (ACIIDS), 2018.
