A Comprehensive Soft Computing-based Approach to Portfolio Management by Discarding Undesirable Stocks

Stock markets play a crucial role in the modern society. Many individuals and organizations attempt to improve their performance in these markets by exploiting approaches that consider different types of factors. However, although there are great complexities involved, practitioners often use simplistic methodologies that neglect relevant features of the problem. That is, they leave out some activities that are essential to obtain better results in the related decision-making problem. Here, we propose using a soft computing-based approach to comprehensively address the main activities of stock investments. We present a novel method for modeling expert knowledge through fuzzy logic that allows the investor to discard undesirable stocks (i.e., stocks that are not suitable for investment); thus, reducing computational complexity in the search process and likely improving the performance of the final stock portfolio. Extensive experiments allow us to conclude that discarding undesirable stocks by exploiting the proposed method produces portfolios that outperform the benchmarks. Therefore, the proposal is a promising alternative to complement current approaches.


I. INTRODUCTION
The development of scientific methodologies and models for making stock investment decisions has received much attention in recent decades.
From a practical viewpoint, three basic stages can be identified in making stock investment decisions: price forecasting, stock selection, and stock portfolio optimization. Price forecasting provides a way to estimate the future performance of stock returns. Stock selection allows the investor to determine which stocks are best from a set of alternatives. Portfolio optimization specifies the amount (usually as a proportion of available resources) of investment that should be allocated to selected stocks.
There are several approaches in the literature that focus mainly on portfolio optimization (e.g., [1]- [12]), while other works focus mainly on portfolio selection (e.g., [13]- [18]), and some other focus only on forecasting the stock returns (e.g., [6], [19]). Furthermore, some works describe methodologies for up to two of these stages; for example, [20] and [21] focus on price forecasting as the first step of an overall methodology that is complemented with stock selection; the works [22]- [24] focus on both stock selection and portfolio optimization. [25] proposes an integrated approach for portfolio optimization involving decisions on stock screening, stock selection and capital allocation.
On the other hand, there are some contributions on the design of decision support systems for stock investments. Some of these systems are designed as convenient interfaces for users to access the stock investment environment. In addition, some of them facilitate making decisions on stock selection and portfolio optimization, mostly taking into account quantitative and qualitative criteria. However, these systems are designed to perform one or two of the stages of the portfolio management for stock investment. Some works on decision support systems that focus on stock selection and portfolio optimization are [26]- [28]. Other works are devoted to price forecasting as well as stock selection, such as [29]- [31]. Moreover, there are others works, such as [32] and [33], that focus on stock selection.
To highlight the importance of the three main stages in decision-making for stock investments, we can take the point of view of an end-user or practitioner. Each of the aforementioned stages of the decision-making process plays an important role in obtaining optimal results. A comprehensive approach that includes all three stages can be expected to produce better results than an approach that includes only one or two of them. In addition, it would be a more practical and complete tool for the practitioner.
On the other hand, selecting the most convenient stocks out of a given set of potential investments does not necessarily mean that the supported stocks are actually convenient for investment. Moreover, by including stocks that could be considered undesirable or inconvenient for investment, the efforts of the decision-making process are increased. Thus, a previous screening phase should be performed where undesirable stocks are discarded, even when this could imply that not investment should be performed at all.
Here, we present a novel way to discard undesirable stocks on the basis of decision theory. We use the so-called constructionist current of thought and model intuitive premises through Fuzzy Logic (FL); we show that this allows the investor to outperform previous approaches. We combine this proposal with several techniques of the so-called computational intelligence (or soft computing) field to comprehensively deal with the rest of activities in the decision making process for stock investments. An Artificial Neural Network (ANN) trained by the well-known Extreme Learning Machine (ELM) algorithm [34] is used to forecast future stock returns. Following relevant literature, the set of factors used to train the network includes data series of historical prices, volume, and growth indicators, among others. On the other hand, Differential Evolution (DE) is used to weight factors and exploit an objective function that allows one to select the most plausible stocks [35]. Finally, a recent proposal to allocate resources to the selected stocks is incorporated [36].
Unlike many other works, the proposed approach does not allocate resources to stocks using the so-called mean-variance approach [37] nor some of its extensions. Markowitz's mean-variance model has been fundamental for the development of Modern Portfolio Theory [24]; however, the application in practice of the mean-variance model itself has been rather scarce [24], [38] (more details are reported in [36]). Following [36], the proposed approach uses confidence intervals of the portfolio return as criteria to determine the best portfolio. This way, the proposed approach is able to consider multiple points of the return's distribution of probability in a single criterion, simplifying the complexity of the optimization problem and incorporating the investor's attitude in presence of risk. Each criterion is represented by an objective in a multi-objective optimization problem. A Genetic Algorithm (GA) specifically designed to deal with confidence intervals is exploited to address this problem [36].
The whole portfolio management process is fed with actual historical data describing information about the performances of the stocks from financial and statistical perspectives.
The contributions of the work are as follows. First, we propose an innovative process to filter undesirable stocks based on the historical performance of several of their financial indicators; the purpose of this is to rule out actions that are very likely to produce poor results. Second, we designed an approach that comprehensively addresses portfolio management by including not only all three stages described above, but also the new screening stage. Each of the steps in the comprehensive approach is built on soft computing techniques; the approach exploits historical stock market data as well as expert knowledge.
The rest of the paper is structured as follows. Section II describes some related relevant works. In Section III, we describe our proposal to discard undesirable stocks using expert knowledge and fuzzy logic, and how this should be combined with return forecasting, stock selection and portfolio optimization. Section IV explains the experiments performed to assess the proposal as well as the results obtained. Finally, the conclusions of this paper are shown in Section V.

II. LITERATURE REVIEW
There are many important contributions to portfolio management in the literature published in recent years. In this section, we give an overview of some recent and relevant works on each of the following subjects: discarding undesirable stocks (Subsection II-A), price forecasting (Subsection II-B), stock selection (Subsection II-C) and portfolio optimization (Subsection II-D).

A. DISCARDING UNDESIRABLE STOCKS
Discarding undesirable stocks can be viewed as a process of screening or filtering stocks; in this process, stocks that possess some characteristics making them inconvenient for investment are identified. Thus, the decision maker can consider only the stocks that passed the screening process. There are some works proposing models for screening stocks that use tools from operational research (e.g., [25], [39]), and from soft computing methods (e.g., [40]). In [25], an integrated method for portfolio optimization that involves decisions on stock screening, stock selection and capital allocation is proposed. The initial step of the evaluation procedure is to screen relevant stocks on the basis of Data Envelopment Analysis (DEA) [41] and finding a group of potential investments by conducting fundamental analysis. In [39], a stock ranking methodology is proposed by taking into account both the inherent multicriteria nature of practical de-cision situations and cautious decision makers' preferences. Based on the cautious dominance relation introduced for interval data, a two-step ranking mechanism with cautious characteristics is introduced. The authors in [40] present a framework that integrates scoring and screening models. The scoring model consist of a Seq2Seq model, which is a deep learning model that has been widely used in processing tasks of variable length input and output sequences, including speech recognition, machine translation and others [42]. The screening model is composed of a discriminative model and a media model based on the weighted stock relation graph.

B. PRICE FORECASTING
In the last 20 years, there have been plenty of contributions on price forecasting based on either statistical or soft computing methods (see [21], [43]). In [19], an optimization method with stock return predictions for short and long horizons, based on a predictive non parametric regression model, is proposed. The authors use lower long-term variance to decrease short-term variance. By combining the application of predictive regressions for two different horizons, the noise for short-term investments is reduced.
In [20], the authors apply cross-sectional predictions of stock returns based on the random forest method for the Markowitz's quadratic portfolio optimization technique. In [6], the authors use three deep neural networks (DNN), namely, deep multilayer perceptron (DMLP) [44], long shortterm memory (LSTM) neural network [45], and convolutional neural network (CNN) [46] to build prediction-based portfolio optimization approaches that keep advantages of deep learning and portfolio theory.
The work in [21] presents a hybrid stock selection model with a stock prediction stage based on Extreme Learning Machine (ELM), which is an efficient training algorithm for ANNs [34], [47]. Their proposal was tested on the China's A-share market stock.
The work in [48] makes comparison of four prediction models: ANN, Support Vector Machine (SVM), random forest and naive-Bayes, which are tested with two approaches for input data. The first approach involves computation of ten technical parameters using stock trading data (open, high, low and close prices) while the second approach focuses on representing these technical parameters as trend deterministic data. Accuracy of each of the prediction models for each of the two input approaches is evaluated. Evaluation is carried out on historical data of two stocks of Indian stock market. In [49], three different feature selection and transformation methods: Principal Components Analysis (PCA), AutoEncoder (AE), and the Restricted Boltzmann Machine (RBM) are compared. Then, a machine learning algorithm is performed to predict future asset return. Other recent works in price forecasting using deep learning are [50]- [52].
In [22], the candidate stocks' efficiency is measured using a Robust Data Envelopment Analysis (RDEA) method [54]. In [23], Capital Asset Pricing Model+ is proposed for measuring the values of each stock and determining those undervalued. The work in [24] combines deep learning LSTM method which concentrates on capturing the longterm dependencies of the returns on assets. In [53], a fusion approach of a classifier, based on machine learning, with the SVM method and the main variance method, is proposed for portfolio selection. In [16], the authors propose the application of several auto-encoder deep-learning architectures for selecting representative stocks from the index constituents.
The authors in [17] use a Fuzzy Analytic Network Process (FANP) [55] to assess and select portfolios, which is based on Analytic Network Process (ANP) [56]. In [18], a Meanvariance model-based selection procedure of stock portfolio using risk-adjusted performance, namely M 2 , is proposed. M 2 (Modigliani risk-adjusted performance) is a measure of the risk-adjusted returns of some investment portfolio [57].
In [21], a hybrid stock selection method that incorporates stock prediction is proposed. In a first stock prediction stage, a predicted factor is produced. Then, in the second stage the predicted factor and various fundamental factors are introduced into a typical linear stock scoring mechanism to evaluate each candidate stock. DE is used in the stock scoring mechanism for optimizing the weights of the different factors.

D. PORTFOLIO OPTIMIZATION
The fundamental theory for portfolio optimization is the Markowitz's mean-variance model [37]. Its formulation marked the beginning of Modern portfolio theory [58]. However, Markowitz's original model is considered too basic since it neglects real world issues related to investors, trading limitations, portfolio size, and others [17]. For evaluating a portfolio's performance, the model is based on measuring the expected return and the risk; the latter is represented by the variance of the portfolio's historical returns. Since the variance takes into account both negative and positive deviations, other risk measures have been proposed, such as the Conditional Value at Risk (CVaR) [59], [60]. Due to that, numerous works have improved the model, creating more risks measures and proposing restrictions that bring them closer to practical aspects of stock market trading [43]. In consequence, many optimizations methods based on exact algorithms (e.g., [1], [2], [12], [61]- [65]), heuristic and hybrid optimization (e.g., [3], [6], [10], [66]- [73]) have been proposed to solve the emerging portfolio optimization models [24], [43], [58].
Theories from other scientific disciplines that have been applied to portfolio optimization also have made important VOLUME 4, 2016 contributions, such as Network Topology [9], [74] and Random Matrix Theory [11], [75].
According to [36], the investor or decision maker in portfolio selection problem manages a multiple criteria problem in which, along with to the objective of return maximization, he/she faces the uncertainty of risk. Different attitudes assumed by decision makers may lead to select different alternatives. A way of modeling both risk and subjectivity of the decision maker in terms of significant confidence intervals was first proposed in [36]. The probabilistic confidence intervals of the portfolio returns characterize the portfolios during the optimization. The optimization is performed by means of a widely accepted decomposition-based evolutionary algorithm, the so-called Multiobjective Evolutionary Algorithm based on Decomposition (MOEA/D) [76], [77]. This aproach is inspired on the independent works of [78] and [79] on interval analysis theory.

III. PROPOSED APPROACH
The proposed approach consists of discarding undesirable stocks by exploiting expert knowledge modeled through fuzzy logic, and performing price forecasting, stock selection and portfolio optimization with ANNs, DE and GAs, respectively, as shown in Fig. 1.
We present a novel fuzzy criterion for ruling out stocks that may be not convenient for investing. This criterion is based on some fuzzy concepts such as acceptability and credibility. Each stock under study is assessed in these concepts. The conjunction of the assessments is computed to define if the stock must be discarded; otherwise, the future returns of the stock are estimated using an ANN. Such estimations as well as some financial factors are then exploited by a DE to select the most plausible stocks. Finally, a GA analyzes the statistical behavior of the selected stocks' historical performances to define how the investment should be allocated.

A. DISCARDING UNDESIRABLE STOCKS
There are different perspectives from which a stock can be assessed; the ones used in a given application depends on the preferences of the decision maker. Some examples come from the so-called fundamental analysis (e.g., return on assets, return on equity, price on sales, etc.), technical analysis (e.g., exponential moving average, double crossover, relative strength index, etc.), statistical analysis (expected value, standard deviation, kurtosis risk, etc.), and sentiment analysis (news impact, analysis of social media, etc.).
Let us assume the existence of a set S of stocks that can be assessed on the basis of n factors v := (v 1 , v 2 , . . . , v n ); such that v i (s j ) represents the performance of stock s j ∈ S (j = 1, . . . , card(S)) regarding the ith perspective of assessment.
Without loss of generality, let us describe the proposed procedure to assess s j , determining if the stock should be considered as undesirable or not. Fig. 2 presents an outline of this procedure.
In Fig. 2, block I, if the stock does not reach a sufficiently high evaluation of desirability ∆, then the stock is discarded.
There are ingrained ideas of the decision-making theory indicating that, to accept the desirability of a decision alternative, there must be enough arguments in favor of the alternative and there should not be too many arguments against it (cf. e.g., [80]). Exploiting these ideas, we propose that a stock will be desirable if only if: 1) For a substantial majority of factors, the evaluation of the stock in each factor reaches a sufficiently high level, and 2) The evaluation of the stock in the ith factor (i = 1, . . . , n) does not have a value significantly lower than a certain threshold l i . Therefore, in Fig. 2, block II, H(s j ) and F (s j ) are used to represent the credibility that the stock fulfills Condition 1 and Condition 2, respectively. For clarity purposes, let us discuss how to calculate H(s j ) first, and F (s j ) later.

1) Calculating the credibility for Condition 1
We calculate H(s j ) (the credibility that s j fulfills Condition 1) by exploiting historical information for all the stocks in S.
Assume that, for each stock s j , we have M historical performance values for each of the n factors, as shown in Fig.  2, block III (note that some elements from this block are used for calculating F (s j ), as shown in the next subsection). Then, the arithmetic mean of the M historical values for each of the n factors is calculated. Finally, as shown in Fig. 2, block II-2-b, the φ percentile of means in the ith factor is obtained for all the stocks in S (i = 1, . . . , n); this φ percentile is denoted by α i . Let be a sequence of predefined values, which are used as acceptability thresholds such that v i (s j ) ≥ α i provides enough arguments to accept that "stock s j is not undesirable regarding the ith perspective". This way, a binary sequence γ ∈ B n can be defined, where B n := {0, 1} n with entries γ i (s j ) as As it can be seen in the rightmost part of Fig. 2, block II-2-a.
The proportion of factors v i for which v i (s j ) is not smaller than the corresponding values α i is denoted by p(s j ) (i = 1, 2, . . . , n). This function is mathematically defined as follows (see the leftmost part of Fig. 2, block II-2-a): Now, let us remark that the linguistic variable a substantial majority of factors, in Condition 1, indicates that γ i (s j ) = 1 for most factors; therefore, for this Condition to be credible, p(s j ) must be high enough. To model the degree of truth of Condition 1, we propose to use a piecewise linear function H(s j ) defined as follows: Yang et al. [21] Stock selection Differential evolution Becker, et al. [35], Yang et al. [21] Portfolio optimization Solares Where ψ is the value that p(s j ) must exceed to provide credibility to H(s j ), and δ represents a sufficiently high value for the proportion p(s j ).
Therefore, as stated in Fig. 2, block II-2, H(s j ) can be now defined as: 2) Calculating the credibility for Condition 2 Calculating the credibility of F (s j ) (s j fulfilling Condition 2) is focused on the historical performance of stock s j . The procedure is similar to the one described in the previous subsection.
From the assumption that we have M historical performance values of stock s j for each of the n factors (Fig. 2, block III), two percentiles, φ 1 and φ 2 (φ 1 < φ 2 ), of the M historical values are calculated for each of the n factors. Let λ i and l i respectively denote the percentiles φ 1 and φ 2 for the ith factor. λ i represents the minimal evaluation of the correspondent factor needed for having sufficient credibility that the stock is "acceptable for investment", while l i represents a threshold from which such an evaluation indicates that the stock is actually "acceptable for investment". Thus, φ 1 and φ 2 must be defined accordingly.
From Condition 2, the notion that v i (s j ) is not significantly smaller than the value l i can be modeled by using a piecewise linear function f i (s j ) where the evaluation of stock s j on the ith factor, v i (s j ), is the independent variable (i = 1, 2, . . . , n). Then, f i (s j ) can be defined as follows: increases from λ i to l i . c) f i (s j ) is 1 when the value of the indicator is not smaller than l i . Therefore, f i (s j ) can be defined mathematically as follows: As shown in Fig. 2, block II-1-a. Finally, the overall credibility F (s j ) that the stock s j has not a very bad evaluation in any factor can be obtained by the conjunction of all values of f i (s j ); there is evident compensation in this conjunction, thus, we propose to use the arithmetic mean as conjunction for computing the credibility F (s j ) as follows: for i = 1, . . . , n.

3) Calculating the evaluation of desirability of stock sj
The credibility that stock s j is acceptable for investment is given by the conjunction of H(s j ) and F (s j ). Since there is no compensation in such conjunction, we apply the product operator for the conjunction as follows: The factors or variables v :  Operating income margin: Operating earnings over revenue 20) Net income margin: Net income over revenue 21) Total debt equity: Total liabilities over total shareholder's equity 22) Levered free cash flow: Amount of money the company left over after paying its financial debts 23) Current ratio: Current assets over current liabilities 24) Quick ratio: (Cash & equivalents + marketable securities + accounts receivable) over current liabilities 25) Inventory turnover ratio: Net sales over ending inventory 26) Receivable turnover ratio: Net credit sales over average accounts receivable 27) Operating income growth rate: (Operating income at the current quarter -operating income at the previous quarter) over operating income at the previous quarter 28) Net income growth rate: (Net income after tax at the current quarter -net income after tax at the previous quarter) over net income after tax at the previous quarter

B. FORECASTING STOCK RETURNS
Discarding undesirable stocks ensures that the supported ones are convenient for investment and reduces the complexity for the rest of activities by allowing the procedure to focus on plausible stocks. The procedure followed here requires to estimate the returns of the stocks for the immediate next period. ANNs is outstanding among the techniques used with this purpose. The ELM algorithm has been reported to be computationally efficient [47], [81], has high accuracy, fast prediction speed and clear superiority in financial market prediction [21], [82]- [84]. Therefore, we use an ANN whose training procedure is the ELM algorithm to forecast the next period stock returns. A Single Layer Feedforward Network (SLFN) is used, whose setting is created per each stock. The training data used to train the ANN are the variables 1-16 from the set of variables used on the Discarding undesirable stocks procedure. Whereas the target variable, the stock return (r t ), for a given period t is calculated from the stock price for that period (p t ) and the immediate previous one (p t−1 ), as follows: We use ninety historical periods to prepare the ANN, from which sixty periods are randomly taken as training data and the rest ones are used to test the ANN effectiveness. Each input variable is normalized taking into account the sixty periods of the training data (note that the target variable is not normalized). After the SLFN is trained, two errors are computed: training error and testing error (or accuracy). The lower the testing error, the better the predictive capacity the SLFN has. Nevertheless, since the ELM algorithm uses a random procedure to compute the weights and bias of the network, we do not always get the same results. Therefore, we run the algorithm n a times and chose the one with better results.

C. SELECTING THE MOST PLAUSIBLE STOCKS
Once the undesirable stocks have been discarded, the remaining ones are assessed to select the most plausible ones. Aiming to do so, a score is assigned to each stock based on its forecasted return in combination with some relevant descriptors of the stock's financial health. The factors used to define the score of each stock are the forecasted return, which is the output of the ANN, as well as the factors 17-28 used in the Discarding undesirable stocks stage.
Note that, without loss of generality, increasing the stock assessments on these factors indicates convenience of the stock.
Let us assume that A := (a 1 , a 2 , . . . , card(A)) represents the set of considered (non-discarded) stocks, that g i (a j ) represents the assessment of stock a j on the ith factor (i = 1, . . . , 13), and that, for a given historical period, the values g i (a j ) are normalized per factor i and for all a 1 , a 2 , . . . , card(A). Then, if the relative importance of each factor i is known (w i ), then the score of stock a j can be determined as follows (cf. [85] and [21]): Of course, the higher the value of S(a j ), the higher the reasons to believe that a j should be supported. Therefore, a common way to select the most plausible stocks is to determine the stocks with the highest scores.
To define the relative importance of each factor, w i , we use a Differential Evolution (DE) that analyzes historical performances of the stocks and calculates the factor weights that better returns would have produced. A basic variant of the DE algorithm is employed as described in [86]. So, for space reasons, the reader is referred to that work to see the details of the algorithm, and we concentrate this subsection to describe the algorithm's fitness function and its decision variables.
The work of this DE is to determine the best values for w i (i = 1, . . . , 13). To do it, its decision variables will be the values of w i ; that is, each individual in the DE will contain the values for w i , such that w i ≥ 0 and 13 i=1 w i = 1. For a given historical period t, the weights in each individual will allow the DE to determine the score of each stock; thus, the top, say 5%, of the stocks can be selected. These top stocks constitute the set of "selected" stocks and the rest constitute the set of "non-selected" stocks for period t. Let R t selected and R t non−selected be the average return of the stocks in these sets (as calculated in Eq. (5)), respectively. The fitness of each individual is then calculated as the arithmetic difference between these two averages according to the recommendation in [35], that is: where T is the number of historical returns used to assess the weights w i (i = 1, . . . , 13).

D. OPTIMIZING STOCK PORTFOLIOS
The final activity to perform stock investments consists of determining how the resources should be allocated. A given distribution of resources among the selected stocks is known as stock portfolio. Defining the most convenient distribution of resources is known as portfolio optimization. In this final activity, the decision alternatives are no longer individual stocks but complete portfolios. Thus, it is necessary to determine multiple criteria to comprehensively assess portfolios. Formally, a stock portfolio is a vector x := (x 1 , x 2 , . . . , x m ) such that x i is the proportion of the total investment that is allocated to the ith stock. Let r i be the return of the ith stock calculated according to Eq. (5); the return of a given portfolio x is defined as follows: Of course, if we knew the t + 1 return of the stocks, we could allocate resources that maximises R(x) without uncertainty; however, since this is impossible, the multiple criteria used to assess portfolios are estimations of R(x). These estimations usually come from probability theory. According to [36], the most convenient portfolio x can be determined by optimizing a set of confidence intervals that describe the probabilistic distribution of the portfolio's return: is the expected return of portfolio x, P (ω) is the probability that event ω occurs, and Ω is the set of feasible portfolios.
Maximizing confidence intervals as done in Eq. (9) does not mean increasing wideness of the intervals; rather, it refers to the intuition that rightmost returns in the probability distribution are desired. In interval theory [79], a possibility function to define the order between two interval numbers, Since Problem (9) can potentially have many objectives defined as interval numbers as well as multiple constraints, we use a Genetic Algorithm (GA) as advised by [36]. In [36], a decomposition-based GA was adapted to deal with these types or objectives that has shown to provide good results in contexts related to stock investments. One resources proportion per selected stock is used here as a gene of the GA, so, a chromosome of the algorithm corresponds to a potential portfolio. The reader is referred to [36] for specific details about the GA.

IV. ASSESSMENT OF THE PROPOSED APPROACH
This section describes the set of experiments performed to assess the performance of the proposal. Such performance is assessed in three main aspects: i) the proposal's capacity to discard undesirable stocks, ii) the robustness of the approach, and iii) the overall quality of the investments performed compared to relevant benchmarks. The performance of the proposal is assessed on the basis of real historical data; the idea behind the experiments is basically to discover what the performance of the approach would have been if it would have been used to invest in stocks in historical periods (a procedure known as back-testing).
To determine the proposal's capacity to discard undesirable stocks, we first determine the approach performance by only using the activities described in Subsections III-B to III-D; next, we determine it by first discarding undesirable stocks according to Subsection III-A, and compare both performances. To determine the robustness of the approach, its performance is obtained as described independently in thirty historical periods using a blind procedure, where we simulate actually being in each historical period so some information is maintained hidden to the approach until it provides recommendations. Finally, such a performance is contrasted with the performance of several benchmarks in each period, and overall conclusions are obtained in the end.

A. HISTORICAL DATA
We use well-known data for our experiments, the historical prices and financial information about the stocks within the Standard and Poor's 500 (S&P500) index. Only stocks currently listed in the index were taken into consideration, and only the officially reported financial information is used to build criterion performances.
Data from some of the most recent ninety months were used as input in the experiments, that is, from November 2013 to April 2021. This dataset contains both uptrends and downtrends, so it is convenient for the kind of tests performed here. From these periods, sixty are used to prepare (say, train) the algorithms, and the rest are used to assess the approach performance in a window-sliding manner. For example, the information of the sixty months Nov2013-Oct2018 is used to determine the investments that should be done at the beginning of Nov2018, these investments are maintained during all the month and the performance of the approach (i.e., the returns) are calculated at the end of Nov2018 using Eq.
(8) (with and without discarding undesirable stocks). Such a performance is compared to the benchmarks in that period. Later, the investments are neglected and, independently, the lapse is slid one period; that is, now the information of the sixty months Dec2013-Nov2018 is used to determine the investments for Dec2018, where the new approach performance is calculated and compared to the benchmarks. This procedure is repeated thirty times; so, the conclusions can shed light on the robustness and overall performance of the approach with high degree of confidence.

B. BENCHMARKS
As commonly done in the related literature (cf. e.g., [7], [21], [36]), we use a stock index to represent the stock market and exploit it as a benchmark. Furthermore, two recent approaches from the literature are also used as benchmarks. These approaches also build stock portfolios following the procedure described in the previous section. Finally, since an important hypothesis of this work is that discarding undesirable stocks provides a better performance, we use the rest of activities (as described in Subsections III-B to III-D) as a new benchmark.
Stock indexes are often used by practitioners as benchmarks because they summarise valuable information regarding the main sectors of an economy. The S&P500 index is perhaps the most well-known and used index; it aggregates information about the five hundred biggest publicly traded companies in the United States of America. Since we are making decisions considering information only from this index, comparing the performance of the proposed approach with the S&P500 index is fair.
The approaches proposed in [21] and [36] are used to compare their performances with the proposed approach because they use similar principles and because they are very recent. In [21], stock price prediction is performed through the extreme learning machine algorithm and an artificial neural network. This estimated future stock price is used as one of the factors for stock selection, where some fundamental indicators are also used to select stocks; however, the amounts of resources to support each selected stock are naively stated as a uniform distribution. On the other hand, the work in [36], use a more sophisticated mechanism to define these amounts of resources based on an objective function similar to 9. However, they neglect stock price prediction and stock selection. Thus, to get that work fully operational, we randomly select the stocks in the experiments below. The parameter values for these benchmarks were defined according to their respective articles.

C. PARAMETER VALUES
In this subsection, we explain the values of parameters used in the different stages of the proposed approach. Note that we simulate the expert knowledge (in the first stage) and the rest of information (for the other stages) by defining parameter values from (1) the literature, (2) some preliminary experiments, and (3) the historical performances of the stocks. (A fourth way of obtaining parameter values is to exploit "fitting algorithms" (see for example, [87]), as explained in future research lines of this manuscript).

1) Discarding undesirable stocks
The sequence of values of α in Eq. (1), is used as acceptability thresholds such that v i (s j ) ≥ α i provides enough arguments to accept that "stock s j is not undesirable regarding the ith perspective", as it was pointed out in subsection III-A. These values were selected for the ith factor i = 1, . . . , n as the value of the 50th percentile of the average values of every stock in the sixty periods from November 2013 to October 2018.
As noted in Eq.  (3), the parameter ψ represents the threshold that p(s j ) must exceed to provide a credibility greater than zero that, for a substantial majority of factors, the evaluation of the stock in each factor reaches a sufficiently high level. Therefore, the selected value is ψ = 0.51. (It is common in some currents of thought that the cut-off thresholds to denote simple majority are set at 0.5; see for example, p. 8 of [88].) Accordingly, since δ is the threshold that p(s j ) must reach or exceed for having the function H(s j ) = 1, the selected value is δ = 0.8.
In Eq. (4), the values of λ i for the ith factor were selected by taking the value of the 10th percentile of the values of the factor in the previous sixty periods of each experimental testing period, as it is pointed out in Subsection IV-A. In a similar way, the values of l i for the ith factor i = 1, . . . , n were selected by taking the value of the 30th percentile of the values of the factor in the previous sixty periods of each experimental testing period.
Finally, since H(s j ) and F (s j ) are membership degrees to fuzzy membership functions, they have continuous values in the range 0, . . . , 1. Thus, the acceptance criterion for investment of any stock θ(s j ) = H(s j )·F (s j ) have values in the same range. Therefore, the proposed balanced threshold for acceptance ∆ was set to 0.51.

2) Rest of activities
As explained above, the sixty periods were used to train the ANN for each stock. The only hidden layer uses sixteen neurons. We observed in preliminary experiments that the ANN showed more efficiency when it uses the same number of neurons as inputs. The more neurons, the more unstable the ANN is; while the fewer neurons, the less predictive capacity the ANN has. Each neuron of the ANN used the sigmoidal function as the activation function. The ELM algorithm was run n a = 50 times to train the ANN for each stock; finally, VOLUME 4, 2016 the ANN model with less testing error was used to predict the return at time t + 1.
Regarding the selection of stocks, the DE defined to select the factor weights that maximize the objective function shown in Equation (7) uses common parameter values (see for example, [89], [90]). The crossover probability was set to 0.9; the differential weight was set to 0.8; the population size was set to 200; and the number of iterations was set to 100. After scoring and ranking the stocks, we only select the top 5% of all the stocks originally considered following the recommendations in [21].
The genetic algorithm used to address (9) was described in detail in [36] and was based on the well-known MOEA/D and adapted to deal with parameter values defined as interval numbers. We use one hundred generations as the stopping criterion, two solutions as the maximum number of solutions replaced by each child solution, a probability of selecting parents only from the neighborhood (instead of the whole population) of 0.9, one hundred subproblems, and twenty weight vectors in the neighborhood of each weight vector. Two confidence intervals are considered by MOEA/D as objectives to be maximized (see Equation (9)): θ β30 (x) and θ β50 (x) according to the recommendations in [36]. The constraints considered by MOEA/D are x i ≥ 0 and x i = 1.

D. RESULTS
The proposed approach uses components that exploit randomness to explore the search space. Here, we intend to discard the effects produced by such randomness by running our approach many times; particularly, each stochastic component runs twenty times for each of the thirty back-testing periods mentioned in Subsection IV-A. These runs produce the average returns shown in Table 1 and Figure 3. Doing it this way sheds light on the robustness of our approach and allows us to reach sound conclusions. For simplicity, the results are discussed hereafter as if the returns were not averages. As mentioned before, in this section we have included several benchmarks to measure the effectiveness of our proposal. These benchmark are: a) the market index S&P500, b) the approach of Yang et al. [21], c) the approach of Solares et al. [36], and d) our approach without the discarding stage, i.e. only stages II, III and IV in Figure 1.
From Table 1 and Figure 3, we can see that the worst overall return was produced by investing according to the S&P500 index; while the best overall return was achieved by investing in a portfolio that discards undesirable stocks following the proposed fuzzy-logic-based-model. Furthermore, the returns obtained by using the proposed model show that this model protects the investments from downtrends in the market, as seen in the fall of the S&P500 index from Jan2020 to Mar2020. Remarkably, this behavior did not prevent the proposed approach from exploiting the clear overall uptrend produced from Apr2020 to Apr2021. This can be clearly seen in Figures 4 and 5, and in Table 1. There it can be seen that, for the first fourteen periods, the market does not move significantly in any direction; however, for the remaining periods, the market starts both negative and positive trends. A higher final return achieved by our proposal indicates that it is taking an overall advantage of these trends. These results also show that discarding stocks is crucial. Table 1 shows that the final average return is better if the fuzzy-logic-based-model is used to discard undesirable stocks. From Table 2 we can also see that the proposed approach outperforms the benchmarks at the end of the thirty periods; the sum of returns is approximately 33% better than Yang et al. 2019 [21], 17% better than Solares et al. 2019 [36], 39% better than the one without discarding stocks and 80% better than the market index. Finally, the cumulative returns of our proposal is 47% better than ang et al. 2019 [21], 22% better than Solares et al. 2019 [36], 58% better than the one without discarding stocks and 118% better than the market index. This performance can be seen in Figures 4 and 5. As we mentioned above, the difference in the performance was produced once the market started a trend. This result indicates that the proposed system can be of great help in upwards and downward tendencies. Figure 5 shows the amount that the investor would obtain if he/she takes his/her investment in a given period. For instance, an investment of $1,000 usd at the beginning of November 2018 using   Figure 5 also shows the detriment caused by the higher negative return produced in May 2019 compared to the benchmarks. In this period, the system decided to allocate high proportions of investments to some stocks with bad actual returns. This was due to the good historical performance of such actions that indicated a good statistical behavior. Particularly, supporting NVIDIA Corporation (Nas-daqGS:NVDA) undermined the effectiveness of the supported portfolio in May 2019. In May 2019 its price went down due to several reasons and our algorithm failed by placing a big proportion of the investment in this stock. Table  3 shows that in 20 runs of our algorithms, a portfolio with an average of 22% of the investment in Nvidia Corporation was built. However, in that period a change of tendency occurred and this stock decreased by 25.16%, representing a loss on almost all portfolios. Let notice that, the overall return of portfolios when the genetic algorithm did not place an investment in Nvidia Corporation for that period was not so bad compared with the others and the market index. Several external issues affect the performance of a stock in the market, such as the case of Nvidia corporation as reported on news [91]. Thus, a way of improving the proposed system in the future is by considering criteria coming from the socalled sentiment analysis [92] that takes into consideration such factors.
On the other hand, as a way to measure the performance of our proposal and compare the results with some benchmarks, the Sharpe ratio r sharpe and Sortino ratio r sortino are used. VOLUME   These ratios are defined as where R p is the average portfolio return, R f is the best available risk-free security rate, σ p is the portfolio standard deviation and σ p,d is the portfolio standard deviation of the downside. These indexes measure the risk per return you obtain compared with a risk free asset. In particular, the Sharpe ratio describes how much return is received per unit of risk, meanwhile, the Sortino ratio describes how much return is received per unit of bad risk. Therefore, the higher these indexes are, the more convenient for investment the asset is. We have considered the Treasure Bond of USA as a risk-free security, with a value of 3% of annual return. We also considered the Treasure Bond of USA as the minimal acceptance ratio (MAR) to compute the downside deviation. R p , σ p and σ p,d are taken from Table 1. Table 4 shows the Sharpe and Sortino ratios for the all the benchmarks and our proposal. According to the results, our proposal has the best performance for both indexes, namely, it has higher returns by considering the risk.

V. CONCLUSIONS
Building stock portfolios with high returns and low risk is a common challenge for researchers in the financial area.
As it is widely known, selecting the more promising stocks is performed according to several factors, such as financial information, news of the market and technical analysis. Several approaches that use computational intelligence algorithms have been proposed in the literature to deal with the overwhelming complexity of building a stock portfolio. Usually, these approaches consider up to three activities to build a portfolio: return forecasting, stock selection and portfolio optimization. These activities decide, by comparing the historical and forecasted performance of potential stock investments, which stocks should be supported and in what amounts. However, supporting the best stocks does not necessarily imply that these stocks are convenient for investment; furthermore, applying these three activities to the whole universe of potential investments can be computationally expensive.
In this paper, a four-stage approach is proposed to comprehensively address the main activities of building stock portfolios. We presented a novel method where fuzzy logic is used, previous to the activities described above, to exploit expert knowledge and discard (undesirable) stocks that are non-convenient for investment. The method is based on principles of the so-called multicriteria decision aiding (MCDA) theory. The modeled expert knowledge indicates whether the performance of a given stock is not high enough to be considered during the selection stage. By doing this, next stages can be more efficient since it is easier to work with a smaller set of stocks. We have performed computational experiments to assess the performance of the approach when considering some reasonable arguments to define the approach's parameters. The results show that stock selection and portfolio optimization stages make more profitable portfolios when discarding stocks using the proposed method (see Table 2 and Figures 4 and 5). These results also show that a traditional benchmark, the Standard and Poor's 500 index, is outperformed by the proposed approach. Moreover, the performance of the proposed approach also outperformed other recent works chosen as benchmarks, [21] and [36]. Therefore, we can conclude that the soft computing-based approach described in this paper can be seriously considered by practitioners as an alternative for stock investments.
To shed light on the performance of the approach, we have simulated expert knowledge by exploiting historical performance of the considered stocks through statistical procedures. However, such a knowledge can of course be directly elicited from the experience of the practitioner. Furthermore, it can be indirectly elicited using some procedures of the literature in similar contexts. For example, in [87], a machine-learning type of elicitation procedure is described to define the parameter values that some high-level heuristic search methods should use. In [93], a literature review to elicit parameter values for decision theory is presented; it can be seen in that work how regression-like procedures are outstand in this context.
Other future research lines are the following: I Studying the performance of the system by adjusting some threshold variables to discard more or less stocks. II Evaluating the prediction of the returns obtained by employing different financial variables, or by creating VOLUME 4, 2016 new ones such as trends and new ratios; these will be uses as inputs to the ANN. III Studying the performance of the system by employing different financial variables to build the stock portfolio. IV Evaluating the performance of the system by modifying different parameters such as the number of generations, the number of individuals in the population, or modifying some parameters of the original version of MOEA/D such as the maximum number of solutions replaced by each child, the probability of selecting parents only from the neighborhood, the number of the sub-problems, and the number of weight vectors in the neighborhood of each weight vector. V New experiments to show robustness of the approach regarding the number and type of alternatives in the universe of stocks and the number of selected stocks.