
تعداد نشریات | 162 |
تعداد شمارهها | 6,623 |
تعداد مقالات | 71,544 |
تعداد مشاهده مقاله | 126,897,824 |
تعداد دریافت فایل اصل مقاله | 99,946,073 |
Use of Genetic Algorithm in Algorithmic Trading to Optimize Technical Analysis in the International Stock Market (Forex) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Journal of Cyberspace Studies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
دوره 6، شماره 1، فروردین 2022، صفحه 21-29 اصل مقاله (599.28 K) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
نوع مقاله: Original article | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
شناسه دیجیتال (DOI): 10.22059/jcss.2021.334193.1067 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
نویسنده | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hadi Hajimiri* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Master of Software Engineering, Azad University, Tehran, Iran | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
چکیده | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Recent studies on financial markets have demonstrated that technical analysis can help us effectively predict the stock market index trend. Business systems are widely used for stock market analysis. This paper uses a genetic algorithm (GA) to develop a stock market trading optimization system. Our proposed system can generate a decision-making strategy for buying, holding, and selling stocks for each day and generate high returns for each stock. The system consists of two stages: removing restricted stocks and producing a stock trading strategy. Accordingly, evolutionary computation, like GA, is highly promising because of its intelligence, flexibility, and search strength (fast and efficient). The multiple-objective nature of the utilized algorithm can be regarded as the center of gravity of the research question. The proper functioning or malfunctioning of the resulting portfolio management can be employed as a benchmark for selecting or discarding the algorithm. On the other hand, the research question is focused on the application of technical analysis indicators. Therefore, both aspects of the research question, namely the multiple-objective nature of the algorithm in terms of the analysis method and technical indicators in terms of features selected for analysis, must be taken into account. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
کلیدواژهها | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
algorithmic trading؛ genetic algorithms؛ stock index؛ technical analysis | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
اصل مقاله | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Introduction Technical tools, including moving averages, are used to forecast stock prices. Using two moving averages is the most common way to find buying and selling points on time, requiring two periods. Optimum lengths for both short-term and long-term periods per share vary according to their price trend. Finding these optimum lengths using traditional methods is costly and usually does not lead to a globally optimal solution. The best way is to use GA intelligent tools. This study seeks to use these indicators in mining stock trading rules. A model for optimal portfolio management is obtained using technical and multiple-objective GA (MOGA) indicators to maximize returns and minimize risk. This paper utilizes fundamental indicators for stock ranking and selection. Recent research, including Silva et al. (2015), has employed technical and fundamental analyses for portfolio management. This research initially extracts fundamental and technical variables by simulating coefficients to form an optimal portfolio. Then, using real-world studies, trading rules are extracted to manage the portfolio. Background Research Absolute stock valuation is practically impossible. Therefore, researchers exploit innovative methods such as local search (LS), taboo search (TS), simulated annealing (SA), ant colony optimization (ACO), particle swarm optimization (PSO), and evolutionary algorithms (EA) to solve the problem (Fonseca & Fleming, 1993). Evolutionary algorithms are based on biological evolution, where solutions are encrypted in the form of chromosomes, and the best candidates are selected to create new populations by the fitness function. By repeating the evolutionary process, the best solution to the problem is obtained. This method considers different limitations of the problem in making chromosomes (Streichert et al., 2004). In these studies, researchers used evolutionary algorithms to optimize portfolio risk and return using objective-based management planning in portfolio management. In portfolio management, three types of approaches can be used (Magin et al., 2007):
In the active portfolio management approach, efforts are made to achieve better performance than the market by doing more transactions. Some researchers have employed technical analysis to mine trading rules, including Hirabayashi et al. (2009). Research Hypothesis Portfolio management is done using GA and technical indicators such as relative strength index (RSI) and moving averages (MA). In their research, Ruiz et al. (2014) indicated that a higher return on the market could be achieved by using the moving average of the stock price variable. In GA, by optimizing the variables on the chromosome, we can minimize risk and maximize return in portfolio management. Research Methods This research seeks to design a portfolio management model. The goal is to design a model applicable to achieving an appropriate level of risk and return in the portfolio. For this purpose, technical variables are utilized to mine trading rules. The following technical variables will be employed in this study: Exponential moving average (EMA) Exponential moving average (EMA) is a trend-following indicator. It helps determine whether the process has started or is ending its cycle. Moving averages, including EMA, can be calculated in several ways. This method has assigned more weight to more up-to-date information (Murphy, 1999). This variable is calculated using Eq. (1). To use it, we use Table 1.
Eq. (1)
Table 1. Assign points to the variable EMA
Hall Moving Average (HMA) This variable is also a trend-following indicator. Hull Moving Average (HMA) has a smoother chart than EMA. The price charts of these variables are closer to each other. It is commonly used in mid-/long-term trades. This variable is calculated using Eq. (2). To use it, we use Table 2.
Eq. (2)
Table 2. Assign points to the variable HMA
Rate of price change (ROC) The price rate of change is one of the indicators measuring the movement, expressing the percentage difference between the current closing price of a stock and the price of the previous n periods. This indicator indicates the rate of change in the price of a share. A rapid rise or fall in a given stock's price can indicate that it has been overbought or oversold. This variable is calculated using Eq. (3). To use it, we use Table 3.
Eq. (3)
Table 3. Assign points to the variable ROC
Relative Strength Index (RSI) RSI is one of the indicators measuring movement. It compares the magnitude of recent stock gains with recent stock losses to find overbought and oversold conditions. It also produces early signals, though they must be used with other indicators (Murphy, 1999). This variable is calculated using Eq. (4). To use it, we use Table 4.
Eq. (4).
Table 4. Assign points to the variable RSI
Moving average convergence divergence (MACD) Moving average convergence divergence (MACD) is also a trend-following indicator. As one of the reliable indicators of the market, it is equal to the difference between long-/short-term averages. This variable is calculated using Eq. (5). To use it, we use Table 5.
Eq. (5)
Table 5. Assign points to the variable MACD
True strength index (TSI) True strength index is also an indicator measuring the movement that simultaneously determines the trend and overbought and oversold conditions. This variable is calculated using Eq. (6). To use it, we use Table 6.
Eq. (6)
Table 6. Assign points to the variable TSI
Chromosome construction
A chromosome was designed as follows:
wherein:
Initially, the optimization problem started with an initial solution. For this purpose, hypothetical values were assigned to the important factors of technical variables, restrictions on the sale of shares, restrictions on shareholding, and the optimal number of shares in the portfolio. The required variables for each of the stocks in the portfolio were calculated using Eq. (7).
Eq. (7) Then, the decision to buy or sell the share was made using the following rules: If A>B for a given share, in case there is a surplus of money to invest, the amount is allocated to the purchase of that share. Here, N is the optimal default value for the number of shares in the portfolio, and n is the number of shares. If A We use GA to optimize the variables on the chromosome. To this aim, we utilized multi-objective GA to minimize risk and maximize returns. Consequently, the necessary rules for optimal portfolio management at different levels of risk and return are obtained. After extracting the optimum coefficients of chromosomes, we evaluate portfolio performance in the test period.
Conclusion Herein, in response to the main question, "how will multi-objective intelligent algorithms help portfolio formation?" portfolio management guidelines were initially extracted to optimize risk and return using technical and GA analysis in the training period. Afterward, the performance of the results obtained from the model training period was tested. The multiple-objective nature of the utilized algorithm can be regarded as the center of gravity of the research question. The proper functioning or malfunctioning of the resulting portfolio management can be used as a benchmark for selecting or discarding the algorithm. On the other hand, the research question is focused on the application of technical analysis indicators. Therefore, in conclusion, both aspects of the research question, namely the multiple-objective nature of the algorithm in terms of analysis method and technical indicators in terms of features selected for analysis, must be taken into account. Investors looking for less risk should include more stocks in their portfolios. They should wait for the technical indicators to give strong buy signals at the time of purchase, act as soon as possible and not wait for strong sell signals when selling the stock. On the other hand, investors looking for higher returns should include fewer stocks in their portfolios and buy less strong signals. They also should wait longer when selling and wait for strong sell signals. As shown, investors with varying degrees of risk-taking can use technical analysis in portfolio management to achieve greater returns than market returns.
Ethical considerations The author has completely considered ethical issues, including informed consent, plagiarism, data fabrication, misconduct, and/or falsification, double publication and/or redundancy, submission, etc. Data availability The dataset generated and analyzed during the current study is available from the corresponding author on reasonable request. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
مراجع | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fonseca, C.M. & Fleming, P.J. (1993). “Genetic Algorithms for Multiobjective Optimization: Formulation Discussion and Generalization”. Paper presented at the ICGA.
Hirabayashi, A.; Aranha, C. & Iba, H. (2009). “Optimization of the trading rule in foreign exchange using genetic algorithm”. Paper presented at the Proceedings of the 11th Annual conference on Genetic and evolutionary computation.
Maginn, J.L.; Tuttle, D.L.; McLeavey, D.W. & Pinto, J.E. (2007). Managing investment portfolios: a dynamic process. Vol. 3, John Wiley & Sons.
Murphy, J.J. (1999). Technical Analysis of the Futures Markets: A Comprehensive Guide to Trad-ing Methods and Applications, New York Institute of Finance: Prentice-Hall.
Ruiz, V.; Pérez, M.A. & Olasolo, A. (2014). “Dynamic portfolio management strategies based on the use of moving averages”. Procedia-Social and Behavioral Sciences, 109: 1277- 1281.
Silva, A.; Neves, R. & Horta, N. (2015). “A hybrid approach to portfolio composition based on fundamental and technical indicators”. Expert Systems with Applications, 42(4): 2036- 2048.
Streichert, F.; Ulmer, H. & Zell, A. (2004). “Evaluating a hybrid encoding and three crossover operators on the constrained portfolio selection problem”. Paper presented at the Evolutionary Computation, CEC2004, Congress on. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
آمار تعداد مشاهده مقاله: 912 تعداد دریافت فایل اصل مقاله: 886 |