A COMPARATIVE ANALYSIS OF NEURAL NETWORK MODELS ON PREDICTING STOCK PRICES

Bulletin of Shakarim University Technical Sciences, 2025

Full text Open access: Gold Metadata (CSL-JSON)
DOI 10.53360/2788-7995-2025-3(19)-8
Data confidence 70 medium
How this score is calculated

It is built from checkable properties of the record itself: whether the article has a DOI, how many independent sources confirmed its data, whether the required fields are filled in, and how recent the latest confirmation is. Disagreement between sources and a missing identifier lower it. A value of 80 or above means the record was published without further checking; 60 to 79 means it is published at reduced confidence, with a manual check advisable. A record verified by an editor by hand is never pushed below 90 by a recalculation. This scores our data about the article, not the article itself.

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.