Abstract
This study aims to evaluate the efficiency of using technical indicators such as closing price, lowest price, highest price, and exponential moving average in the prediction of stock prices. We use a genetic algorithm (GA) and a hybrid of grey wolf optimization and particle swarm optimization binary algorithm (GWO-PSO) as feature selection methods. In addition, we train our neural network by using some metaheuristic algorithms such as harmony search algorithm (HS), particle swarm optimization algorithm (PSO), modified particle swarm optimization algorithm (MPSO), modified particle swarm optimization algorithm with time-varying acceleration coefficients (MPSO-TVAC), moth flame optimization (MFO), wolf optimization algorithm (WOA) and chimp optimization algorithm (ChOA). The experimental results show that using metaheuristic algorithms to fortify neural networks may increase their ability in finding optimal solutions. We also compare the results of our proposed algorithms with the results of the autoregressive integrated moving average (ARIMA) model. To compare the performance of the proposed algorithms and select the best one, we introduce eight estimation criteria for error assessment. Moreover, market efficiency is another important factor that is checked in this paper to avoid abnormal returns. Briefly speaking, it is the first time that ChOA and MFO algorithms have been used for the prediction of stock prices and to improve ANN. In addition, we use two algorithms (i.e., GA and GWO-PSO) for improving the feature selection process. Finally, experimental results show that WOA has the best performance among applied algorithms.
Similar content being viewed by others
References
Bouattour, M., Martinez, I.: Efficient market hypothesis: an experimental study with uncertainty and asymmetric information. Finance Contrôle Stratég. 22(4), 22–24 (2019)
Sánchez-Granero, M.A., Balladares, K.A., Ramos-Requena, J.P., Trinidad-Segovia, J.E.: Testing the efficient market hypothesis in Latin American stock markets. Phys. A 540, 123082 (2020)
Hiransha, M., Gopalakrishnan, E.A., Menon, V.K., Soman, K.P.: NSE stock market prediction using deep-learning models. Proc. Compu.t Sci. 132, 1351–1362 (2018)
Drożdż, S., Kwapień, J., Oświęcimka, P.: Complexity in economic and social systems. Entropy 23(2), 133 (2021)
Sohangir, S., Wang, D., Pomeranets, A., Khoshgoftaar, T.M.: Big Data: Deep Learning for financial sentiment analysis. J. Big Data 5(1), 1–25 (2018)
Jóhannsson, Ó.S.: Forecasting the Icelandic stock market using a neural network (Doctoral dissertation) (2020)
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. 259(2), 689–702 (2017)
Weng, B., Martinez, W., Tsai, Y.T., Li, C., Lu, L., Barth, J.R., Megahed, F.M.: Macroeconomic indicators alone can predict the monthly closing price of major US indices: Insights from artificial intelligence, time-series analysis and hybrid models. Appl. Soft Comput. 71, 685–697 (2018)
Siami-Namini, S., Namin, A.S.: Forecasting economics and financial time series: ARIMA vs. LSTM. arXiv preprint arXiv:1803.06386 (2018)
Bahmani-Oskooee, M., Hasanzade, M., Bahmani, S.: Stock returns and income inequality: asymmetric evidence from state level data in the US. Glob. Financ. J. 52, 100715 (2022)
Farahani, M.S.: Prediction of interest rate using artificial neural network and novel meta-heuristic algorithms. Iran. J. Account. Audit. Finance (IJAAF) 5(1), 1–30 (2021)
Bahmani-Oskooee, M., Hasanzade, M.: Asymmetric link between US tariff policy and income distribution: evidence from state level data. Open Econ. Rev. 31(4), 821–857 (2020)
Peykani, P., Nouri, M., Eshghi, F., Khamechian, M., Farrokhi-Asl, H.: A novel mathematical approach for fuzzy multi-period multi-objective portfolio optimization problem under uncertain environment and practical constraints. J. Fuzzy Ext. Appl. 2(3), 191–203 (2021)
Fama, E.F.: Market Efficiency, Long-Term Returns, and Behavioral Finance, pp. 174–200. University of Chicago Press (2021)
Shah, D., Isah, H., Zulkernine, F.: Stock market analysis: a review and taxonomy of prediction techniques. Int. J. Financ. Stud. 7(2), 26 (2019)
Kaya, A., Kaya, G., Çebi, F.: Forecasting automobile sales in Turkey with artificial neural networks. Int. J. Bus. Anal. (IJBAN) 6(4), 50–60 (2019)
Charef, F., Ayachi, F.: Non-linear causality between exchange rates, inflation, interest rate differential and terms of trade in Tunisia. Afr. J. Econ. Manag. Stud. (2018)
Göçken, M., Özçalıcı, M., Boru, A., Dosdoğru, A.T.: Integrating metaheuristics and artificial neural networks for improved stock price prediction. Expert Syst. Appl. 44, 320–331 (2016)
Qiu, M., Song, Y., Akagi, F.: Application of artificial neural network for the prediction of stock market returns: The case of the Japanese stock market. Chaos Solitons Fractals 85, 1–7 (2016)
Hassanin, M.F., Shoeb, A.M., Hassanien, A.E.: Grey wolf optimizer-based back-propagation neural network algorithm. In: Paper presented at the 2016 12th International Computer Engineering Conference (ICENCO), pp. 213–218 (2016)
Faris, H., Aljarah, I., Mirjalili, S.: Training feedforward neural networks using multi-verse optimizer for binary classification problems. Appl. Intell. 45(2), 322–332 (2016)
Rather, A.M., Sastry, V., Agarwal, A.: Stock market prediction and Portfolio selection models: a survey. Opsearch 54(3), 558–579 (2017)
Chong, E., Han, C., Park, F.C.: Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst. Appl. 83, 187–205 (2017)
Sezer, O.B., Ozbayoglu, M., Dogdu, E.: A Deep neural-network based stock trading system based on evolutionary optimized technical analysis parameters. Proc. Comput. Sci. 114, 473–480 (2017)
Di Persio, L., Honchar, O.: Recurrent neural networks approach to the financial forecast of Google assets. Int. J. Math. Comput. Simul., 11, 7–13 (2017)
Ahmed, M.K., Wajiga, G.M., Blamah, N.V., Modi, B.: Stock market forecasting using ant colony optimization based algorithm. Am. J. Math. Comput. Modell. 4(3), 52–57 (2019)
Ghanbari, M., & Arian, H.: Forecasting stock market with support vector regression and butterfly optimization algorithm. arXiv preprint arXiv:1905.11462. (2019)
Kumar, G., Jain, S., Singh, U.P.: Stock market forecasting using computational intelligence: a survey. Arch. Comput. Methods Eng. 28(3), 1–33 (2020)
Farahani, M.S., Hajiagha, S.H.R.: Forecasting stock price using integrated artificial neural network and metaheuristic algorithms compared to time series models. Soft Comput., pp. 1–31 (2021)
Pierdzioch, C., Risse, M.: A machine-learning analysis of the rationality of aggregate stock market forecasts. Int. J. Financ. Econ. 23(4), 642–654 (2018)
Zhong, X., Enke, D.: Predicting the daily return direction of the stock market using hybrid machine learning algorithms. Financ. Innov. 5(1), 1–20 (2019)
Altan, A., Karasu, S., Bekiros, S.: Digital currency forecasting with chaotic meta-heuristic bio-inspired signal processing techniques. Chaos Solitons Fractals 126, 325–336 (2019)
Jiang, M., Jia, L., Chen, Z., Chen, W.: The two-stage machine learning ensemble models for stock price prediction by combining mode decomposition, extreme learning machine and improved harmony search algorithm. Ann. Oper. Res. 309, 1–33 (2020)
Behravan, I., Razavi, S.M.: Stock price prediction using machine learning and swarm intelligence. J. Electric. Comput. Eng. Innov. (JECEI) 8(1), 31–40 (2020)
Chandar, S.K.: Grey Wolf optimization-Elman neural network model for stock price prediction. Soft. Comput. 25(1), 649–658 (2021)
Chen, W., Jiang, M., Zhang, W.G., Chen, Z.: A novel graph convolutional feature based convolutional neural network for stock trend prediction. Inf. Sci. 556, 67–94 (2021)
Kumar, C.S.: Hybrid models for intraday stock price forecasting based on artificial neural networks and metaheuristic algorithms. Pattern Recognit. Lett. 147, 124–133 (2021)
Ghasemiyeh, R., Moghdani, R., Sana, S.S.: A hybrid artificial neural network with metaheuristic algorithms for predicting stock price. Cybern. Syst. 48(4), 365–392 (2017)
Bilski, J., Kowalczyk, B., Marchlewska, A., Zurada, J.M.: Local Levenberg-Marquardt algorithm for learning feedforwad neural networks. J. Artif. Intell. Soft Comput. Res., 10, 299–316 (2020)
Al-Tashi, Q., Kadir, S.J.A., Rais, H.M., Mirjalili, S., Alhussian, H.: Binary optimization using hybrid grey wolf optimization for feature selection. IEEE Access 7, 39496–39508 (2019)
Davallou, M., Azizi, N.: The Investigation of Information Risk Pricing; Evidence from Adjusted Probability of Informed Trading Measure. Financ. Res. J. 19(3), 415–438 (2017)
Kaveh, A.: Particle swarm optimization. In: Advances in Metaheuristic Algorithms for Optimal Design of Structures, pp. 11–43. Springer, Cham (2017)
Ouyang, H.B., Gao, L.Q., Li, S., Kong, X.Y., Wang, Q., Zou, D.X.: Improved harmony search algorithm: LHS. Appl. Soft Comput. 53, 133–167 (2017)
Wang, C., Song, W.: A modified particle swarm optimization algorithm based on velocity updating mechanism. Ain Shams Eng. J. 10(4), 847–866 (2019)
He, J., Guo, H.: A modified particle swarm optimization algorithm. TELKOMNIKA Indones. J. Electric. Eng. 11(10), 6209–6215 (2013). (e-ISSN: 2087-278X)
Abdullah, M.N., Bakar, A.H.A., Rahim, N.A., Mokhlis, H., Illias, H.A., Jamian, J.J.: Modified particle swarm optimization with time varying acceleration coefficients for economic load dispatch with generator constraints. J. Electric. Eng. Technol. 9(1), 15–26 (2014)
Mirjalili, S.: Moth-flame optimization algorithm: A novel nature-inspired heuristic paradigm. Knowl.-Based Syst. 89, 228–249 (2015)
Mirjalili, S., Lewis, A.: The whale optimization algorithm. Adv. Eng. Softw. 95, 51–67 (2016)
Khishe, M., & Mosavi, M. R. (2020). Chimp optimization algorithm. Expert Syst. Appl., p. 113338.
Wadi, S.A.L., Almasarweh, M., Alsaraireh, A.A., Aqaba, J.: Predicting closed price time series data using ARIMA Model. Mod. Appl. Sci., 12(11), 181–185 (2018)
Pervez, M., Rashid, M., Ur, H., Chowdhury, M., Iqbal, A., Rahaman, M.: Predicting the Stock market efficiency in weak form: a study on Dhaka Stock Exchange (2018)
Hawaldar, I.T., Rohith, B., Pinto, P.: Testing of weak form of efficient market hypothesis: evidence from the Bahrain Bourse. Invest. Manag. Financ. Innov. 14(2–2), 376–385 (2017)
Sedighi, M., Jahangirnia, H., Gharakhani, M., Farahani Fard, S.: A novel hybrid model for stock price forecasting based on metaheuristics and support vector machine. Data 4(2), 75 (2019)
Safa, M., Panahian, H.: Ranking P/E predictor factors in Tehran stock exchange with using the harmony search meta heuristic algorithm. pp. 67–82 (2019)
Emamverdi, G., Karimi, M.S., Khakie, S., Karimi, M.: Forecastinh The Total Index of Tehran Stock Exchange. Financ. Stud. 20(1) (2016)
Funding
This research paper is not supported by any organization. Any organization or employment will not gain or loss financially through publication of this manuscript. The authors declare they have no financial interests.
Author information
Authors and Affiliations
Contributions
This paper is handled and done by Milad Shahvaroughi Farahani. In this paper, Hamed Farrokhi-asl who is added as an author to the paper helped us in improving the paper and doing revisions.
Corresponding author
Ethics declarations
Conflict of interest/Competing interests
The authors have no conflicts of interest to declare that are relevant to the content of this article.
Ethics approval
Not applicable.
Consent to participate
Not applicable.
Consent for publication
Not applicable.
Availability of data and material
The data were obtained through two sites which are called TSETMC and CODAL sites, respectively Which are at the following address: http://tsetmc.ir/, https://www.codal.ir/. On the other hand, there is a financial data software which is called TSECLIENT 2.0 and you can download data easily according to symbol, date, different variables and etc.
Code availability
All of the necessary pseudo-codes are mentioned in the manuscript.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Shahvaroughi Farahani, M., Farrokhi-Asl, H. Improved market prediction using meta-heuristic algorithms and time series model and testing market efficiency. Iran J Comput Sci 6, 29–61 (2023). https://doi.org/10.1007/s42044-022-00120-x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s42044-022-00120-x