Forecasting a Stock Trend Using Genetic Algorithm: History
Please note this is an old version of this entry, which may differ significantly from the current revision.

The performance of the model significantly outperforms the dummy forecast. In some cases, the accuracy of the model was up to 80%. The results also showed that S&P 500 (the US stock market) is the most useful stock index in the prediction on all sectors. This could be because the 15 considered stocks have been selected from NYSE and NASDAQ. In contrast, CAC40 (French stock index) seems to have the lowest impact on two out of the three sectors. Moreover, past historical data of the stock itself helps significantly in predicting its trend. However, the results also show that the accuracy of the model decreases considerably while trying to predict large price changes.

  • computational or mathematical finance
  • stock trend prediction
  • random forest

1. Introduction

Stock market movements are influenced by many exogenous variables, such as political and geopolitical events, exchange rates, movements of other stock markets, the economic environment, firm policies, and the psychology of investors (Gidofalvi 2001Nobel Prize Committee 2013El-Chaarani 2016El-Chaarani 2019).
For efficient market theory (Fama 1965Fama 1970Fama 1998), all relevant information must be reflected in efficient stock markets. In the weak-form market efficiency, prices of stocks reflect all information of past prices. In semi-strong market efficiency form, prices of stocks reflect all of the available public information. 
Dynamic markets with nonlinear stock price movements, along with the multiplicity of predictors makes forecasting a stock’s trend challenging. In fact, an efficient forecasting solution in the stock market can play a crucial role in motivating people toward stock trading (Sharma et al. 2017).
Artificial Neural Networks (ANN) and the Support Vector Machine (SVM) are the most commonly used machine learning algorithms for forecasting stocks (Guresen et al. 2011Hoseinzade 2019Kara et al. 2011Wang and Wang 2015). Many Artificial Neural Networks tend to predict the next day’s closing price (Li and Liao 2017). Certain Artificial Neural Networks-based models have been enriched with other algorithms to boost the accuracy of the forecast (Nair et al. 2011). Likewise, Support Vector Machine models have been developed to forecast stock trends (Reddy and Sai 2018). Some proposals combined the Support Vector Machine, or Artificial Neural Networks with preprocessing techniques, following meta-heuristics algorithms to find the optimal machine learning parameters, the Artificial Neural Networks architecture, and a set of input features (Asadi et al. 2012Sedighi et al. 2019Zhang and Wu 2009). Recently, deep learning techniques such as Convolutional Neural Network (CNN), Deep Multilayer Perceptron (MLP), Deep Belief Network (DBN), Recurrent neural network (RNN), Long Short-Term Memory (LSTM), and Generative Adversarial Network (GAN) have proved to be applicable to stock studies (Aloud 2020Sang and DiPierro 2019Selvin et al. 2017Zhanga et al. 2019). The features selection is a key factor for the knowledge discovery process. Its importance is derived from its role in improving the accuracy and efficiency of the prediction model by selecting the relevant variables and reducing the dimensionality of the datasets (Mao et al. 2016Sugunnasil and Somhom 2010). Yet, features selection models suffer from the drawback of using isolated features to forecast trends. There is a gap in the literature for stock trend models that not only use features selection, but include international stock indices to forecast trends, as such models capture the essence of worldwide market movements, rather than isolated features.

2. History and Development

Artificial Neural Network prediction models have been proposed in many research works, such as Chandan et al. (2016). However, the noisy behavior of stock markets constructs an obstacle for the Artificial Neural Networks, leading to convergence to suboptimal solutions (Hoseinzade 2019). To solve this problem, Kara et al. (2011) suggested that a Support Vendor Machine preprocessing model can help in eliminating irrelevant features. With respect to predicting stock trends, Reddy and Sai (2018) proposed a Support Vendor Machine and Radial Basis Function approach to forecast stock prices in large as well as in small capitalizations. Their predictor is trained based on the available historical data to predict the next day’s data. While the obtained numerical results showed high efficiency of the algorithm, its drawback is that the solution assumes four fixed features without any specific engineering or optimization. The experimentation relies on online data without addressing its quality.
Hoseinzade (2019) suggested a model, called CNNpred, that can be applied to a collection of data from different sources, from different markets. The approach uses feature extraction to predict the next day’s trend of movement for specific indices, including the S&P 500, NASDAQ, DJI, NYSE, and the RUSSELL 3000. Similarly, Chen (2018) used a conv1D function to process 1D data in the convolutional layer. To improve the results, the proposed model used preprocessed stock data as input. The work goal was to forecast stock prices in the Chinese stock market. The proposed model was limited to four features as open, close, high, and low prices. The chief limitation was that the validation relied on a limited dataset.
Karathanasopoulos et al. (2019) proposed several optimization techniques to find the optimal Neural Network hierarchy to forecast 12 Exchange Traded Funds (ETFs). They considered three optimization approaches, namely genetic algorithm, differential evolution, and the particle swarm optimizer. They also considered three multilayer perceptron, recurrent neural networks, and radial basis function neural networks. Their results showed that differential evolution was the optimal method, with the highest forecasting accuracy.
The study most analogous to this is the one by Jiao and Jakubowicz (2017). This study predicted the daily direction of stock price movement. The authors considered predicting stock movement as a binary classification problem. They studied 463 stocks, constituents of the S&P 500, and 8 international indices. International indices included three Asian indices (Nikkei 225, Hang Seng, and All Ords), two European indices (DAX, FTSE 100), and three US indices (NYSE Composite, Dow Jones Industrial Average, and S&P500). Thus, when the daily return was positive (greater than zero), the mean price direction was uptrend. When the daily return was negative (less than zero), the mean price direction was downtrend. After that, they used a lag operator to extract more features from stock indices, in addition to more than 200 technical indicators, as input features into a classifier. Then, they employed genetic algorithm-based feature selection, to use the selected features as input into a classifier. The authors used four classification algorithms to compare their prediction performance. The classification algorithms used included Random Forest, Gradient Boosted Trees, Artificial Neural Networks, and logistic regression. 
Sable et al. (2017) provided a short-term prediction model, using the Genetic Algorithm, and evolutionary strategies, predicting the price of eight scripts, with six attributes for each script (Opening Price, Closing Price, Highest Price, Lowest Price, Volume, and Adjusted Closing Price). The eight scripts reflect US-based companies. 
Shen and Shafiq (2020) proposed a prediction model for the stock market price trend. The proposal relies on a customization of feature engineering and deep learning. The pillars of the proposal are various techniques of feature engineering with a fine-tuned system, instead of just a deep learning model. The work assessment relies on only the Chinese stock market. 
Wanjawa and Muchemi (2014) proved that the configuration model 5:21:21:1 can achieve very good prediction accuracy. The assessment was done on 1000 records trained on 130 K cycles. The training percentage was 80%. Using Artificial Neural Networks (ANN) to predict three stocks on the New York Stock Exchange (NYSE), with Encog and Neuroph for validation, the prediction was achieved with error range [0.71%–2.77%].
Soni et al. (2022), Rouf et al. (2021), Rahul et al. (2020), and Tawarish and Satyanarayana (2019) provide interesting surveys on the ML techniques used for stock market prediction. Almost all of these surveys show that a large percentage of proposals use Support Vector Machine (SVM), fewer use Genetic Algorithm, and fewer use the Random Forest. 

This entry is adapted from the peer-reviewed paper 10.3390/jrfm15050188

References

  1. Gidofalvi, Gyozo. 2001. Using News Articles to Predict Stock. Working Paper. San Diego: Department of Computer Science and Engineering, University of California.
  2. Nobel Prize Committee. 2013. Understanding asset prices. In Nobel Prize in Economics Documents. Stockholm: Economic Sciences Prize Committee of the Royal Swedish Academy of Sciences.
  3. El-Chaarani, Hani. 2016. Exploring the Impact of Emotional Intelligence on Portfolio Performance. Humanomics 32: 1–28.
  4. El-Chaarani, Hani. 2019. The Impact of Oil Prices on Stocks Markets: New Evidence During and After the Arab Spring in Gulf Cooperation Council Economies. International Journal of Energy Economics and Policy 9: 1–26.
  5. Fama, Eugene F. 1965. The Behavior of Stock-Market Prices. Journal of Business 38: 34–105.
  6. Fama, Eugene F. 1970. Efficient capital markets: A review of theory and empirical work. Journal of Finance 25: 383–417.
  7. Fama, Eugene F. 1998. Market efficiency, long-term returns, and behavioral finance. Journal of Financial Economics 49: 283–306.
  8. Sharma, Ashish, Dinesh Bhuriya, and Upendra Singh. 2017. Survey of stock market prediction using machine learning approach. Paper presented at the International conference of Electronics, Communication and Aerospace Technology (ICECA), Coimbatore, India, April 20–22; Volume 2021, p. 1.
  9. Guresen, Erkam, Gulgun Kayakutlu, and Tugrul U. Daim. 2011. Using artificial neural network models in stock market index prediction. Expert Systems With Applications 38: 10389–97.
  10. Hoseinzade, Ehsan. 2019. CNNpred: CNN-based stock market prediction using a diverse set of variables. Expert Systems With Applications 129: 273–85.
  11. Kara, Yakup, Melek A. Boyacioglu, and Omer K. Baykan. 2011. Predicting direction of stock price index movement using artificial neural networks and support vendor machines: The sample of the Istanbul Stock Exchange. Expert Systems With Applications 38: 5311–19.
  12. Wang, Jie, and Jun Wang. 2015. Forecasting stock market indexes using Principal Component Analysis and stochastic time effective neural networks. Neurocomputing 156: 68–78.
  13. Li, Wei, and Jian Liao. 2017. A comparative study on trend forecasting approach for stock price time series. Paper presented at the 11th IEEE International Conference on Anti-Counterfeiting, Security, and Identification (ASID), Xiamen, China, October 27–29.
  14. Nair, Binoy, S. Ghana Sai, A. N. Naveen, A. Lakshmi, G. S. Venkatesh, and V. P. Mohandas. 2011. A GA artificial neural network hybrid system for financial time series forecasting. Information Technology and Mobile Communication 147: 499–506.
  15. Reddy, Vankuru, and Kranthi Sai. 2018. Stock market prediction using machine learning. International Research Journal of Engineering and Technology (IRJET) 5: 1033–35.
  16. Asadi, Shahrokh, Esmaeil Hadavandi, Farhad Mehmanpazir, and Mohammad Nakhostin. 2012. Hybridization of evolutionary Levenberg-Marquardt neural networks and data pre-processing for stock market prediction. Knowledge-Based Systems 35: 245–58.
  17. Sedighi, Mojtaba, Hossein Jahangirnia, Mohsen Gharakhani, and Saeed F. Fard. 2019. A novel hybrid model for stock price forecasting based on metaheuristics and Support Vendor Machine. Data, Special Issue on Data Analysis for Financial Markets 4: 1–20.
  18. Zhang, Yudong, and Lenon Wu. 2009. Stock market prediction of S P 500 via combination of improved BCO approach and BP neural network. Expert Systems With Applications 36: 8849–54.
  19. Aloud, Monira E. 2020. Role of attribute selection in a deep ANNs learning framework for high frequency financial trading. Intelligent Systems in Accounting Finance and Management 27: 43–54.
  20. Sang, Chengjie, and Massimo DiPierro. 2019. Improving trading technical analysis with TensorFlow long short-term memory (CSTM) neural network. The Journal of Finance and Data Science 5: 1–11.
  21. Selvin, Sreelekshmy, R. Vinayakumar, E. A. Gopalakrishnan, Vijay Krishna Menon, and K. P. Soman. 2017. Stock price prediction using LSTM, RNN, and CNN-sliding window model. In Paper presented at the 2017 Proceedings of the International Conference on Advances in Computing, Communications, and Informatics (ICACCI), Udupi, India, September 13–16; pp. 1643–47.
  22. Zhanga, Kang, Guoquiang Zhonga, Junyun Donga, Shengke Wanga, and Yong Wanga. 2019. Stock market prediction based on Generative Adversarial Network. Procedia Computer Science 147: 400–6.
  23. Mao, Yanan, Zuoquan Zhang, and Dingyuan Fan. 2016. Hybrid feature selection based on improved Genetic Algorithm. Paper presented at the 2016 6th International Conference on Digital Home (ICDH), Guangzhou, China, December 2–4.
  24. Sugunnasil, Prompong, and Samerkae Somhom. 2010. Feature selection for neural network based stock prediction. Paper presented at the International Conference on Advances in Information Technology, Bangkok, Thailand, November 4–5.
  25. Chandan, Kumar, Sumathi Mahadevan, and S. N. Sivanandam. 2016. Prediction of stock market price using hybrid if wavelet transform and artificial neural network. Indian Journal of Science and Technology 9: 1–5.
  26. Chen, Sheng. 2018. Stock prediction using convolutional neural network. Paper presented at the IOP conference series on Materials Science and Engineering, Suzhou, China, June 22–24.
  27. Karathanasopoulos, Andreas, Mitra Sovan, Chia C. Lo, Adam Zaremba, and Mohammed Osman. 2019. Ensemble models in forecasting financial markets. Journal of Computational Finance 23: 101–19.
  28. Jiao, Yang, and Jeremie Jakubowicz. 2017. Predicting stock movement direction with machine learning: An extensive study on S&&P 500 stocks. Paper presented at the IEEE International Conference on Big Data (BIGDATA), Boston, MA, USA, December 11–14.
  29. Sable, Sonal, Ankita Porwal, and Upendra Singh. 2017. Stock price prediction using genetic algorithms and evolution strategies. Paper presented at the International conference of Electronics, Communication and Aerospace Technology (ICECA) Proceedings, Coimbatore, India, April 20–22; pp. 240–53.
  30. Shen, Jingyi, and M. Omair Shafiq. 2020. Short-term stock market price trend prediction using a comprehensive deep learning system. Journal of Big Data 7: 1–33.
  31. Wanjawa, Barack Wamkaya, and Lawrence Muchemi. 2014. ANN model to predict stock prices at stock exchange markets. arXiv arXiv:1502.06434. Available online: https://arxiv.org/ftp/arxiv/papers/1502/1502.06434.pdf (accessed on 10 January 2022).
  32. Soni, Payal, Yogya Tewari, and Deepa Krishnan. 2022. Machine Learning approaches in stock price prediction: A systematic review. In Journal of Physics: Conference Series. Bristol: IOP Publishing, p. 2161012065.
  33. Rouf, Nusrat, Majid Bashir Malik, Tasleem Arif, Sparsh Sharma, Saurabh Singh, Satyabrata Aich, and Hee-Cheof Kim. 2021. Stock market prediction using Machine Learning techniques: A decade survey on methodologies, Recent developments, and future directions. Electronics 10: 2717.
  34. Rahul, Subrat Sarangi, Priyansh Kedia, and Monika. 2020. Analysis of various approaches for stock market prediction. Journal of Statistics and Management Systems 23: 285–93.
  35. Tawarish, M., and K. Satyanarayana. 2019. A review on pricing prediction on stock market by different techniques in the field of data mining and genetic algorithm. International Journal of Advanced Trends in Computer Science and Engineering 8: 23–26.
More
This entry is offline, you can click here to edit this entry!
Video Production Service