Next Article in Journal
Bio-Inspired Hyperparameter Tuning of Federated Learning for Student Activity Recognition in Online Exam Environment
Previous Article in Journal
Artificial Intelligence-Driven Facial Image Analysis for the Early Detection of Rare Diseases: Legal, Ethical, Forensic, and Cybersecurity Considerations
Previous Article in Special Issue
Generative Adversarial Networks for Synthetic Data Generation in Finance: Evaluating Statistical Similarities and Quality Assessment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Utilizing Genetic Algorithms in Conjunction with ANN-Based Stock Valuation Models to Enhance the Optimization of Stock Investment Decisions

Department of Information Management, TamKang University, New Taipei 251301, Taiwan
*
Author to whom correspondence should be addressed.
AI 2024, 5(3), 1011-1029; https://doi.org/10.3390/ai5030050
Submission received: 26 April 2024 / Revised: 8 June 2024 / Accepted: 12 June 2024 / Published: 1 July 2024
(This article belongs to the Special Issue AI in Finance: Leveraging AI to Transform Financial Services)

Abstract

:
Navigating the stock market’s unpredictability and reducing vulnerability to its volatility requires well-informed decisions on stock selection, capital allocation, and transaction timing. While stock selection can be accomplished through fundamental analysis, the extensive data involved often pose challenges in discerning pertinent information. Timing, typically managed through technical analysis, may experience delays, leading to missed opportunities for stock transactions. Capital allocation, a quintessential resource optimization dilemma, necessitates meticulous planning for resolution. Consequently, this thesis leverages the optimization attributes of genetic algorithms, in conjunction with fundamental analysis and the concept of combination with repetition optimization, to identify appropriate stock selection and capital allocation strategies. Regarding timing, it employs deep learning coupled with the Ohlson model for stock valuation to ascertain the intrinsic worth of stocks. This lays the groundwork for transactions to yield favorable returns. In terms of experimentation, this study juxtaposes the integrated analytical approach of this thesis with the equal capital allocation strategy, TAIEX, and the Taiwan 50 index. The findings affirm that irrespective of the Taiwan stock market’s bullish or bearish tendencies, the method proposed in this study indeed facilitates investors in making astute investment decisions and attaining substantial profits.

1. Introduction

Considering the increasing variety of investment options, numerous investment methods and information are available. In this era of low interest rates, the rewards from keeping funds in the bank have diminished. Therefore, investors are compelled to seek higher returns on their investments. There are many investment tools available, such as stocks, insurance, funds, and futures. Many investors prefer equities due to the transparency and convenience of stock market information, coupled with high liquidity and potential for high returns. However, higher returns often come with higher risks. In the rapidly fluctuating stock market, investors can become victims of high risk if they lack sufficient knowledge or receive incorrect information. Therefore, it is crucial for investors to have a sound financial and investment strategy to make informed decisions and achieve high returns.
Nevertheless, numerous factors influence stock prices, leading to changes in the investment environment and increased complexity. Even seasoned investors cannot accurately predict stock price movements. With a vast array of stocks available, selecting the right ones to invest in poses a challenge. Investment decisions vary based on individual preferences, the information received, and risk tolerance. However, the ultimate goal remains the same for all investors—to achieve the highest return at the lowest risk.
Many studies focus solely on addressing one or two aspects, such as stock selection, the timing of buying and selling, or capital allocation, lacking a comprehensive approach that encompasses all three key areas currently. The absence of an integrated approach in research may result in investors struggling to obtain a comprehensive investment strategy. Furthermore, while fundamental analysis and technical analysis are widely used in investment decision-making, effectively integrating them remains a challenge. Simultaneously, with the increase in market data volume, the ability to process and analyze these data becomes crucial, necessitating exploration into enhancing the speed and efficiency of data processing to support effective investment decisions. Filling these research gaps will help enhance the overall effectiveness of stock investment and provide investors with more robust tools to tackle market challenges.
Recently, research in artificial intelligence has seen vigorous development, with applications in the financial sector gradually maturing and relevant studies continually emerging. Artificial intelligence has proven to be an effective tool for investment decision-making, especially in solving optimization problems with large search spaces. Studies by Bao [1], Bermúdez et al. [2], Chang Chien et al. [3], Chang et al. [4], Chen et al. [5], Dastkhan et al. [6], Fu et al. [7], Gorgulho et al. [8], Kamali [9], Leu et al. [10], NG et al. [11], Orito et al. [12], Papadamou et al. [13] and Rafaely et al. [14] have used genetic algorithms to solve portfolio optimization problems, achieving high returns at low risk.
Similarly, Chavarnakul et al. [15], Du et al. [16], Kara et al. [17], Lazo et al. [18], Liu et al. [19], Nazemi et al. [20] and Varnami et al. [21] have utilized neural networks to construct various algorithms and prediction methods, discussing stock trading profitability and achieving excess returns. These studies demonstrate that artificial intelligence can indeed provide optimal solutions. Notably, genetic algorithms do not require additional assumptions or limitations to obtain the best overall satisfactory solution. This study, therefore, uses genetic algorithms in artificial intelligence as a foundation for research.
The Ohlson model, proposed in 1995, is a price evaluation model that uses accounting information from financial statements. This model can determine the true value of a company based on defined variables. A nonlinear relationship exists between these variables and the company’s value. Therefore, this study leverages the learning ability of neural networks to simulate the relationships between variables and the company’s value, aiding in determining the company’s correct value. When making timing decisions, investors can compare the true value of a company’s stock with its market value, enabling them to make informed buy or sell decisions.
Through effectively making these three key decisions, investors can attain substantial risk premiums. Therefore, this study utilizes the optimization properties of genetic algorithms, combined with the principles of fundamental analysis and repetitive portfolio optimization, to seek suitable timing, stock selection, and capital allocation strategies. In terms of timing, while previous research mostly employs technical analysis to determine the timing for buying and selling, this paper integrates the stock valuation Ohlson model of fundamental analysis with deep learning to effectively provide timing judgment information, thus addressing the lagging issue of technical analysis in timing resolution. To augment the speed and efficiency of processing stock data, this paper introduces an adept genetic algorithm encoding method founded on the principle of optimizing resource allocation through combination with repetitions. The objective is to effectively tackle the optimization challenges associated with stock selection and capital allocation in stock investment. In terms of experimentation, this study compares the proposed comprehensive analysis method with equal capital allocation strategies, TAIEX, and the Taiwan 50 index. The results demonstrate that regardless of whether the Taiwanese stock market is in a bull or bear market, the method proposed in this study can indeed assist investors in making outstanding investment decisions and achieving substantial profits.

2. Literature Review

2.1. Stock Investment Research

Investing in the stock market necessitates a careful evaluation of risk and potential returns. To mitigate investment risk, investors can distribute their capital across various investment options. An effective investment strategy should encompass the selection of stocks, the timing of investments, and the allocation of capital.
The objective of timing is to pinpoint the most opportune moment to buy or sell a stock. Various studies, including those by Allen et al. [22], Badawy et al. [23], Bao [1], Chang Chien et al. [3], Chang et al. [24], Huang et al. [25], Jiang et al. [26] and Korczak et al. [27] have integrated genetic algorithms with other methodologies like technical analysis, regression, and support vector machine to identify optimal stock market trading opportunities. These studies aimed to showcase impressive returns through experimental demonstrations. The use of genetic algorithms to optimize the stock index prediction model has proven effective, as demonstrated by Du et al. [16], Fu et al. [28], Khan et al. [29], Sahin et al. [30], Shen et al. [31], and Versace et al. [32]. Furthermore, Jang et al. [33], Kim et al. [34] and Yang et al. [35] developed an intelligent stock trading system that uses neural networks to predict stock prices and market trends. Some researchers have also employed genetic algorithms to address the slow convergence and low learning efficiency issues associated with neural networks. Mahmoodi et al. [36] used three different models to predict stock market signals. Two models were better at predicting when to sell, and one was better at predicting when to buy. The model using the Imperialist Competitive Algorithm performed the best. Solares et al. [37] used artificial neural networks and fundamental analysis to predict future stock prices. They also used a method called differential evolution and fundamental analysis to choose the most sensible stocks. Lastly, they used genetic algorithms and statistical analysis to create the best investment portfolio. The tests showed that most of the time, their methods did better than the standard methods with statistical importance.
The objective of a selection strategy is to discern superior investment targets from a multitude of potential stocks. This process necessitates an evaluation of the return and risk associated with stock investment, leading to the identification of an optimal portfolio. To enhance the precision of stock price predictions, Cheng et al. [38] proposed a hybrid forecasting model that integrates genetic algorithms with rough set theory. This model has the potential to outperform both the buy-and-hold strategy and traditional genetic algorithms in terms of returns. Chiu et al. [39] fused genetic algorithm, regression, and technical analysis to formulate a stock selection model, thereby identifying high-yield stocks as potential investment targets. Chun et al. [40] and Oh et al. [41] employed genetic algorithms, with the incorporation of a novel fitness function design, to select investment targets predicated on stock prices. This methodology can yield consistent returns irrespective of the fluctuations in the stock market. Gold et al. [42] amalgamated artificial intelligence with fundamental analysis to optimize portfolios, thereby validating the applicability of artificial intelligence within the realm of investment. Ozcalici et al. [43] used artificial neural networks to pick stocks. The stocks they picked did better than just buying and holding onto stocks. They also used special rules and artificial neural networks to help investors make decisions and potentially earn more money. Yodmun et al. [44] suggested a methodology for stock selection that initially categorizes stocks and then determines investment weights via fuzzy quantitative analysis. Subsequently, stocks are ranked according to the fuzzy hierarchy analysis method. Investors can then select stocks based on these final investment weights. Yun et al. [45] employed a genetic algorithm coupled with learning regression models to pinpoint the ideal feature subset. Their objective was to augment the interpretability of deep learning in the context of stock price prediction.
Capital allocation is designed to aid investors in maximizing portfolio return by distributing funds among various investment targets. Adebiyi et al. [46] used genetic algorithms to make investment portfolios better. They suggested ways to distribute assets to obtain the best returns. This method helps investors make smart decisions about risk when choosing and investing in portfolios, and it suggests how to distribute assets to obtain the best returns. Chen et al. [47] suggested a relational genetic algorithm guided by new mutation operations to boost evolution efficiency and solve a comprehensive portfolio optimization problem. Kocak [48] employed the Shapely value in cooperative game theory to calculate the weight of each stock in the portfolio, thereby determining the capital allocation ratio. Shoaf et al. [49] introduced a novel method of encoding the genetic algorithm for capital allocation. Soleimani et al. [50] combined several heuristic and non-heuristic algorithms to propose a portfolio optimization model that addresses the nonlinear portfolio optimization problem and enhances the rate of return.
The literature review above indicates that stock portfolio optimization primarily concentrates on the selection of investment targets, the timing of buying or selling stocks, and the amounts invested in each investment target. However, a review of the past literature reveals that few studies have been able to address these three issues concurrently, with most only able to tackle one or two. Furthermore, strategies on how to enhance returns while mitigating risk also hold significant importance.

2.2. Deep Learning

Deep learning is a type of machine learning that mimics the way the human brain operates, using neural networks to learn from and extract valuable information from large amounts of data. This learning approach has wide applications in many fields, including speech recognition, image recognition, and natural language processing. Long Short-Term Memory (LSTM) is a special type of Recurrent Neural Network (RNN) proposed by Hochreiter and Schmidhuber in 1997, designed specifically to solve the long-term dependency problem. LSTM is a special deep learning model designed to handle time series data. What makes LSTM unique is its “memory cell”, which can store and access past information for long periods. This enables LSTM to capture long-term dependencies in time series data, something that many other models struggle to do. The reason for choosing LSTM to predict stock prices is that stock prices are typical time series data, and their variations depend not only on the current market conditions but also on past price trends. The memory cell in LSTM allows it to remember past price information and use it to predict future prices.
In recent years, numerous studies have proven the effectiveness of Long Short-Term Memory (LSTM) in stock price prediction. LSTM can be utilized not only for predicting stock prices but also for making stock investment decisions. Akita et al. [51] utilized LSTM neural networks to predict the closing prices of publicly listed companies. They incorporated both textual and numerical information as features and compared LSTM with various other neural networks. The results demonstrated that LSTM neural networks exhibited better profitability and were more capable of capturing the impact of time-series data. Furthermore, the inclusion of textual information as feature data led to more accurate prediction results compared to considering only numerical information. Bao et al. [1] employed LSTM to forecast the prices of the Shanghai Stock Exchange Composite Index and compared its predictive performance with other models, showing that LSTM outperformed the other models. Chen et al. [52] employed genetic algorithms combined with LSTM to build a model for stock price prediction. The experiments confirmed that their proposed predictive model effectively enhanced the accuracy of stock predictions.
Chung et al. [53] employed genetic algorithms combined with LSTM to establish a predictive model for the Korean stock price index (KOSPI). The experimental results validated the lower Mean Squared Error (MSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE) of the proposed GA-LSTM model. Ding et al. [54] employed LSTM to forecast stock price movements and made buy or sell decisions based on the prediction results. Their findings revealed that LSTM’s predictive performance surpassed that of traditional technical analysis methods and could generate stable positive returns. Fischer et al. [55] used LSTM to predict the daily returns of the German DAX index. Their findings demonstrated that LSTM effectively captured the market’s nonlinear dynamics and yielded predictive performance surpassing that of the random walk model. Krauss et al. [56] used LSTM to predict the daily returns of the German DAX index and made buy or sell decisions based on the prediction results. Their findings indicated that LSTM effectively captured the market’s nonlinear dynamics and yielded predictive performance surpassing that of the random walk model.
Nelson et al. [57] developed an LSTM classification model to predict the future trends of stock prices in 2014 based on historical prices and technical analysis indicators. The research results also demonstrated that their proposed model, with few exceptions, outperformed other methods, and the risk associated with the LSTM model was relatively lower. Selvin et al. [58] also utilized LSTM to predict stock market prices and obtained similar results. They compared the performance of three different deep learning architectures—RNN, LSTM-RNN, and CNN—with the traditional ARIMA method. The results revealed that the deep learning models consistently outperformed the traditional ARIMA model. Siami-Namini et al. [59] compared the predictions of Dow Jones, Hang Seng, NASDAQ, Nikkei, S&P 500 indices, and several companies’ stocks using ARIMA and LSTM. The results showed that LSTM outperformed ARIMA.
These studies indicate that LSTM is a powerful tool that can help us better understand and predict changes in stock prices. However, there are still many unresolved issues and challenges in this field, such as how to choose appropriate model parameters and how to handle the uncertainty of data. These issues require further research and exploration. Due to its unique structure and capabilities, LSTM can effectively handle time-series data, such as stock price data, and has been proven to have superior performance in many studies. However, there are also some challenges. First, data quality is a critical issue. Stock price data may be influenced by many factors, such as market sentiment and policy changes, which may increase the noise in the data and affect the predictive performance of the model. Second, the interpretability of the model is another challenge. Although LSTM can generate highly accurate predictions, its internal workings are often difficult to understand, which may limit its use in practical applications.
The advantages of LSTM-based stock price prediction over traditional econometric models have been confirmed in multiple studies ([2,7,8,35,58,60]). These research papers provide valuable insights into and empirical results regarding the superiority of LSTM-based stock price prediction over traditional econometric models. By comparing the performance of different models in predicting stock prices, these studies can provide a deeper understanding, helping investors make wiser decisions in practice. LSTM can capture complex nonlinear patterns and long-term dependencies in the data, which may be challenging for traditional econometric models. Furthermore, LSTM can handle and analyze large amounts of historical stock price sequence data, extracting meaningful patterns from it, thus achieving more accurate predictions. Traditional econometric models may struggle to effectively capture the complex dynamics and nonlinear relationships present in stock price fluctuations. However, it is worth noting that comparisons between LSTM and traditional econometric models may vary depending on the specific dataset, market conditions, and analysis time range. While LSTM has shown promising predictive performance in many cases, in some situations, traditional econometric models may still provide competitive results. Overall, the advantage of LSTM lies in its ability to handle sequence data and capture complex patterns, which can provide a better edge in some stock price prediction tasks than traditional econometric models. Therefore, future research can focus on more effective data preprocessing and feature selection methods to improve data quality and also integrate other models to enhance the interpretability of LSTM.

2.3. Ohlson Equity Evaluation Model

The equity evaluation model proposed by Ohlson in 1995 leverages accounting information found in financial reports, specifically earnings and book value, to assess stock value. This model is based on three hypotheses: the present value of expected dividend (PVED), clean surplus relation (CSR), and the linear information dynamic model (LIM). These hypotheses lead to a linear evaluation model where the firm value is equal to the book value plus abnormal earnings and non-accounting information. This relationship can be represented by the following Formula (1).
P t = b v t + α 1 X t a + α 2 V t
And α 1 = ω ( R f ω ) 0 ; α 2 = R f ( R f ω ) ( R f γ ) 0
P = market price; b v = book value; X = abnormal earnings;
V = non-accounting information
In the model, ω and γ symbolize the parameters for abnormal earnings and other information related to sustainability. The larger these values, the more sensitive they are to the company’s value. Among these variables, the book value signifies the actual asset value of the stock, while abnormal earnings gauge current profitability. Other non-accounting information adjusts future profitability. However, the model does not specify what this other non-accounting information comprises.
White et al. [61] demonstrated that the Ohlson model has a strong explanatory power, reaching between 60% and 70%. Subsequent research by various scholars also affirmed the effectiveness of the Ohlson model ([62,63]). However, because Ohlson did not explicitly define the non-accounting information, many researchers made relevant adjustments, such as incorporating the corporate governance variable into the non-accounting information. This study found that the inclusion of corporate governance-related variables enhanced the explanatory power of the original Ohlson equity evaluation model. The research also confirmed a significant correlation between the characteristics of corporate governance and equity value and showed that the Ohlson equity evaluation model becomes more comprehensive with the addition of this variable.
This study employs the accounting-based Ohlson model to evaluate the true value of various types of stocks in the stock market. Factors influencing the value of the stock are divided into non-accounting information variables and accounting information variables. The accounting information, which serves as the basic variables for equity valuation, includes book value and earnings per share. The non-accounting information variable consists of eight corporate governance variables. These variables, proposed by Lee et al. [64], have been shown to effectively explain the equity value of a company. They include the supervisor and director shareholding ratio, large shareholder ratios, managers’ shareholding ratio, the group shareholding ratio, the external holdings ratio, shares surplus deviation variables, seat surplus deviation variables, and seat deviation variables.

3. Research Framework

This study leverages the search optimization capabilities of the genetic algorithm to facilitate appropriate investment decisions for stock selection and capital allocation. It also employs neural networks in conjunction with the Ohlson model to predict various stock prices, serving as a basis for buy or sell decisions in stock transactions. By integrating genetic algorithms, LSTM neural networks, and the Ohlson model, it is possible to unify three investment strategies: selection, timing, and capital allocation. The validity of this approach is verified in this paper by comparing it with several benchmarks.
Figure 1 illustrates the research framework. This study considers stocks listed on the Taiwan Stock Exchange as investment targets. Stock selection and capital allocation decisions are made based on the monthly rate of return of these stocks. For market timing, a correlation is identified between the input and output variables of the Ohlson model through the combination of a neural network with the Ohlson model to calculate the real value of stocks.
The real value of stocks can be used to determine whether the market value of the stock is overvalued or undervalued in the stock market. If the stock price is undervalued in the market, the proportion of funds obtained from genetic algorithms is used to buy. Conversely, if the market price is excessively high, the short selling method can be used to sell stocks and achieve a high rate of return on investment.
The pseudocode for the hybrid genetic algorithm proposed in this study is as follows:
Hybrid GA ( )
 {
 Randomly set the initial population (Applied Combination with Repetition Encoding)
 Calculate the fitness of the chromosomes
 While (Unchanged fitness for 3000 generations ends evolution)
 {
   Selection (Roulette wheel selection)
   Crossover (Adaptive crossover operation)
   Mutation (Adaptive mutation operation)
   Fitness evaluation of the chromosomes
    (LSTM-Ohlson fusion model (timing) + Evaluation Criteria)
   }
 }
The system initially generates a population of parent chromosomes based on the combination with a repetition encoding method. After generating these initial chromosomes, the system calculates the fitness value of each chromosome, representing its effectiveness in solving the problem at hand. Following this, the system enters the evolutionary process of the hybrid genetic algorithm. During the evolutionary process, selection operations are first performed based on the roulette wheel method. This method ensures that chromosomes with higher fitness values have a greater chance of being selected as parent chromosomes for the next generation. The selected chromosomes then undergo crossover operations using the adaptive crossover method proposed in this study, ensuring that the crossover process produces offspring chromosomes with enhanced advantages.
After crossover, the chromosomes undergo adaptive mutation operations according to a specified mutation rate. This step is intended to increase the diversity of the chromosomes and prevent the algorithm from becoming trapped in a local optimum. Subsequently, the system employs the LSTM–Ohlson fusion model to determine specific trading strategies. This model, which combines Long Short-Term Memory (LSTM) neural networks and the Ohlson model, aims to improve the timing accuracy of investment decisions. Upon completing these steps, the system evaluates each chromosome based on evaluation criteria and recalculates its fitness values. This process is repeated continuously, with chromosomes being optimized in each generation until the fitness values show no significant change for 3000 consecutive generations. At this point, the system concludes that the evolutionary process has converged and identifies the optimal investment strategy.
This process, by integrating genetic algorithms and deep learning models, achieves intelligent optimization of investment strategies. The initial population of parent chromosomes provides diverse solutions, while the selection operation using the roulette wheel method and the adaptive crossover and mutation mechanisms ensure that the offspring chromosomes progressively improve their fitness values. The application of the LSTM–Ohlson fusion model in determining trading strategies further enhances the model’s timing prediction accuracy and practical application effectiveness. Ultimately, through continuous iteration and optimization, the system is capable of automatically generating an optimal investment strategy, achieving the goal of intelligent investment decision-making.
The proposed method introduces an efficient combination with a repetition encoding scheme for chromosomes. In this scheme, the selection operation employs the roulette wheel method. To accommodate the combination with the repetition encoding scheme, special mating patterns are utilized for the crossover and mutation operations, as detailed in Section 3.1. The evaluation method for the fitness of chromosomes is also explained in Section 3.1.

3.1. Stock Selection and Capital Allocation

The investment targets of this study include eight categories of stocks and cash reserves. Chromosomes are evaluated using multiple criteria. Through the mechanisms of selection, crossover, and mutation, the genetic algorithm constantly evolves to solve optimization problems effectively, identifying the optimal capital allocation for the eight categories of stocks and cash reserves. This approach evaluates the return on the investment strategy, providing investors with a reference for decision-making that encompasses both stock selection and capital allocation.

3.1.1. Encoding and Decoding for Chromosome

Capital allocation is indeed a form of resource allocation problem. This study proposes a new encoding scheme for genetic algorithms to address the stock selection and capital allocation problems in resource optimization. In this study, the genetic algorithm used binary encoding with the concept of a homogeneous product, which randomly generated chromosomes by a combination of 0 and 1, as shown in Figure 2. The present study employs the concept of combinations with repetitions for encoding. In combinations with repetitions, from a set of n distinct items, any r items were selected as a group, where the number of each type of item was no less than r, and repetitions were allowed. This type of combination is referred to as “n choose r” with repetitions.
The capital allocation in stock investment can indeed be viewed as a problem of resource allocation optimization. The capital allocation in investment represents an optimization problem of resource allocation, akin to solving the equation X1 + X2 +…… + Xn = r for non-negative integer solutions. This refers to arranging n−1 1’s and r 0’s as permutations of multi-sets. “+” is represented by 1, and 0 represents the number of resources; the equation X1 + X2 + …… + Xn = r can be interpreted as a problem of distributing r units of capital among n different stocks, where Xi represents the amount of capital allocated to the i-th stock. This study proposes a new encoding scheme for genetic algorithms based on the concept of combination with repetition to solve the optimization problem of capital allocation. To ensure that the chromosomes retain their repetitive combination characteristics during the evolutionary processes of mating and mutation in genetic algorithms, which is crucial for solving the capital allocation challenges in stock investment. This study introduces specialized crossover and mutation operators. The explanation is further supported by practical examples, as illustrated in Figure 3 and Figure 4.
The utilization of the concept of combinations with repetitions, in conjunction with genetic algorithms, aims to optimize resource allocation problems. Chromosome encoding represents how much capital is allocated to investment targets. 0 represents the ratio of the funds invested in the investment target. 100% represents the total amount of investment. If there is m 0s, each 0 represents invest 100/m% proportion of funds. Moreover, 1 represents segmentation between investment targets. The number of 0 between two 1 in a chromosome represents the funds of corresponding investment target. For example, in eight categories of shares and cash reserves as investment targets, it must have eight 1 in a chromosome. If each 0 indicates that 10% of funds were invested, then there will be ten 0 in chromosomes.
Figure 2 shows that cash reserves, the first category stocks, the fourth category stocks, the fifth category stocks, and the seventh category stocks were invested into with 10% of funds; the sixth category stocks have 20% capital invested into them; and the second category stocks have 30% capital invested into them. No investments were made into the third and eighth category stocks.

3.1.2. Crossover and Mutation

During the evolutionary process, the chromosomes of the parent population undergo crossover and mutation operations. The combination with a repetition encoding scheme can reduce the search space for optimal solutions in genetic algorithms. Using conventional crossover and mutation operations would enlarge the search space for optimal solutions, thus reducing the efficiency of finding the best solution. Therefore, to enhance the efficiency of genetic algorithms, this study proposes a special crossover and mutation operation that complements the combination with a repetition encoding scheme. In order to ensure that chromosomes can still accurately represent the proportion of funds invested in various stocks after crossover and mutation operations, the number of 0s and 1s in the offspring chromosomes must be the same as those in their parent chromosomes.
The steps for performing crossover operations are as follows:
Step 1. Randomly select two parent chromosomes to prepare for the crossover operation.
Step 2. Randomly select two crossover points, as shown in Figure 3, and record the number and positions of 1s between the two crossover points. For example, the first parent chromosome has a total of three 1s, appearing at positions 0, 2, and 5, while the second parent chromosome has a total of two 1s, appearing at positions 1 and 4.
Step 3. Execute the crossover operation. The number of 1s in the offspring chromosomes must match that of the parent chromosomes. Thus, for the first offspring chromosome, randomly choose three positions from positions 0, 1, 2, 4, and 5, as illustrated in Figure 3. For instance, randomly select positions 0, 1, and 4. For the second offspring chromosome, select the remaining positions, such as positions 2 and 5. Generate new offspring chromosomes accordingly.
Step 4. Continue executing Steps 1 to 3 iteratively until all chromosomes in the parent population have undergone the crossover operation.
After completing the crossover operation, proceed with the mutation operation based on the mutation rate. Following the mutation operation, the count of 0s and 1s in the chromosomes must remain the same as before the mutation. The mutation operation involves randomly selecting one 1 and one 0 within a chromosome and swapping them to complete the mutation. For instance, randomly select the 1 at position 1 and the 0 at position 6 for swapping to accomplish the mutation, as illustrated in Figure 4.

3.1.3. Evaluation

For experimental analysis, this study designed three criteria as investment guidelines for investors, which serve as the evaluation function for the genetic algorithm, as shown in Table 1. De Souza et al. [65] explored the application of the Sharpe ratio in assessing global financial stability, emphasizing its effectiveness and ease of use in measuring risk-adjusted returns. This paper argued that the Sharpe ratio, by combining risk and return, offers a comprehensive, user-friendly, and meaningful tool for portfolio performance measurement. Hence, the first criterion adopts the Sharpe ratio.
According to Wong et al. [66], Taiwanese investors’ preference for electronic stocks is related to international market trends because a significant portion of Taiwan’s exports comprises electronic products. Investors have high confidence in electronic stocks, believing they can provide stable returns. Consequently, Taiwanese investors tend to favor purchasing electronic stocks. Therefore, the second criterion sets the capital allocation for investing in electronic industry stocks to be between 10% and 30%.
Moreover, based on Jahan-Parvar et al.’s [67] study on the impact of liquidity on investment returns and risk, it is emphasized that investors should maintain a certain level of liquidity in their funds. Hence, the third criterion assumes that investors would want to hold between 5% and 10% of their funds in cash reserves to mitigate risk.
Fitness value of chromosome =
  Criterion 1 (Sharpe ratio for eight industry category stocks) +
  Criterion 2 (capital ratio for electronic category stocks) +
  Criterion 3 (capital retention rate in hands)
Furthermore, in determining whether to buy or sell stocks, the LSTM–Ohlson fusion model must be invoked to make decisions and calculate the investment return of buying or selling the stock. Since each criterion is measured in different units, the values for each criterion must be normalized to ensure that scores fall between 5 and 100. The worst-performing criterion is assigned a score of 5 to give chromosomes a chance to survive to the next generation, while the best-performing criterion is assigned a score of 100 to increase the likelihood of chromosomes surviving to the next generation. The chromosome’s fitness value is used as a reference for selection operation execution. Evolution is carried out based on the principle of survival of the fittest to obtain the optimal solution.

3.2. Timing

In terms of market timing, this study diverges from previous research that used technical analysis to identify trading opportunities for investment targets. Instead, it employs fundamental analysis to uncover the true value of a company. The Ohlson model’s book value, earnings per share, and corporate governance variables of non-accounting information are used to determine the true value of all stocks. However, these variables and the true value of stocks have a nonlinear relationship, making it challenging to discern a pattern using statistical methods. To address this, the study utilizes the widely used LSTM neural network to emulate the Ohlson model. The variables of the Ohlson model serve as nodes in the input layer, and the actual true value of stocks acts as a node in the output layer, establishing the architecture of the artificial neural network.
If the value of shares derived from the Ohlson model is higher than the actual market price, it indicates that the market undervalues these stocks. This suggests that the stock price will rise, making it a good opportunity for investors to buy these shares. Conversely, if the value of shares obtained from the Ohlson model is lower than the market price, it signifies that the market overestimates the value of these shares. The stock price is likely to fall in the future, so investors should consider selling these shares. If investors do not currently hold these shares, they can engage in short selling, which involves borrowing stocks from an investment institution to sell.

4. Experimental Design and Analysis

4.1. Hybrid Genetic Algorithms

The chromosome of integrated genetic algorithms employs binary encoding, and its length is 58 bits. There are eight 1s to distinguish the eight categories of stocks and cash reserves. Invested funds are put into 50 equal parts, so there are 50 0s, and for each, 0 represents 2% of all funds. The population size is 100. When evolution has the same fitness value, 3000 continuous generations that stand achieve convergence status and stop evolution. Roulette selection mechanism and elite law adopted for evolution. The crossover rate is set to 1. And mutation rate is set at 0.01 according to a rule of thumb.

4.2. LSTM–Ohlson Fusion Model

This paper employs LSTM to simulate the Ohlson model and to learn the relationships between financial variables and the true values of the company. The neural network architecture, which integrates the Ohlson model, is depicted in Figure 5. LSTM is particularly suited for this task as it is designed to handle time series data, making it ideal for financial forecasting and understanding the temporal dynamics of stock prices.
The input layer of the neural network has ten nodes, which consist of two basic variables and eight corporate governance variables related to equity valuation, as shown in Figure 5. The output layer node represents the true value of stocks. Through training, testing, and validation, the neural network can learn the relationship between these relevant variables and the real value of stocks. When new input variable values are introduced to the neural network prediction model, it can predict the actual market value of the shares. This approach allows for a dynamic and adaptable model that can adjust to new information and provide accurate predictions.
In the LSTM neural network’s stock assessment, a sliding window mechanism is used to improve forecasting performance. Specifically, data from every three months is used to predict the data for the fourth month. The training architecture of the LSTM neural networks can span three years. The data for these experiments are sourced from the Taiwan Economic Journal (TEJ), covering the period from 2008 to the end of 2015.

4.3. The Simple Genetic Algorithms (The Comparative Method)

Simple genetic algorithms use a binary coding method. The capital reserves and eight categories of stocks are encoded by eight sections; each section has seven bits. The total chromosome length is 63 bits, as shown in Figure 6. The segment between the first bit and the seventh bit represents the proportion of capital reserved. Moreover, 68 represents the capital reserved being 68% of the total funds. The section between the eighth bit and the fourth bit represents the proportion of investing in the first class of shares. Moreover, 76 said that investors must employ 76% of the total funds to invest in the first class of shares, so the fourth is on behalf of the investment ratio of other stocks.
Figure 7 reveals the crossover of chromosomes. Two randomly selected crossover points, then switching the gene between the two crossover points and retained as offspring.
Chromosome mutation is shown in Figure 8. When a chromosome mutation must execute according to the mutation rate, one gene of the chromosome is randomly selected; the gene changes from 1 to 0 and vice versa. Evolutions achieve the mutation operator by this method.
The fitness function of simple genetic algorithms is using a penalty function. Because of such stocks, up to 100% of the total funds are invested. So, when such stocks are more than 100% invested into, chromosomes can be unreasonable chromosomes. The penalty function must be used. More than 100% would lead to punishment with many more points, the number of which determined based on the ratio exceeded.
The simple genetic algorithms’ convergence conditions were that when the continuous evolution of 3000 generations was achieved, the fitness remained at the same value, and then the evolution was stopped. The proportion of funds generated after the evolution of the various stocks through capital allocation to calculate the total rate of return on investment for each class of shares. SGA’s chromosome encoding length is 63 bits. Each 7 bits represents an investment target’s funds quota. So, there are nine investment targets, which are eight categories of shares and cash reserves. Each class of shares allocates 0 to 127 proportions of funds. Because such shares were invested into with up to 100% of the total funds, when each capital allocation of shares invested into was more than 100%, the penalty function was adopted, and more than 100% was the demerit.
In addition, the proportion of each class of stocks and capital reserves may be retained between 0% to 100%. The sum of the proportion of each class of shares and capital reserves must equal 100%. The evaluation method of evolution employs the penalty function. When the proportion of the total funds is more or less than 100%, the number of penalty points will be determined according to the proportion of exceeds. The assessment of evolution also uses other criteria. When the electronic stocks investment ratio is less than 10% or greater than 30%, and cash reserves in the hands of less than 5% or greater than 10%, then the mechanism will take the penalty function. The population size is 100. The selection mechanism for SGA uses the roulette method, employing elite law. The Crossover operator adopts two-point crossovers. The crossover rate is 1. Each chromosome’s mutation rate is set to 0.01.

4.4. Experimental Analysis

The experimental analyses in this study were conducted according to the proposed methodology and framework. Eight categories of stocks were targeted for investment. An artificial neural network, combined with the Ohlson model, was used to assess the actual value of these stocks. Each month served as a trading point to determine the appropriate timing for entry and exit and to settle the rate of return. The return on investment for the Taiwan top 50 Index (TWN50) was used as a benchmark. This was compared to the rate of return on the average capital invested in the targeted stocks and the proportion of capital allocation obtained through a simple genetic algorithm for these stocks. The data used for the experiment were sourced from the Taiwan Economic Journal (TEJ), covering the period from January 2008 to December 2015. To ensure higher accuracy, the experimental results were based on an average of ten experiments.
This study integrates the Ohlson stock assessment model and genetic algorithms to propose an investment strategy model. Experimental data from 2008 to 2015 are encoded based on quarter periods, resulting in thirty-two periods over eight years, as shown in Table 2. During these thirty-two periods, Taiwan’s stock market experienced five bull markets, five bear markets, and one market correction. Regardless of the market state, the method proposed in this study outperformed the market and the TWN50 91% of the time (29 out of 32 periods). During the bull market, this proposed method outperformed simple genetic algorithms, the average allocated capital strategy, TAIEX, and the TWN50 85% of the time (11 out of 13 periods). In the bear market, this proposed method defeated competitors 89% of the time (17 out of 19 periods). During the market correction, this proposed method outperformed all other benchmarks 90% of the time (9 out of 10 periods).
Figure 9 is divided into 11 sections, among which the method proposed in this study outperforms in 9 sections. Furthermore, in the 11 quarters, even when the TWN50, TAIEX, and average allocated capital strategy yield a negative rate of return, the proposed method still manages to achieve a 4.20% return on investment. With a total average rate of return of up to 6.00%, the proposed method exhibits the best performance. This confirms that the integration of genetic algorithms and the Ohlson value assessment model can significantly enhance the return on investment.
In 2010, the European debt crisis began to spread through the Eurozone, and Taiwan was also affected during this period. Table 3 presents the monthly returns obtained from various comparison methods from January 2010 to December 2010. According to the average rate of return from January 2010 to June 2010, the framework proposed in this study yielded a 9.51% rate of return. This performance is superior to the TWN50 market index returns, the return on average allocated capital, and the return produced by the simple genetic algorithm (SGA) evolution. The returns obtained from this study outperformed the TWN50’s average return in five out of six months. From July 2010 to December 2010, the average rate of return using this study’s framework also outperformed the TWN50 average return, although it was higher than the TWN50’s average return in only three out of six months. Nevertheless, the rate of return from other methods used in the experiments indicates that this study’s framework consistently yields better returns.
In September 2008, the bankruptcy of Lehman Brothers triggered a global financial crisis that severely impacted stock markets worldwide. The Taiwan stock market was not spared, suffering significant losses, with its value shrinking from 22.37 trillion to 12.65 trillion. The stock market index also fell below the 5000-point mark. Despite this challenging environment, the integrated genetic algorithm used in this study outperformed all benchmark methods in 2008. The architecture of this study achieved a 12.05% rate of return, surpassing all average rates of return from competing methods in the first half of the year. Although the integrated genetic algorithms experienced negative returns in July, September, and October, the method proposed in this paper still achieved a six-month average return rate in the second half of the year that was 4.91% higher than the simple genetic algorithm (SGA), 10.54% higher than TWN50, 10.33% higher than the market index returns, and 10.28% higher than the return on average allocated capital. The proposed method still managed to yield a 2.75% rate of return. A comparison of the rates of return for each method is shown in Table 4.
The experimental results show that regardless of whether the market index rises or falls, the integrated genetic algorithms proposed in this study are capable of generating higher excess returns or minimizing losses. Even when compared with the top 50 professional investment funds, the integrated genetic algorithm consistently outperforms the returns of the TWN50. In any investment environment, the proposed method yields positive results. Apart from the genetic algorithm’s ability to make sound stock investment decisions (both in terms of selection and capital allocation), the integration of LSTM neural networks and the Ohlson model can accurately identify the optimal trading points, thereby addressing the issue of market timing decisions. By properly integrating selection, timing, and capital allocation decisions, investors can truly achieve superior excess returns. This study demonstrates the potential of using advanced AI techniques, such as genetic algorithms and LSTM neural networks, in enhancing investment strategies and outcomes.

5. Conclusions

Based on the past literature, few studies have simultaneously integrated the three strategies of stock market investment—selection, timing, and capital allocation. Most market timing strategies differ from previous ones that used technical indicators to determine the point of sale. Instead, this paper uses the Ohlson model from fundamental analysis to ascertain the true value of stocks. By combining LSTM neural networks and the Ohlson model, this study learns the nonlinear relationship between variables and the true value of the stocks. The calculated true value of stocks is then compared with the stock market’s price to serve as the basis for buy or sell decisions. This approach offers a more comprehensive and potentially more effective strategy for stock market investment.
To enhance the speed and efficiency of processing stock data, this paper also introduces an efficient genetic algorithm encoding method based on the concept of optimizing resource allocation through combination with repetitions. The goal is to effectively address the optimization of stock selection and capital allocation in stock investment. The experimental findings underscore that the utilization of genetic algorithms with optimization characteristics can refine capital allocation effectively. Employing this capital allocation configuration for stock investment yields returns surpassing those attained through diversification across targeted stocks, average returns of targeted stocks, market index returns, and returns yielded by the simple genetic algorithm. In a six-month average return competition, the method proposed in this study surpasses the average return of TWN50. These results firmly establish that the method presented herein indeed offers investors a superior basis for making investment decisions, yielding higher returns.

Author Contributions

Conceptualization, Y.-H.C.; methodology, Y.-H.C.; software, Y.-H.C. and C.-W.H.; validation, Y.-H.C.; resources, C.-W.H.; data curation, Y.-H.C. and C.-W.H.; writing—original draft preparation, Y.-H.C.; writing—review and editing, Y.-H.C.; project administration, Y.-H.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

The study did not involve humans.

Data Availability Statement

The experimental data has been recorded in this research paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bao, W.; Yue, J.; Rao, Y.; Wang, Y. A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PLoS ONE 2017, 12, e0180944. [Google Scholar] [CrossRef] [PubMed]
  2. Bermúdez, J.D.; Segura, J.D.; Vercher, E. A multi-objective genetic algorithm for cardinality constrained fuzzy portfolio selection. Fuzzy Sets Syst. 2012, 188, 16–26. [Google Scholar] [CrossRef]
  3. Chang, Y.W.C.; Chen, Y.L. Mining associative classification rules with stock trading data—A GA-based method. Knowl.-Based Syst. 2010, 23, 605–614. [Google Scholar] [CrossRef]
  4. Chang, T.J.; Yang, S.C.; Chang, K.J. Portfolio optimization problems in different risk measures using genetic algorithm. Expert Syst. Appl. 2009, 36, 10529–10537. [Google Scholar] [CrossRef]
  5. Chen, G.; Chen, X. A Hybrid of Adaptive Genetic Algorithm and Pattern Search for Stock Index Optimized Replicate. In Proceedings of the Artificial Intelligence, Management Science and Electronic Commerce, Dengfeng, China, 8–10 August 2011; pp. 4912–4915. [Google Scholar]
  6. Dastkhan, H.; Gharneh, N.S.; Golmakani, H.R. A linguistic-based portfolio selection model using weighted max–min operator and hybrid genetic algorithm. Expert Syst. Appl. 2011, 38, 11735–11743. [Google Scholar] [CrossRef]
  7. Fu, T.C.; Chung, C.P.; Chung, F.L. Adopting genetic algorithms for technical analysis and portfolio management. Comput. Math. Appl. Arch. 2013, 66, 1743–1757. [Google Scholar] [CrossRef]
  8. Gorgulho, A.; Neves, R.; Horta, N. Applying a GA kernel on optimizing technical analysis rules for stock picking and portfolio composition. Expert Syst. Appl. 2011, 38, 14072–14085. [Google Scholar] [CrossRef]
  9. Kamali, S. Portfolio Optimization using Particle Swarm Optimization and Genetic Algorithm. J. Math. Comput. Sci. 2014, 10, 85–90. [Google Scholar] [CrossRef]
  10. Leu, Y.; Chiu, T.I. An Effective Stock Portfolio trading Strategy using Genetic Algorithms and Weighted Fuzzy Time Series. In Proceedings of the Nano, Information Technology and Reliability, Macao, China, 24–26 October 2011; pp. 70–75. [Google Scholar]
  11. Ng, H.S.; Lam, K.P.; Lam, S.S. Incremental Genetic Fuzzy Expert Trading System for Derivatives Market Timing. In Proceedings of the Computational Intelligence for Financial Engineering, Hong Kong, China, 20–23 March 2003; pp. 421–427. [Google Scholar]
  12. Orito, Y.; Yamazaki, G. Index Fund Portfolio Selection by Using GA. In Proceedings of the Fourth International Conference on Computational Intelligence and Multimedia Applications (ICCIMA), Yokusike, Japan, 30 October–1 November 2001; pp. 118–122. [Google Scholar]
  13. Papadamou, S.; Stephanides, G. Improving technical trading systems by using a new MATLAB-based genetic algorithm procedure. Math. Comput. Model. 2007, 46, 189–197. [Google Scholar] [CrossRef]
  14. Rafaely, B.; Bennell, J.A. Optimisation of FTSE100 tracker funds: Acomparison of genetic algorithms and quadratic programming. Manag. Financ. 2006, 32, 477–492. [Google Scholar]
  15. Chavarnakul, T.; Enke, D. Intelligent technical analysis based equivolume charting for stock trading using neural networks. Expert Syst. Appl. 2008, 34, 1004–1017. [Google Scholar] [CrossRef]
  16. Du, P.; Luo, X.; He, Z.; Xie, L. The Application of Genetic Algorithm-Radial Basis Function (GA-RBF) Neural Network in Stock Forecasting. In Proceedings of the Control and Decision Conference, Xuzhou, China, 26–28 May 2010; pp. 1745–1748. [Google Scholar]
  17. Kara, Y.; Boyacioglu, M.C.; Baykan, O.K. Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange. Expert Syst. Appl. 2011, 38, 5311–5319. [Google Scholar] [CrossRef]
  18. Lazo, J.G.; Vellasco, B.R.; Pacheco, A.C. A Hybrid Genetic-Neural System for Portfolio Selection and Management. In Proceedings of the Sixth International Conference on Engineering Applications of Neural Networks, Kingston Upon Thames, UK, 17–19 July 2000. [Google Scholar]
  19. Liu, Q.; Dang, C.; Huang, T. A One-Layer Recurrent Neural Network for Real-Time Portfolio Optimization with Probability Criterion. IEEE Trans. Cybern. 2013, 43, 14–23. [Google Scholar] [PubMed]
  20. Nazemi, A.; Abbasi, B.; Omidi, F. Solving portfolio selection models with uncertain returns using an artificial neural network scheme. Appl. Intell. 2015, 42, 609–621. [Google Scholar] [CrossRef]
  21. Varnami, M.S.; Chashmi, S.A.N.; Memarian, E. The Selection and Optimization of Stock Portfolio by Means Of Monte Carlo’S Simulation Method And Artificial Neural Network (Ann). Indian J. Fundam. Appl. Life Sci. 2014, 4, 147–156. [Google Scholar]
  22. Allen, F. Using genetic algorithms to find trading rules. J. Financ. Econ. 1999, 51, 245–272. [Google Scholar] [CrossRef]
  23. Badawy, F.A.; Abdelazim, H.Y.; Darwish, M.G. Genetic Algorithms for Predicting the Egyptian Stock Market. In Proceedings of the International Conference on Information and Communications Technology, Cairo, Egypt, 5–6 December 2005; pp. 109–122. [Google Scholar]
  24. Chang, Y.H.; Lee, M.S. Incorporating Markov decision process on genetic algorithms to formulate trading strategies for stock markets. Appl. Soft Comput. 2017, 52, 1143–1153. [Google Scholar] [CrossRef]
  25. Huang, C.F. A hybrid stock selection model using genetic algorithms and support vector regression. Appl. Soft Comput. 2012, 12, 807–818. [Google Scholar] [CrossRef]
  26. Jiang, R.; Szeto, K.Y. Discovering investment strategies in portfolio management: A genetic algorithm approach. In Proceedings of the 9th International Conference on Neural Information Processing, Singapore, 18–22 November 2002; pp. 1206–1210. [Google Scholar]
  27. Korczak, J.; Roger, P. Stock timing using genetic algorithm. Appl. Stoch. Models Bus. Ind. 2002, 18, 121–134. [Google Scholar] [CrossRef]
  28. Fu, K.; Xu, W. Training Neural Network with Genetic Algorithms for Forecasting the Stock Price Index. In Proceedings of the International Conference on Intelligent Processing Systems, Beijing, China, 28–31 October 1997; pp. 401–403. [Google Scholar]
  29. Khan, A.U.; Bandopadhyaya, T.K.; Sharma, S. Genetic Algorithm Based Backpropagation Neural Network Performs better than Backpropagation Neural Network in Stock Rates Prediction. Int. J. Comput. Sci. Netw. Secur. 2008, 8, 162–166. [Google Scholar]
  30. Sahin, U.; Ozbayoglu, A.M. TN-RSI: Trend-normalized RSI indicator for stock trading systems with evolutionary computation. Procedia Comput. Sci. 2014, 36, 240–245. [Google Scholar] [CrossRef]
  31. Shen, W.; Xing, M. Stock Index Forecast with Back Propagation Neural Network Optimized by Genetic Algorithm. In Proceedings of the Second International Conference on Information and Computing Science, Manchester, UK, 21–22 May 2009; pp. 376–379. [Google Scholar]
  32. Versace, M.; Bhatt, R.; Hinds, O.; Shiffer, M. Predicting the exchange traded fund DIA with a combination of genetic algorithms and neural networks. Expert Syst. Appl. 2004, 27, 417–425. [Google Scholar] [CrossRef]
  33. Jang, G.S.; Lai, F.; Parng, T.M. Intelligent Stock Trading Decision Support System Using Dual Adaptive-Structure Neural Networks. J. Inf. Sci. Eng. 1993, 9, 271–297. [Google Scholar]
  34. Kim, H.J.; Shin, K.S. A hybrid approach based on neural networks and genetic algorithms for detecting temporal patterns in stock markets. Appl. Soft Comput. 2007, 7, 569–576. [Google Scholar] [CrossRef]
  35. Yang, Y.; Liu, G.; Zhang, Z. Stock market trend prediction based on neural networks, multiresolution analysis and dynamical reconstruction. In Proceedings of the IEEE/IAFE/INFORMS Conference on Computational Intelligence for Financial Engineering, New York, NY, USA, 26–28 March 2000; pp. 155–156. [Google Scholar]
  36. Mahmoodi, A.; Hashemi, L.; Jasemi, M. Develop an integrated candlestick technical analysis model using meta-heuristic algorithms. EuroMed J. Bus. 2023, 19, 32–68. [Google Scholar] [CrossRef]
  37. Solares, E.; De-León-Gómez, V.; Salas, F.G.; Díaz, R. A comprehensive decision support system for stock investment decisions. Expert Syst. Appl. 2022, 210, 118485. [Google Scholar] [CrossRef]
  38. Cheng, C.H.; Chen, T.L.; Wei, L.Y. A hybrid model based on rough sets theory and genetic algorithms for stock price forecasting. Inf. Sci. 2010, 180, 1610–1629. [Google Scholar] [CrossRef]
  39. Chiu, D.Y.; Chian, S.Y. Exploring stock market dynamism in multi-nations with genetic algorithm, support vector regression, and optimal technical analysis. In Proceedings of the Sixth International Conference on Networked Computing and Advanced Information Management, Seoul, Republic of Korea, 16–18 August 2010; pp. 694–699. [Google Scholar]
  40. Qi, C.; Tang, J.C. Foreign direct investment: A genetic algorithm approach. Socio-Econ. Plan. Sci. 2006, 40, 143–155. [Google Scholar] [CrossRef]
  41. Oh, K.J.; Kim, T.Y.; Min, S.H.; Lee, H.Y. Portfolio algorithm based on portfolio beta using genetic algorithm. Expert Syst. Appl. 2006, 30, 52–534. [Google Scholar] [CrossRef]
  42. Gold, S.; Lebowitz, P. Computerized Stock Screening Rules for Portfolio Selection. Financ. Serv. Rev. 1999, 8, 61–70. [Google Scholar] [CrossRef]
  43. Ozcalici, M.; Bumin, M. Optimizing filter rule parameters with genetic algorithm and stock selection with artificial neural networks for an improved trading: The case of Borsa Istanbul. Expert Syst. Appl. 2022, 208, 118120. [Google Scholar] [CrossRef]
  44. Yodmun, S.; Witayakiattilerd, W. Stock Selection into Portfolio by Fuzzy Quantitative Analysis and Fuzzy Multicriteria Decision Making. Adv. Oper. Res. 2016, 2016, 9530425. [Google Scholar] [CrossRef]
  45. Yun, K.K.; Yoon, S.W.; Won, D. Interpretable stock price forecasting model using genetic algorithm-machine learning regressions and best feature subset selection. Expert Syst. Appl. 2023, 213 Pt A, 118803. [Google Scholar] [CrossRef]
  46. Adebiyi, S.O.; Ogunbiyi, O.O.; Amole, B.B. Artificial intelligence model for building investment portfolio optimization mix using historical stock prices data. Rajagiri Manag. J. 2021, 16, 36–62. [Google Scholar] [CrossRef]
  47. Chen, Y.; Mabub, S.; Hirasawa, K. Genetic relation algorithm with guided mutation for the large-scale portfolio optimization. Expert Syst. Appl. 2011, 38, 3353–3363. [Google Scholar] [CrossRef]
  48. Kocak, H. Canonical Coalition Game Theory for Optimal Portfolio Selection. Asian Econ. Financ. Rev. 2014, 4, 1254–1259. [Google Scholar]
  49. Shoaf, J.; Foster, J.A. The Efficient Set GA for Stock Portfolio. In Proceedings of the 1998 IEEE International Conference on Evolutionary Computation (ICEC98), Anchorage, AK, USA, 4–9 May 1998; pp. 354–359. [Google Scholar]
  50. Soleimani, H.; Golmakani, H.R.; Salimi, M.H. Markowitz-based portfolio selection with minimum transaction lots, cardinality constraints and regarding sector capitalization using genetic algorithm. Expert Syst. Appl. 2009, 36, 5058–5063. [Google Scholar] [CrossRef]
  51. Akita, R.; Yoshihara, A.; Matsubara, T.; Uehara, K. Deep learning for stock prediction using numerical and textual information. In Proceedings of the 2016 IEEE/ACIS 15th International Conference on Computer and Information Science (ICIS), Okayama, Japan, 26–29 June 2016. [Google Scholar]
  52. Chen, S.; Zhou, C. Stock prediction based on genetic algorithm feature selection and long short-term memory neural network. IEEE Access 2020, 9, 9066–9072. [Google Scholar] [CrossRef]
  53. Chung, H.; Shin, K.S. Genetic algorithm-optimized long short-term memory network for stock market prediction. Sustainability 2018, 10, 3765. [Google Scholar] [CrossRef]
  54. Ding, X.; Zhang, Y.; Liu, T.; Duan, J. Deep learning for event-driven stock prediction. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, Buenos Aires, Argentina, 25–31 July 2015. [Google Scholar]
  55. Fischer, T.; Krauss, C. Deep learning with long short-term memory networks for financial market predictions. Eur. J. Oper. Res. 2018, 270, 654–669. [Google Scholar] [CrossRef]
  56. Krauss, C.; Do, X.A.; Huck, N. Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500. Eur. J. Oper. Res. 2017, 259, 689–702. [Google Scholar]
  57. Nelson, D.M.; Pereira, A.C.; De Oliveira, R.A. Stock market’s price movement prediction with LSTM neural networks. In Proceedings of the 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA, 14–19 May 2017; pp. 1419–1426. [Google Scholar]
  58. Selvin, S.; Vinayakumar, R.; Gopalakrishnan, E.A.; Menon, V.K.; Soman, K.P. Stock price prediction using LSTM, RNN and CNN-sliding window model. In Proceedings of the 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Udupi, India, 13–16 September 2017; pp. 1643–1647. [Google Scholar]
  59. Siami-Namini, S.; Tavakoli, N.; Namin, A.S. A comparison of ARIMA and LSTM in forecasting time series. In Proceedings of the 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA, 17–20 December 2018; pp. 1394–1401. [Google Scholar]
  60. Akshat, G.; Varsha, A.; Tai Chui, K.; Brij, B.G.; Choi, C.; Lee, O.J. Long Short-Term Memory Network (LSTM) based Stock Price Prediction. In Proceedings of the 2023 International Conference on Research in Adaptive and Convergent Systems, Gdansk, Poland, 6–10 August 2023; pp. 1–6. [Google Scholar]
  61. White, G.I.; Sondhi, A.C.; Fried, D. The Analysis and Use of Financial Statement, 3rd ed.; John Wiley & Sons Inc.: Hoboken, NJ, USA, 2003. [Google Scholar]
  62. Chang, Y.H.; Wang, S.C. Integration of Evolutionary Computing and Equity Valuation Models to Forecast Stock Values Based on Data Mining. Asia Pac. Manag. Rev. 2013, 18, 63–78. [Google Scholar]
  63. Kuo, C.Y. Is the accuracy of stock value forecasting relevant to industry factors or firm-specific factors? An empirical study of the Ohlson model. Rev. Quant. Financ. Account. 2017, 49, 195–225. [Google Scholar] [CrossRef]
  64. Lee, S.C.; Lin, C.T.; Chang, P.T. An Ohlson valuation framework for valuing corporate governance: The case of Taiwan. Pac.-Basin Financ. J. 2011, 19, 420–434. [Google Scholar] [CrossRef]
  65. De Souza, C.M.; Zeidan, R. Sharpe ratio and financial stability: A global perspective. J. Bank. Financ. 2021, 124, 106032. [Google Scholar]
  66. Wong, W.K.; Lean, H.H.; McAleer, M.; Tsai, F.T. Why Are Warrant Markets Sustained in Taiwan but Not in China? Sustainability 2018, 10, 3748. [Google Scholar] [CrossRef]
  67. Jahan-Parvar, M.R.; Pinheiro, M.S. Liquidity and risk-adjusted returns: Evidence from the corporate bond market. J. Financ. Econ. 2021, 141, 438–458. [Google Scholar]
Figure 1. Research framework.
Figure 1. Research framework.
Ai 05 00050 g001
Figure 2. Chromosome encoding.
Figure 2. Chromosome encoding.
Ai 05 00050 g002
Figure 3. Chromosome crossover.
Figure 3. Chromosome crossover.
Ai 05 00050 g003
Figure 4. Chromosome mutation.
Figure 4. Chromosome mutation.
Ai 05 00050 g004
Figure 5. LSTM neural network architecture to predict stock price chart.
Figure 5. LSTM neural network architecture to predict stock price chart.
Ai 05 00050 g005
Figure 6. The chromosome coding for simple genetic algorithm.
Figure 6. The chromosome coding for simple genetic algorithm.
Ai 05 00050 g006
Figure 7. The crossover for SGA’s chromosome.
Figure 7. The crossover for SGA’s chromosome.
Ai 05 00050 g007
Figure 8. Chromosome mutations for SGA.
Figure 8. Chromosome mutations for SGA.
Ai 05 00050 g008
Figure 9. Average rate of return for 2008~2015.
Figure 9. Average rate of return for 2008~2015.
Ai 05 00050 g009
Table 1. Three criteria.
Table 1. Three criteria.
NumberCriteria
1Sharpe ratio for eight category stocks
2The investment capital of Electronic category stocks is between 10% and 30%.
3Investors hold 5% to 10% of funds in hand.
Table 2. Experiment results for January 2008–December 2015.
Table 2. Experiment results for January 2008–December 2015.
2015 2014
Average Return1st Quarter2nd Quarter3rd Quarter4th Quarter1st Quarter2nd Quarter3rd Quarter4th Quarter
TWN501.07−0.08−4.390.371.042.86−1.021.80
TAIEX1.00−0.89−4.210.680.932.03−1.501.25
Return on average allocated capital0.93−0.69−3.36−0.34−0.350.51−1.070.26
SGA1.622.50−2.761.252.574.241.541.48
Hybrid GA4.234.761.184.657.015.931.515.97
2013 2012
TWN500.670.71−0.341.893.59−2.992.060.48
TAIEX0.940.620.471.774.00−2.731.900.08
Return on average allocated capital1.090.791.381.753.34−2.182.920.28
SGA0.613.301.634.575.98−0.413.313.67
Hybrid GA0.588.113.9710.2310.36−0.437.576.73
2011 2010
TWN50−0.67−0.58−5.270.06−1.34−2.814.033.43
TAIEX−1.02−0.07−5.74−0.52−0.95−2.474.062.93
Return on average allocated capital−1.491.29−5.83−0.62−0.80−2.125.613.30
SGA1.761.00−0.572.292.884.953.942.15
Hybrid GA1.693.251.984.0310.358.673.896.43
2009 2008
TWN503.956.955.582.44−0.09−2.95−7.73−7.84
TAIEX4.717.785.503.010.72−4.01−8.39−6.78
Return on average allocated capital4.2511.704.432.375.87−6.10−12.46−2.60
SGA2.8810.523.213.176.337.86−4.01−1.59
Hybrid GA11.9113.827.366.6912.8311.260.135.62
TAIEX = Market index returns (TAIEX), SGA = simple genetic algorithm (SGA). Hybrid GA = Hybrid genetic algorithm.
Table 3. Experiment results for 2010.
Table 3. Experiment results for 2010.
January 2010–December 2010
ReturnJanuaryFebruaryMarchAprilMayJuneAverage
TWN50−5.78−3.004.771.49−8.22−1.69−2.07
TAIEX−6.69−2.676.511.06−7.87−0.61−1.71
Return on average allocated capital−7.30−1.456.35−0.004−7.551.21−1.46
SGA2.665.770.22−0.7312.123.463.92
Integrated GA12.7314.673.652.6916.836.489.51
ReturnJulyAugustSeptemberOctoberNovemberDecemberAverage
TWN506.10−1.987.960.801.318.183.73
TAIEX5.88−1.868.160.601.037.173.50
Return on average allocated capital7.281.288.272.420.816.674.46
SGA4.062.725.032.953.320.193.05
Integrated GA5.121.934.626.957.544.815.16
Table 4. Experiment results for 2008.
Table 4. Experiment results for 2008.
January 2008–December 2008
ReturnJanFebMarAprMayJunAverage
TWN50−10.649.780.584.54−2.89−10.50−1.52
TAIEX−11.5811.861.904.05−3.37−12.71−1.64
Return on average allocated capital−3.7617.204.160.57−2.94−15.95−0.12
SGA−1.5616.324.224.253.0916.247.09
Integrated GA5.3623.569.578.915.5219.3512.05
ReturnJulyAugustSeptemberOctoberNovemberDecemberAverage
TWN50−8.831.40−15.77−16.40−10.233.10−7.79
TAIEX−6.640.31−18.83−14.84−8.422.93−7.58
Return on average allocated capital−6.01−7.45−23.91−12.643.401.43−7.53
SGA−10.105.43−7.36−11.397.92−1.30−2.80
Integrated GA−5.9911.17−5.57−2.0113.185.692.75
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chang, Y.-H.; Huang, C.-W. Utilizing Genetic Algorithms in Conjunction with ANN-Based Stock Valuation Models to Enhance the Optimization of Stock Investment Decisions. AI 2024, 5, 1011-1029. https://doi.org/10.3390/ai5030050

AMA Style

Chang Y-H, Huang C-W. Utilizing Genetic Algorithms in Conjunction with ANN-Based Stock Valuation Models to Enhance the Optimization of Stock Investment Decisions. AI. 2024; 5(3):1011-1029. https://doi.org/10.3390/ai5030050

Chicago/Turabian Style

Chang, Ying-Hua, and Chen-Wei Huang. 2024. "Utilizing Genetic Algorithms in Conjunction with ANN-Based Stock Valuation Models to Enhance the Optimization of Stock Investment Decisions" AI 5, no. 3: 1011-1029. https://doi.org/10.3390/ai5030050

Article Metrics

Back to TopTop