A COMPARATIVE ANALYSIS OF NEURAL NETWORK MODELS ON PREDICTING STOCK PRICES
https://doi.org/10.53360/2788-7995-2025-3(19)-8
Abstract
Due to their complex and unpredictable nature, stock market movements were always challenging to predict. Factors like economic indicators, market sentiment, and political and global events significantly contribute to stock price unpredictability. There are different methods to analyze risks, returns, and average price movements, based on which investors make assumptions. Identifying patterns and making the right decision on large amounts of data is very difficult, but nowadays, with the advancement of neural networks, we can solve prediction problems by identifying patterns of high-dimensional sequential data. We will analyze and compare five neural network architectures, including Recurrent Neural Networks (RNNs), Long Short-Term Memory networks (LSTMs), Gated Recurrent Units (GRUs), Convolutional Neural Networks (CNNs), and Artificial Neural Networks (ANNs), to try to predict stock prices using historical data taken from Yahoo Finance API, which is widely used and reliable for financial data analysis. We will separate historical data into two parts, 80% of which will be trained and 20% will be tested. For each model, we will use different hyperparameters we selected as the most effective training. Popular Python libraries such as TensorFlow, Keras, and NumPy are used for efficient implementation. Additionally, we used preprocessing for data, such as data cleaning and normalization, to avoid errors and enhance model performance. The models are evaluated based on prediction accuracy using metrics like Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and R-squared (R²). Additionally, we use classification metrics such as the confusion matrix and Receiver Operating Characteristic - Area Under the Curve (ROC-AUC) to analyze each model’s performance in predicting price movement directions. We concluded that the GRU model achieves the highest accuracy and reliability in our analysis, with notable performance in classification metrics. Conversely, the simple ANN model shows the worst results, highlighting the variability in predictive capabilities across different neural network architectures.
About the Authors
D. AmrinKazakhstan
Daryn Amrin – Master’s student in Software Engineering, Department of Computer Engineering
050000, Republic of Kazakhstan, Almaty, 34/1 Manas Street
S. Mukhanov
Kazakhstan
Samat Mukhanov – PhD, Assistant-professor
010000, Republic of Kazakhstan, Astana, 55/11 Mangilik El Avenue
S. Amanzholova
Kazakhstan
Saule Amanzholova – Candidate of technical sciences, Head of Intelligent Systems and Cybersecurity Department, associate professor
010000, Republic of Kazakhstan, Astana, 55/11 Mangilik El Avenue
B. Amirgaliyev
Kazakhstan
Beibut Amirgaliyev – PhD, Professor
010000, Republic of Kazakhstan, Astana, 55/11 Mangilik El Avenue
References
1. Comparative analysis of neural network models for gesture recognition methods hands / Bulletin of NIA RK / S.B. Mukhanov et al // Information and communication technologies. – 2023 – № 2. – Р. 88.
2. Olorunnimbe K. Deep learning in the stock market – a systematic survey of practice, backtesting, and applications / K. Olorunnimbe, H. Viktor // Artif. Intell. Rev. – 2023. – Vol. 56, № 3. – P. 2057-2109.
3. Cohen G. Algorithmic Trading and Financial Forecasting Using Advanced Artificial Intelligence Methodologies: 18 / G. Cohen // Mathematics. Multidisciplinary Digital Publishing Institute. – 2022. – Vol. 10, № 18. – P. 3302.
4. Predicting stock price movement using a DBN-RNN / X. Zhang et al // Appl. Artif. Intell. – 2021. Vol. 35, № 12. – P. 876-892.
5. An innovative neural network approach for stock market prediction / X. Pang et al // J. Supercomput. – 2020. – Vol. 76, № 3. – P. 2098-2118.
6. Chong E. Deep learning networks for stock market analysis and prediction: Methodology, data representations, and case studies / E. Chong, C. Han, F.C. Park // Expert Syst. Appl. – 2017. – Vol. 83. – P. 187-205.
7. Sarker I.H. Deep Learning: A Comprehensive Overview on Techniques, Taxonomy, Applications and Research Directions / I.H. Sarker // SN Comput. Sci. – 2021. – Vol. 2, № 6. – P. 420.
8. Gao Y. Stock Prediction Based on Optimized LSTM and GRU Models / Y. Gao, R. Wang, E. Zhou // Sci. Program. ed. Gupta P. – 2021. – Vol. 2021. – P. 1-8.
9. A comparison of convolutional neural networks for Kazakh sign language recognition / C. Kenshimov et al // East.-Eur. J. Enterp. Technol. – 2021. – Vol. 5, № 2(113). – P. 44-54.
10. Stock market prediction using deep learning algorithms / S. Mukherjee et al // CAAI Trans. Intell. Technol. – 2023. – Vol. 8, № 1. – P. 82-94.
11. Durairaj Dr.M. A convolutional neural network based approach to financial time series prediction / Dr.M. Durairaj, B.H.K. Mohan // Neural Comput. Appl. – 2022. – Vol. 34, № 16. – P. 13319-13337.
12. Jaiswal R. A Hybrid Convolutional Recurrent (CNN-GRU) Model for Stock Price Prediction / R. Jaiswal, B. Singh // 2022 IEEE 11th International Conference on Communication Systems and Network Technologies (CSNT). Indore, India: IEEE. – 2022. – P. 299-304.
13. Chahuán-Jiménez K. Neural Network-Based Predictive Models for Stock Market Index Forecasting / K. Chahuán-Jiménez // J. Risk Financ. Manag. – 2024. – Vol. 17, № 6. – P. 242.
14. Deep Learning for Stock Market Prediction / Nabipour M. et al. // Entropy. – 2020. – Vol. 22, № 8. – P. 840.
15. Normalization Techniques in Training DNNs: Methodology, Analysis and Application / L. Huang et al // IEEE Trans. Pattern Anal. Mach. Intell. – 2023. – Vol. 45, № 8. – P. 10173-10196.
16. Deep causal speech enhancement and recognition using efficient long-short term memory Recurrent Neural Network / Z. Li et al // PLOS ONE. Public Library of Science. – 2024. – Vol. 19, № 1. – P. e0291240.
17. Mienye I.D. Recurrent Neural Networks: A Comprehensive Review of Architectures, Variants, and Applications: 9 / I.D. Mienye, T.G. Swart, G. Obaido // Information. Multidisciplinary Digital Publishing Institute. – 2024. – Vol. 15, № 9. – P. 517.
18. GESTURE RECOGNITION OF MACHINE LEARNING AND CONVOLUTIONAL NEURAL NETWORK METHODS FOR KAZAKH SIGN LANGUAGE / S. Mukhanov et al // Sci. J. Astana IT Univ. – 2023. – P. 85-100.
19. Patil P. Long Short-Term Memory and Gated Recurrent Unit Networks for Accurate Stock Price Prediction / P. Patil, S.J. Patel // International Journal of Computer Science Trends and Technology (IJCST). – 2023. – Vol. 11, № 4. – Р. 9-12.
20. A comparative analysis of neural network models for hand gesture recognition methods / Y.N. Amirgaliyev et al // Bull. Natl. Eng. Acad. Repub. Kazakhstan. – 2023. – Vol. 88, № 2. – P. 16.
21. CNN features with bi-directional LSTM for real-time anomaly detection in surveillance networks / W. Ullah et al // Multimed. Tools Appl. – 2021. – Vol. 80, № 11. – P. 16979-16995.
22. Vallarino D. A Dynamic Approach to Stock Price Prediction: Comparing RNN and Mixture of Experts Models Across Different Volatility Profiles. arXiv, 2024.
23. Chicco D. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation / D. Chicco, M.J. Warrens, G. Jurman // PeerJ Comput. Sci. – 2021. – Vol. 7. – P. e623.
24. Kumar R. Analysis of Financial Time Series Forecasting using Deep Learning Model / R. Kumar, P. Kumar, Y. Kumar // 2021 11th International Conference on Cloud Computing, Data Science & Engineering (Confluence). Noida, India: IEEE. – 2021. – P. 877-881
Review
For citations:
Amrin D., Mukhanov S., Amanzholova S., Amirgaliyev B. A COMPARATIVE ANALYSIS OF NEURAL NETWORK MODELS ON PREDICTING STOCK PRICES. Bulletin of Shakarim University. Technical Sciences. 2025;(3(19)):64-72. (In Russ.) https://doi.org/10.53360/2788-7995-2025-3(19)-8















