Document Type : Research Paper


1 Department of Finance, Khatam University, Tehran, Iran.

2 Sheldon B. Lubar College of Business, University of Wisconsin-Milwaukee, Milwaukee, WI, USA.


Investigating stock price trends and determining future stock prices have become focal points for researchers within the finance sector. However, predicting stock price trends is a complex task due to the multitude of influencing factors. Consequently, there has been a growing interest in developing more precise and heuristic models and methods for stock price prediction in recent years. This study aims to assess the effectiveness of technical indicators for stock price prediction, including closing price, lowest price, highest price, and the exponential moving average method. To thoroughly analyze the relationship between these technical indicators and stock prices over predefined time intervals, we employ an Artificial Neural Network (ANN). This ANN is optimized using a combination of Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Harmony Search (HS) algorithms as meta-heuristic techniques for enhancing stock price prediction. The GA is employed for selecting the most suitable optimization indicators. In addition to indicator selection, PSO and HS are utilized to fine-tune the Neural Network (NN), minimizing network errors and optimizing weights and the number of hidden layers simultaneously. We employ eight estimation criteria for error assessment to evaluate the proposed model's performance and select the best model based on error criteria. An innovative aspect of this research involves testing market efficiency and identifying the most significant companies in Iran as the statistical population. The experimental results clearly indicate that a hybrid ANN-HS algorithm outperforms other algorithms regarding stock price prediction accuracy. Finally, we conduct run tests, a non-parametric test, to evaluate the Efficient Market Hypothesis (EMH) in its weak form.


Main Subjects

[1]     Mehwish, N., & Yasir, B. T. (2015). The efficient market hypothesis: a critical review of the literature. The IUP journal of financial risk management, 12(4), 48–63.
[2]     Guerrien, B., & Gun, O. (2011). Efficient market hypothesis : what are we talking about ? Analysis, (56), 19–30.
[3]     Bhowmik, P. (2019). Research study on basic understanding of artificial neural networks. Global journal of computer science and technology, 19(4), 5–7.
[4]     Krauss, C., Do, X. A., & Huck, N. (2017). Deep neural networks, gradient-boosted trees, random forests: statistical arbitrage on the S&P 500. European journal of operational research, 259(2), 689–702.
[5]     Caginalp, G., & Desantis, M. (2011). Nonlinearity in the dynamics of financial markets. Nonlinear analysis: real world applications, 12(2), 1140–1151. DOI:10.1016/j.nonrwa.2010.09.008
[6]     Khashei, M., & Bijari, M. (2011). A novel hybridization of artificial neural networks and ARIMA models for time series forecasting. Applied soft computing journal, 11(2), 2664–2675.
[7]     De Oliveira, F. A., Nobre, C. N., & Zárate, L. E. (2013). Applying artificial neural networks to prediction of stock price and improvement of the directional prediction index - case study of PETR4, Petrobras, Brazil. Expert systems with applications, 40(18), 7596–7606. DOI:10.1016/j.eswa.2013.06.071
[8]     Abolfazli, N., Eshghali, M., & Fatemi Ghomi, S. M. T. F. (2022). Pricing and coordination strategy for green supply chain under two production modes. IEEE 2022 systems and information engineering design symposium, sieds 2022 (pp. 13–18). IEEE. DOI: 10.1109/SIEDS55548.2022.9799373
[9]     Zhang, J., Cui, S., Xu, Y., Li, Q., & Li, T. (2018). A novel data-driven stock price trend prediction system. Expert systems with applications, 97, 60–69. DOI:10.1016/j.eswa.2017.12.026
[10]   Jóhannsson, Ó. S. (2020). Forecasting the icelandic stock market using a neural network (Master Thesis, Reykjavík).
[11]   Hadavandi, E., Ghanbari, A., & Abbasian-Naghneh, S. (2010). Developing an evolutionary neural network model for stock index forecasting. dvanced intelligent computing theories and applications. ICIC 2010. communications in computer and information science. (Vol. 93 CCIS, pp. 407–415). Springer, Berlin, Heidelberg. DOI: 10.1007/978-3-642-14831-6_54
[12]   Hull, J. C. (2012). Risk management and financial institutions, + Web Site(Vol. 733). John Wiley & Sons.
[13]   Prasanna, S. (2013). An analysis on stock market prediction using data mining techniques. International journal of computer science & engineering technology (IJCSET), 4(02), 49–51.
[14]   Fama, E. F. (1998). Market efficiency, long-term returns, and behavioral finance. Journal of financial economics, 49(3), 283–306.
[15]   Gimba, V. K. (2012). Testing the weak-form efficiency market hypothesis: evidence from nigerian stock market. CBN journal of applied statistics, 3(1), 117–136.
[16]   Fama, E. F. (1965). The behavior of stock-market prices. The journal of business, 38(1), 34–105.
[17]   Dixit, A., Mishra, A., & Shukla, A. (2019). Vehicle routing problem with time windows using meta-heuristic algorithms: A survey. In Advances in intelligent systems and computing (Vol. 741, pp. 539–546). Springer. DOI: 10.1007/978-981-13-0761-4_52
[18]   Dramsch, J. S. (2020). 70 Years of Machine learning in geoscience in review. Advances in geophysics, 61, 1–55. DOI:10.1016/bs.agph.2020.08.002
[19]   Sindayigaya, L., & Dey, A. (2022). Machine learning algorithms: a review. International journal of science and research (IJSR), 11(8), 1127-1133.
[20]   Iuhasz, G., Tirea, M., & Negru, V. (2012). Neural network predictions of stock price fluctuations. Proceedings - 14th international symposium on symbolic and numeric algorithms for scientific computing, synasc 2012 (pp. 505–512). IEEE. DOI: 10.1109/SYNASC.2012.7
[21]   Huang, W., Lai, K. K., Nakamori, Y., Wang, S., & Yu, L. (2007). Neural networks in finance and economics forecasting. International journal of information technology & decision making, 6(01), 113–140.
[22]   Göçken, M., Özçalici, M., Boru, A., & Dosdoʇru, A. T. (2016). Integrating metaheuristics and artificial neural networks for improved stock price prediction. Expert systems with applications, 44, 320–331.
[23]   Hassanin, M. F., Shoeb, A. M., & Hassanien, A. E. (2016). Grey wolf optimizer-based back-propagation neural network algorithm. 2016 12th international computer engineering conference (ICENCO) (pp. 213–218). IEEE.
[24]   Faris, H., Aljarah, I., & Mirjalili, S. (2016). Training feedforward neural networks using multi-verse optimizer for binary classification problems. Applied intelligence, 45(2), 322–332. DOI:10.1007/s10489-016-0767-1
[25]   Rather, A. M., Sastry, V. N., & Agarwal, A. (2017). Stock market prediction and Portfolio selection models: a survey. Opsearch, 54(3), 558–579. DOI:10.1007/s12597-016-0289-y
[26]   Yang, B., Gong, Z. J., & Yang, W. (2017). Stock market index prediction using deep neural network ensemble. 2017 36th chinese control conference (CCC) (pp. 3882–3887). IEEE. DOI: 10.23919/ChiCC.2017.8027964
[27]   Galar, M., Fernandez, A., Barrenechea, E., Bustince, H., & Herrera, F. (2012). A review on ensembles for the class imbalance problem: bagging, boosting, and hybrid-based approaches. IEEE transactions on systems, man and cybernetics part C: applications and reviews, 42(4), 463–484. DOI:10.1109/TSMCC.2011.2161285
[28]   Kabir Ahmed, M., Maksha Wajiga, G., Vachaku Blamah, N., & Modi, B. (2019). Stock market forecasting using ant colony optimization based algorithm. American journal of mathematical and computer modelling, 4(3), 52. DOI:10.11648/j.ajmcm.20190403.11
[29]   Ghanbari, M., & Arian, H. (2019). Forecasting stock market with support vector regression and butterfly optimization algorithm.
[30]   Chandana, P. H. (2019). A survey on soft computing techniques and applications. International research journal of engineering and technology (IRJET) 6(4), 1258–1266.
[31]   Rajesh, P., Srinivas, N., Vamshikrishna Reddy, K., Vamsipriya, G., Vakula Dwija, M., & Himaja, D. (2019). Stock trend prediction using ensemble learning techniques in python. International journal of innovative technology and exploring engineering, 8(5), 150–154.
[32]   Lv, D., Yuan, S., Li, M., & Xiang, Y. (2019). An empirical study of machine learning algorithms for stock daily trading strategy. Mathematical problems in engineering, 2019. DOI:10.1155/2019/7816154
[33]   Zaman, S. (2019). Weak form market efficiency test of Bangladesh stock exchange: an empirical evidence from dhaka stock exchange and chittagong stock exchange. Journal of economics, business and accountancy ventura, 21(3), 285. DOI:10.14414/jebav.v21i3.1615
[34]   Shahvaroughi Farahani, M., & Razavi Hajiagha, S. H. (2021). Forecasting stock price using integrated artificial neural network and metaheuristic algorithms compared to time series models. Soft computing, 25(13), 8483–8513. DOI:10.1007/s00500-021-05775-5
[35]   Ranjbarzadeh, R., Caputo, A., Tirkolaee, E. B., Jafarzadeh Ghoushchi, S., & Bendechache, M. (2023). Brain tumor segmentation of MRI images: a comprehensive review on the application of artificial intelligence tools. Computers in biology and medicine, 152, 106405. DOI:10.1016/j.compbiomed.2022.106405
[36]   Farahani, M. S., Esfahani, A., & Alipoor, F. (2022). The application of machine learning in the corona era, with an emphasis on economic concepts and sustainable development goals. International journal of mathematical, engineering, biological and applied computing, 1(2), 95–149. DOI:10.31586/ijmebac.2022.519
[37]   Tirkolaee, E. B., Mardani, A., Dashtian, Z., Soltani, M., & Weber, G. W. (2020). A novel hybrid method using fuzzy decision making and multi-objective programming for sustainable-reliable supplier selection in two-echelon supply chain design. Journal of cleaner production, 250, 119517. DOI:10.1016/j.jclepro.2019.119517
[38]   Abiodun, O. I., Jantan, A., Omolara, A. E., Dada, K. V., Mohamed, N. A. E., & Arshad, H. (2018). State-of-the-art in artificial neural network applications: a survey. Heliyon, 4(11). DOI:10.1016/j.heliyon.2018.e00938
[39]   Tkáč, M., & Verner, R. (2016). Artificial neural networks in business: two decades of research. Applied soft computing journal, 38, 788–804. DOI:10.1016/j.asoc.2015.09.040
[40]   Pierdzioch, C., & Risse, M. (2018). A machine-learning analysis of the rationality of aggregate stock market forecasts. International journal of finance and economics, 23(4), 642–654. DOI:10.1002/ijfe.1641
[41]   Zhong, X., & Enke, D. (2019). Predicting the daily return direction of the stock market using hybrid machine learning algorithms. Financial innovation, 5(1), 1–20. DOI:10.1186/s40854-019-0138-0
[42]   Altan, A., Karasu, S., & Bekiros, S. (2019). Digital currency forecasting with chaotic meta-heuristic bio-inspired signal processing techniques. Chaos, solitons and fractals, 126, 325–336. DOI:10.1016/j.chaos.2019.07.011
[43]   Jiang, M., Jia, L., Chen, Z., & Chen, W. (2022). The two-stage machine learning ensemble models for stock price prediction by combining mode decomposition, extreme learning machine and improved harmony search algorithm. Annals of operations research, 309(2), 553–585. DOI:10.1007/s10479-020-03690-w
[44]   Behravan, I., & Razavi, S. M. (2020). Stock price prediction using machine learning and swarm intelligence. Journal of electrical and computer engineering innovations (JECEI), 8(1), 31–40.
[45]   Kumar Chandar, S. (2021). Grey Wolf optimization-elman neural network model for stock price prediction. Soft computing, 25(1), 649–658. DOI:10.1007/s00500-020-05174-2
[46]   Wei, L. Y., & Cheng, C. H. (2012). A hybrid recurrent neural networks model based on synthesis features to forecast the Taiwan stock market. International journal of innovative computing, information and control, 8(8), 5559–5571.
[47]   Chandar, S. Kumar. (2021). Hybrid models for intraday stock price forecasting based on artificial neural networks and metaheuristic algorithms. Pattern recognition letters, 147, 124–133. DOI:10.1016/j.patrec.2021.03.030
[48]   Accounting, M., Farahani, M. S., Nejad, M., Moghaddam, F., & Ramezani, A. (2023). Forecasting Tehran price index ( TEPIX ) using novel meta-heuristic algorithms keywords. International journal of finance & managerial accounting, 8(28), 185–216.
[49]   Monfared, J. H., Alinejad, M. A., & Metghalchi, S. (2012). A comparative study of neural network models with box Jenkins methodologies in prediction of Tehran price index (TEPIX). Financial engineering and securities management (portfolio management), 3(11), 1-16.
[50]   Ahmed, J., Jafri, M. N., Ahmad, J., & Khan, M. I. (2007). Design and implementation of a neural network for real-time object tracking. International journal of computer and information engineering, 1(6), 1816–1819.
[51]   Haider, A., & Hanif, M. N. (2009). Inflation forecasting in pakistan using artificial neural networks. Pakistan economic and social review, 47(2), 123–138.
[52]   Chopra, S., Yadav, D., & Chopra, A. N. (2019). Artificial neural networks based indian stock market price prediction : before and after demonetization. International journal of swarm intelligence and evolutionary computation, 8(1), 1–7.
[53]   Ravichandran, K. S., Thirunavukarasu, P., Nallaswamy, R., & Babu, R. (2005). Estimation of return on investment in. Journal of theoretical and applied information technology, 3, 44–54.
[54]   Hawaldar, I. T., Rohit, B., & Pinto, P. (2017). Testing of weak form of efficient market hypothesis: evidence from the Bahrain bourse. Investment management and financial innovations, 14(2), 376–385. DOI:10.21511/imfi.14(2-2).2017.09
[55]   Ghasemiyeh, R., Moghdani, R., & Sana, S. S. (2017). A hybrid artificial neural network with metaheuristic algorithms for predicting stock price. Cybernetics and systems, 48(4), 365–392. DOI:10.1080/01969722.2017.1285162
[56]   Davallou, M., & Azizi, N. (2017). The investigation of information risk pricing; evidence from adjusted probability of informed trading measure. Financial research journal, 19(3), 415–438.
[57]   Eberhart, R., & Kennedy, J. (1995). New optimizer using particle swarm theory. IEEE Proceedings of the international symposium on micro machine and human science (pp. 39–43). IEEE. DOI: 10.1109/mhs.1995.494215
[58]   Yang, X. S. (2020). Nature-inspired optimization algorithms: challenges and open problems. Journal of computational science, 46, 101104.
[59]   Al Masud, M. A., Paul, S. K., & Azeem, A. (2014). Optimisation of a production inventory model with reliability considerations. International journal of logistics systems and management, 17(1), 22–45.
[60]   Ye, F. (2017). Particle swarm optimization-based automatic parameter selection for deep neural networks and its applications in large-scale and high-dimensional data. PLoS one, 12(12), 1-36.
[61]   Geem, Z. W., Kim, J. H., & Loganathan, G. V. (2001). A new heuristic optimization algorithm: harmony search. Simulation, 76(2), 60–68. DOI:10.1177/003754970107600201
[62]   Kang, J., Kwon, S., Ryu, D., & Baik, J. (2021). HASPO: harmony search-based parameter optimization for just-in-time software defect prediction in maritime software. Applied sciences, 11(5), 2002. DOI:10.3390/app11052002
[63]   Leković, M. (2018). Evidence for and against the validity of efficient market hypothesis. Economic themes, 56(3), 369–387. DOI:10.2478/ethemes-2018-0022
[64]   Pervez, M., Harun Ur Rashid, M., Asad Iqbal Chowdhury, M., & Rahaman, M. (2018). International journal of economics and financial issues predicting the stock market efficiency in weak form: a study on dhaka stock exchange. International journal of economics and financial issues, 8(5), 88–95.
[65]   Ghasemiyeh, R., Moghdani, R., & Sana, S. S. (2017). A hybrid artificial neural network with metaheuristic algorithms for predicting stock price. Cybernetics and systems, 48(4), 365–392.
[66]   Sedighi, M., Jahangirnia, H., Gharakhani, M., & Fard, S. F. (2019). A novel hybrid model for stock price forecasting based on metaheuristics and support vector machine. Data, 4(2), 75.
[67]   Safa, M., & Panahian, H. (2019). Ranking P/E predictor factors in Tehran stock exchange with using the harmony search meta heuristic algorithm. Journal of investment knowledge, 8(29), 67–82.
[68]   Emamverdi, G., Karimi, M. S., Khakie, S., & Karimi, M. (2016). Forecasting the total index of tehran stock exchange. Financial studies, 20(1), 55–68.
[69]   Zheng, T., Fataliyev, K., & Wang, L. (2013). Wavelet neural networks for stock trading [presentation]. Independent component analyses, compressive sampling, wavelets, neural net, biosystems, and nanoengineering xi (Vol. 8750, pp. 83–92).
[70]   Dong, Guanqun., Kamaladdin, F., & Wang, L. (2013). One-step and multi-step ahead stock prediction using backpropagation neural networks. ICICS 2013 - conference guide of the 9th international conference on information, communications and signal processing (pp. 1–5). IEEE. DOI: 10.1109/ICICS.2013.6782784
[71]   Wang, L., Chan, F. F., Wang, Y., & Chang, Q. (2016). Predicting public housing prices using delayed neural networks (pp. 3589–3592). IEEE.
[72]   Sin, E., & Wang, L. (2017). Bitcoin price prediction using ensembles of neural networks. 2017 13th international conference on natural computation, fuzzy systems and knowledge discovery (ICNC-FSKD) (pp. 666–671). IEEE.