# Stock Portfolio Management in the Presence of Downtends Using Computational Intelligence
## 1 Introduction  
Both individual and organizational investors commonly seek to take profits from stock markets. Among the different ways to exploit these markets, the literature has focused on the idea of buying cheap and selling expensive. The authors of [1] point out that there is an assumption in classical portfolio theory to manage the selected assets with the simplest trading strategy, which is a buy-and-hold approach. However, it is also common for practitioners to also seek profits when prices go down. There are several mechanisms that allow an investor to take profits in this situation (e.g., [2; 3; 4]). Investing in stocks when their prices are expected to rise is known as opening a long position. In this scenario, the investor adopts the idea that stocks should be bought when they are the cheapest and sold when they are as expensive as possible; the difference between selling and buying prices constitutes the investor's basic earning. On the other hand, opening a short position means that the investor expects the stock prices to go down. According to [5], short selling allows the investor to profit from their belief that the price of a security will decline. Moreover, short selling is used by top-down and quantitative managers as a part of a neutral strategy (cf. [5]). In this case, the investor can, for example, borrow shares of the stock, sell them in this very moment and commit to return them at a moment in the future; so, to return them, the investor will have to buy them at whatever the price of the stock is at that moment in the future. Therefore, the earning of the investment here is also calculated as the difference between the selling and buying prices--just that the sell is produced first. The highly complex decision-making process of allocating resources considering both uptrends and downtrends of prices requires sophisticated models and tools to achieve competitive results. Thus, this work proposes a comprehensive procedure based on computational intelligence that aids defining how investors should allocate their resources in the presence of both scenarios. First, an artificial neural network (ANN) (cf. [6]) is used to estimate future prices. There are evident tendencies in the literature showing that ANNs have high accuracy, fast prediction speed and clear superiority in predictions related to financial markets (e.g., [7; 8; 9]). To perform these estimations, the ANN takes historical performances of the stocks considering the most common factors of the literature, such as stock prices and financial ratios (cf. [10]). Some additional financial indicators are used here to determine if the forecasted tendency (that the price will go up or down) is supported. These indicators are taken from the so-called fundamental analysis, a type of indicators often considered by practitioners (cf. [11]). Evolutionary algorithms (EAs) are then used to ponder these indicators altogether with the price estimation and determine which stocks should be considered by the investor for investment, either with a downtrend or an uptrend. Finally, EAs are also used to determine how much of the resources should be allocated to each of the selected stocks on the basis of statistical analysis to historical data. Here, only historical prices of the selected stocks are taken into consideration according to the approach described in [12]. The literature review presented in Section 3 shows that, although there are studies that consider both uptrends and downtrends in stock prices, as far as we know, there are no published works that comprehensively address the problem the way that is proposed here. That is, not only taking advantage of a future increase in prices by opening long positions but also taking advantage of future decrease in prices by opening short positions, while also forecasting stock prices, selecting the most plausible stocks and optimizing the stock portfolio. Our hypothesis is that a procedure that effectively implements all this provides better overall earnings for the investor.