Predicting stock prices in the Pakistan market using machine learning and technical indicators

Hassan Raza (1) Zafar Akhtar (2)
(1) SZABIST University, Pakistan
(2) SZABIST University, Pakistan

Abstract

This study uses advanced machine learning models to predict stock prices in the Pakistani stock market using 27 technical indicators. It evaluates the predictive capabilities of four techniques, SVM, LSTM, and Random Forest for binary classification of stock price movements. ANN and SVM show the highest accuracy at 85%, followed by Random Forest at 84% and LSTM at 78%. Key indicators such as %R, Momentum, and Disparity 5 are critical across all models. The research provides valuable insights for investors and analysts to improve decision-making. It underscores the importance of technical indicators and establishes a data-driven approach to navigating the complexities of the Pakistani stock market. The study further emphasizes the importance of technical indicators and suggests exploring hybrid models that incorporate real-time data, sentiment analysis, and external factors for better stock price prediction.

Full text article

Generated from XML file

References

Abramson, N., Braverman, D., & Sebestyen, G. (1963). Pattern recognition and machine learning. IEEE Transactions on Information Theory, 9(4), 257-261. https://doi.org/10.1109/tit.1963.1057854

Adebiyi, A., Adediran, A., & Ayo, C. (2014). Stock price prediction using the arima model. https://doi.org/10.1109/uksim.2014.67

Ampomah, E., Qin, Z., & Nyame, G. (2020). Evaluation of tree-based ensemble machine learning models in predicting stock price direction of movement. Information, 11(6), 332. https://doi.org/10.3390/info11060332

Bengio, Y., Courville, A., & Vincent, P. (2013). Representation learning: a review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8), 1798-1828. https://doi.org/10.1109/tpami.2013.50

Borovkova, S. and Tsiamas, I. (2019). An ensemble of lstm neural networks for high‐frequency stock market classification. Journal of Forecasting, 38(6), 600-619. https://doi.org/10.1002/for.2585

Choi, J., Yoo, S., Zhou, X., & Kim, Y. (2023). Hybrid information mixing module for stock movement prediction. IEEE Access, 11, 28781-28790. https://doi.org/10.1109/access.2023.3258695

Chong, E., Han, C., & Park, F. (2017). Deep Learning Networks for Stock Market Analysis and Prediction. Expert Systems with Applications, 83(April), 187–205. http://ac.els-cdn.com/S0957417417302750/1-s2.0-S0957417417302750-main.pdf?_tid=0d300a54-78da-11e7-ab02-00000aacb35f&acdnat=1501826538_c99481212aa82d83961ec6ff566751a4

Christodoulou, E., Ma, J., Collins, G., Steyerberg, E., Verbakel, J., & Calster, B. (2019). A systematic review shows no performance benefit of machine learning over logistic regression for clinical prediction models. Journal of Clinical Epidemiology, 110, 12-22. https://doi.org/10.1016/j.jclinepi.2019.02.004

Dai, S. and Li, N. (2012). Using svm to predict stock price changes from online financial news. Applied Mechanics and Materials, 157-158, 1586-1590. https://doi.org/10.4028/www.scientific.net/amm.157-158.1586

Henrique, B. M., Sobreiro, V. A., & Kimura, H. (2019). Literature review: Machine learning techniques applied to financial market prediction. Expert Systems with Applications, 124, 226–251. https://doi.org/10.1016/j.eswa.2019.01.012

Hossain, M., Islam, S., Chakraborty, P., & Majumder, A. (2020). Predicting daily closing prices of selected shares of dhaka stock exchange (dse) using support vector machines. Internet of Things and Cloud Computing, 8(4), 46. https://doi.org/10.11648/j.iotcc.20200804.12

Liu, H., Qi, L., & Sun, M. (2022). Short-term stock price prediction based on cae-lstm method. Wireless Communications and Mobile Computing, 2022, 1-7. https://doi.org/10.1155/2022/4809632

Liu, M., Sheng, H., Zhang, N., Chen, Y., & Huang, L. (2023). A New Deep Network Model for Stock Price Prediction. In Y. Xu, H. Yan, H. Teng, J. Cai, & J. Li (Eds.), Machine Learning for Cyber Security (pp. 413–426). Springer Nature Switzerland.

Mehtab, S. and Sen, J. (2019). A robust predictive model for stock price prediction using deep learning and natural language processing. SSRN Electronic Journal. https://doi.org/10.2139/ssrn.3502624

Moein Aldin, M., Dehghan Dehnavi, H., & Entezari, S. (2012). Evaluating the Employment of Technical Indicators in Predicting Stock Price Index Variations Using Artificial Neural Networks (Case Study: Tehran Stock Exchange). International Journal of Business and Management, 7(15), 25–34. https://doi.org/10.5539/ijbm.v7n15p25

Mokhtari, S., Yen, K. K., & Liu, J. (2021). Effectiveness of artificial intelligence in stock market prediction based on machine learning. International Journal of Computer Applications, 183(7), 1–8. https://doi.org/10.5120/ijca2021921347

Neely, C. (1997). Technical analysis in the foreign exchange market: a layman's guide. Review (Federal Reserve Bank of St. Louis), 79(5). https://doi.org/10.20955/r.79.23-38

Qiu, M., & Song, Y. (2016). Predicting the direction of stock market index movement using an optimized artificial neural network model. PLOS ONE, 11(5), e0155133. https://doi.org/10.1371/journal.pone.0155133

Ravikumar, S., & Saraf, P. (2020). Prediction of stock prices using machine learning (regression, classification) Algorithms. 2020 International Conference for Emerging Technology, INCET 2020, 1–5. https://doi.org/10.1109/INCET49848.2020.9154061

Selvamuthu, D., Kumar, V., & Mishra, A. (2019). Indian stock market prediction using artificial neural networks on tick data. Financial Innovation, 5(1). https://doi.org/10.1186/s40854-019-0131-7

Shajalal, M., Hajek, P., & Abedin, M. Z. (2023). Product backorder prediction using deep neural network on imbalanced data. International Journal of Production Research, 61(1), 302–319. https://doi.org/10.1080/00207543.2021.1901153

Sheth, D., & Shah, M. (2023). Predicting stock market using machine learning: best and accurate way to know future stock prices. International Journal of System Assurance Engineering and Management, 14(1), 1–18. https://doi.org/10.1007/s13198-022-01811-1

Sureshkumar, K. K., & Elango, N. M. (2012). Performance analysis of stock price prediction. Global Journal of Computer Science and Technology, 12(1), 19–26. https://computerresearch.org/index.php/computer/article/view/426/426

Wanjawa, B. W. (2016). Evaluating the Performance of ANN Prediction System at Shanghai Stock Market in the Period 21-Sep-2016 to 11-Oct-2016. 147(March), 11–40. http://arxiv.org/abs/1612.02666

Wei, B., Yue, J., & Rao, Y. (2017). A deep learning framework for financial time series using stacked autoencoders and long-short term memory. Plos One, 12(7), e0180944. https://doi.org/10.1371/journal.pone.0180944

Yang, C., Zhai, J., Tao, G., & Haajek, P. (2020). Deep learning for price movement prediction using convolutional neural network and long short-term memory. Mathematical Problems in Engineering, 2020. https://doi.org/10.1155/2020/2746845

Ying, S. (2023). Stock price forecasting with machine learning. Advances in Economics Management and Political Sciences, 45(1), 138-149. https://doi.org/10.54254/2754-1169/45/20230275

Yu, P., & Yan, X. (2020). Stock price prediction based on deep neural networks. Neural Computing and Applications, 32(6), 1609–1628. https://doi.org/10.1007/s00521-019-04212-x

Authors

Hassan Raza
hassanrazaa@live.com (Primary Contact)
Zafar Akhtar
Author Biographies

Hassan Raza, SZABIST University

Hassan Raza, SZABIST University, Islamabad Campus; emai: hassanrazaa@live.com.

Zafar Akhtar, SZABIST University

Zafar Akhtar, SZABIST University, Islamabad Campus; akhtar.zafar@gmail.com

Raza, H., & Akhtar, Z. (2024). Predicting stock prices in the Pakistan market using machine learning and technical indicators. Modern Finance, 2(2), 46–63. https://doi.org/10.61351/mf.v2i2.167

Article Details

No Related Submission Found