A Stock Price Prediction Model Based on Neural Networks and Deep Learning

Research Article
Open access

A Stock Price Prediction Model Based on Neural Networks and Deep Learning

Zhibin Zhu 1*
  • 1 Jilin University, Changchun, Jilin, China    
  • *corresponding author 2315762774@qq.com
TNS Vol.120
ISSN (Print): 2753-8826
ISSN (Online): 2753-8818
ISBN (Print): 978-1-80590-227-0
ISBN (Online): 978-1-80590-228-7

Abstract

As financial markets become increasingly complex and volatile, the limitations of traditional statistical models in stock price prediction have become more apparent. This paper proposes a hybrid neural network architecture that integrates convolutional feature extraction and attention-based temporal modeling, aiming to address issues such as noise sensitivity, overfitting, and inadequate integration of multimodal data in existing approaches. Through comparative experiments, the model is shown to be effective in enhancing prediction accuracy and robustness. The results indicate that combining temporal dependency modeling with multimodal data fusion represents a promising direction for future financial forecasting. The paper further explores prospective research directions, including multimodal data processing, cross-market analysis, and the development of real-time systems, thereby providing theoretical support for the application of neural networks in the financial domain.

Keywords:

Neural Networks, LSTM, RNN, Stock Price Prediction

Zhu,Z. (2025). A Stock Price Prediction Model Based on Neural Networks and Deep Learning. Theoretical and Natural Science,120,1-7.
Export citation

1. Introduction

With the rapid development of artificial intelligence and big data technologies, financial markets have entered an era characterized by unprecedented complexity and volatility. Accurate prediction of stock market trends remains a key challenge for investors, financial institutions, and policymakers. Stock price fluctuations are influenced by a wide range of factors, including macroeconomic indicators, geopolitical events, and investor sentiment. These factors exhibit nonlinear and dynamic interactions that traditional statistical models—such as the Autoregressive Integrated Moving Average (ARIMA) model or linear regression—often struggle to capture, resulting in limited predictive performance. As such, exploring advanced methodologies to improve forecasting accuracy has become a shared focus for both academia and industry.

This study leverages the strengths of neural networks to address gaps in the research on stock trend prediction. Although existing studies have applied machine learning techniques to financial forecasting, many approaches fail to fully exploit the inherent temporal dependencies and high-dimensional features within stock data. For instance, while Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks have shown promise in handling sequential data, they continue to face challenges related to noise and overfitting. In contrast, this study proposes a hybrid neural network architecture that integrates convolutional layers for feature extraction with an attention mechanism for temporal modeling. The goal is to enhance the robustness and accuracy of stock trend prediction while addressing the limitations of current methods.

2. Literature Review

Research on financial analysis and stock price prediction has been conducted for several decades. With the continuous development and refinement of machine learning and artificial intelligence technologies, theoretical models in this field have achieved significant progress and widespread application. In particular, the increasing adoption of deep learning models—such as Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNN), and Recurrent Neural Networks (RNN)—has led to improvements in prediction accuracy and efficiency through the integration of various algorithms.

To begin with, Han et al. [1] investigated the application of deep neural networks—particularly LSTM and CNN—in stock market prediction, focusing on a multi-factor forecasting model that combines CNN and LSTM. Wu [2] proposed a hybrid model named WD-PCA-LSTM, which incorporates wavelet threshold denoising, Principal Component Analysis (PCA), and LSTM, along with the ARIMA model. Empirical analysis on UNIGROUP GUOWEI stock data demonstrated that this model outperforms traditional approaches in predictive performance. Subsequently, Ji [3] introduced a stock price prediction method based on a Backpropagation (BP) neural network. An empirical study on the Shanghai Composite Index verified the effectiveness of a three-layer BP neural network in stock forecasting, especially under bullish market conditions. Li [1] put forward an improved LSTM-based stock price prediction model, which integrates Recursive Feature Elimination (RFE) and the Grey Wolf-Whale Optimization Algorithm (GSWOA) to optimize the parameters of the LSTM network, thereby enhancing prediction accuracy. Experimental results confirmed that the optimized LSTM model significantly outperforms traditional methods. Xie et al. [4] improved the prediction performance of neural networks through modifications based on the Artificial Fish Swarm Algorithm. Ji, Dong, and Tao [5] applied Neural Stochastic Differential Equations (NSDE) for option pricing by parameterizing asset return and volatility into drift and diffusion networks. Li [6] conducted research on intelligent financial investment using deep reinforcement learning and proposed two algorithms: R-PPO, which integrates Recurrent Neural Networks (RNN) with Proximal Policy Optimization (PPO) to enhance sequential state observation, and B-PPO, which incorporates Band Advantage Estimation (BAE) to optimize portfolio strategies. Liu [7] developed a stock forecasting model using a hybrid of GARCH and BiLSTM. Zhu [8] combined sentiment analysis with deep learning by using the ALBERT model for sentiment classification of stock forum texts. He constructed the ALBERT-CNN-BiLSTM-Attention model, which fuses sentiment indicators with trading data. Yang [9] proposed the NS-Transformer model based on an improved Transformer architecture, which addresses the non-stationarity of time-series data through nonlinear transfer functions and a de-stationary attention mechanism.

Among the aforementioned studies, [1,2,7] are based on LSTM and its variants, while [2, 7] employ hybrid models that combine traditional statistical methods. Study [3] is based on BP neural networks and their improvements, and [1,4] integrate optimization algorithms with neural networks. Reference [6] represents work on deep reinforcement learning, proposing two algorithms: R-PPO (RNN with PPO) and B-PPO (PPO enhanced with BAE). Study [8] combines sentiment analysis and deep learning using ALBERT, CNN, BiLSTM, and attention mechanisms to construct a multimodal sentiment-forecasting model. Study [9] improves the Transformer model to handle time-series non-stationarity. Study [5] applies NSDE to model asset returns and volatility for option pricing. Studies [7,8] utilize multimodal hybrid models—Liu’s work integrating statistical models (GARCH), deep learning (BiLSTM), and ensemble methods (XGBoost), while Zhu’s model combines text sentiment analysis with multimodal deep learning techniques.

Several representative studies in this domain include: Han et al. [10] utilized extensive historical data from the stock market to integrate core technologies from deep cognitive methods with Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Long Short-Term Memory Networks (LSTM), and Gated Recurrent Unit (GRU) systems for modeling and training. Traditional neural networks suffer from drawbacks such as high complexity, limited analytical precision, long training times with uncertain outcomes, overfitting, and poor generalizability. CNNs effectively reduce training parameters and help prevent overfitting but fail to capture temporal variations within individual hidden layers. By incorporating input gates, forget gates, output gates, and internal memory cells, LSTM networks can propagate important information while ignoring irrelevant signals. Derived models such as the multi-factor LSTM stock price prediction model, the DMD–LSTM model, and the DP-LSTM model are all extensions based on these principles.

Wu [2] applied wavelet threshold denoising techniques to preprocess raw data and extract effective information. On the modeling front, Wu primarily employed the ARIMA time series model and the LSTM neural network to predict stock closing prices. The ARIMA model, known for its simplicity and predictive ability, was widely used for a time. LSTM, capable of handling nonlinear data and retaining long-term memory, can effectively mine temporal information embedded in the data and provide accurate predictions of stock prices.

Ji [3] conducted an in-depth analysis of the principles and learning algorithms of the BP neural network and used a three-layer BP network for empirical analysis of the Shanghai Composite Index's closing prices. First, the study used rank correlation coefficients to analyze the relationships between various factors and the index, filtering out those with weak correlations to enhance the effectiveness of inputs and accelerate learning. Then, empirical analysis was conducted using both standard and improved BP networks, with results showing the improved model performed better in terms of Mean Absolute Error (MAE) and Directional Symmetry (DS). The improved network’s optimal parameters (training set, training function, learning rate, number of hidden nodes, and activation function) were identified through experiments. A comparison of the model's predictive performance under different market conditions revealed that BP networks perform less effectively during consolidation phases than in bull markets. The study concludes that a three-layer BP neural network can effectively predict stock prices and offers practical reference value for investors.

Li [1] proposed a stock price forecasting model based on RFE-GSWOA-LSTM. First, the Shanghai Composite Index was selected as the experimental dataset. Recursive Feature Elimination (RFE) was used for feature selection to build a comprehensive feature set. Then, the Gravitational Search-based Whale Optimization Algorithm (GSWOA) was applied to optimize key parameters of the LSTM network, thereby reducing manual bias and improving prediction accuracy. Finally, the optimized parameters were fed into the LSTM network to construct the GSWOA-LSTM model. Comparative analysis with other models showed that the proposed model outperformed others in predicting the Shanghai Composite Index.

Xie et al. [4] focused on optimizing stock price prediction methods by introducing an improved Artificial Fish Swarm Algorithm based on Gravitational Search (AFSA-GS), integrated with a Radial Basis Function (RBF) neural network to enhance prediction accuracy. The study first analyzed the complexity of stock price prediction and the limitations of traditional methods in terms of accuracy and efficiency. It then introduced the principles of the Gravitational Search Algorithm (GSA) and AFSA, proposing the AFSA-GS algorithm, which adjusts the artificial fish’s visual range and step size through gravitational search to improve adaptability, convergence speed, and global optimization. Experiments were conducted on multiple stocks (e.g., ShenZhongHua A000017), comparing the method to LSTM, ARIMA, and traditional RBF models. Results indicated that the AFSA-GS-optimized RBF network outperformed others in terms of Root Mean Square Error (RMSE) and Mean Relative Error (MRE), offering higher prediction accuracy.

Ji et al. [5] developed a Neural Stochastic Differential Equation (NSDE) model based on the Black-Scholes stock price model (which assumes no transaction costs and constant volatility and risk-free rates—assumptions that do not hold in real markets). They parameterized asset returns and volatility as drift and diffusion networks, respectively. Using real stock data and taking options on single stocks as the subject of empirical analysis, they trained and tested the NSDE model, which proved capable of overcoming the constant-parameter limitations of the Black-Scholes model. For scenarios where the price of the underlying asset is unobservable, the study proposed constraining the price of a target option and a known option within the Wasserstein distance under the risk-neutral martingale measure, and provided a theoretical justification for this approach.

Li [6] combined deep reinforcement learning algorithms with financial investment problems, improving traditional models to better suit the financial environment and proposing intelligent financial investment algorithms. Specifically, for individual stock investment in stock markets, the study introduced an R-PPO algorithm based on sequential state observations. Due to the complexity and information overload in financial environments, traditional deep reinforcement learning methods struggle with incomplete state observations. Inspired by solutions from gaming applications, the R-PPO algorithm embedded various recurrent neural networks in the state input layer of the Proximal Policy Optimization (PPO) framework to better capture sequential data. The three dimensions of state data were then fused and passed into subsequent networks for strategy learning and trading decisions. A matching experience replay mechanism was also proposed. For portfolio investment, the study developed a B-PPO algorithm based on band advantage estimation (BAE), addressing inaccuracies in traditional value estimation methods for long sequence problems in stock trading. BAE partitions the accumulation of rewards based on market trend bands to improve the agent's learning of investment strategies. Experiments on both algorithms (R-PPO for individual stocks and B-PPO for portfolios) showed strong performance in return rates, Sharpe ratios, and risk resistance.

Liu [7] developed a hybrid stock forecasting model combining the Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model and a Bi-directional LSTM network, further optimized with Bayesian decision-making. The study consisted of two phases. In the first phase, an ARIMA-GARCH model was used to preprocess data and extract residual volatility, which was added as a new feature to the dataset. A CNN-BiLSTM-AT deep neural network was then constructed, and XGBoost was used to adjust the predictions, forming a hybrid model: CNN-BiLSTM-AT-XGBoost. To enhance efficiency, parallel computation across multiple stocks was implemented. The second phase used Bayesian methods with MCMC algorithms to derive an optimal portfolio strategy under given expected returns and investment strategies, assuming portfolio weights followed a Dirichlet prior. Empirical studies using ten stocks from the CSI 500 Index (000905) with 2,431 trading days of data each (including open, high, low, close, adjusted close, and volume) showed that the hybrid model outperformed others in terms of fit and error minimization. Under set conditions, the Bayesian method successfully derived investment weights that effectively met expected return goals.

3. Discussion

In recent years, research on stock prediction based on neural networks has made significant progress, which can be broadly categorized into the following areas:

3.1. Models Based on LSTM and Its Variants:

Wu [2] proposed the WD-PCA-LSTM model, which combines LSTM with ARIMA and enhances prediction performance using wavelet threshold denoising. Li [1] employed Recursive Feature Elimination (RFE) and the Grey Wolf–Whale Optimization Algorithm (GSWOA) to optimize LSTM parameters, significantly improving prediction accuracy. Liu [7] integrated the GARCH model with BiLSTM to enhance temporal modeling capabilities by capturing volatility features.

3.2. Hybrid Models Combined with Traditional Methods:

Ji [3] developed a stock prediction model based on the BP neural network and validated its effectiveness under bullish market conditions. Xie et al. [4] addressed nonlinear forecasting challenges by optimizing the Radial Basis Function (RBF) neural network using the Artificial Fish Swarm Algorithm.

3.3. Integration of Multimodal Data and Deep Learning:

Zhu [8] combined sentiment analysis (using the ALBERT model) with a BiLSTM-Attention framework to integrate stock forum text data with trading information. Yang [9] proposed an improved NS-Transformer model that tackles the non-stationarity of time-series data through a de-stationary attention mechanism.

3.4. Interdisciplinary Methodological Exploration:

Li [6] applied deep reinforcement learning—specifically the R-PPO and B-PPO algorithms—to optimize investment strategies. Ji et al. [5] employed Neural Stochastic Differential Equations (NSDE) to model asset volatility and improve option pricing.

Despite these breakthroughs in model innovation, several challenges remain: (1) Insufficient handling of noisy data and overfitting; (2) Lack of a dynamic trade-off mechanism in multimodal data integration; (3) Absence of a systematic framework for cross-market and heterogeneous multi-source data analysis.

4. Conclusion

In summary, machine learning methods based on neural networks have achieved substantial and wide-ranging applications and development in the field of financial analysis. To further advance this line of research, future studies can explore the following directions:

Multimodal Data Processing and Prediction from Both Longitudinal and Cross-Sectional Perspectives.

Multimodal data refers to various types of data formats, such as numerical data (e.g., stock prices and trading volumes), textual data (e.g., news articles and social media posts), visual data (e.g., candlestick charts and financial statement graphs), and even auditory data (e.g., earnings call recordings). Integrating these diverse data types provides a more comprehensive understanding of market dynamics. Future research will focus on developing models capable of effectively processing and integrating these multimodal inputs.

Potential research directions include:

Developing more sophisticated deep learning architectures, such as attention mechanisms and graph neural networks, to dynamically weigh the importance of different data modalities. For example, combining real-time sentiment analysis from news with historical price data may yield early signals of market movements.

Cross-modal learning techniques, which investigate how information from one modality can enhance the understanding of another—for instance, supplementing textual descriptions with visual analysis of financial charts.

Real-time analytics systems, capable of processing and analyzing multimodal data streams in real time to provide timely insights for trading decisions.

Challenges and solutions, including addressing data heterogeneity, complementarity, and redundancy among modalities, to ensure model robustness and generalization ability.

Comprehensive Analysis of Multiple Investment Targets Within a Market or Multi-Source Heterogeneous Data Across Markets.

Multi-source heterogeneous data refers to information originating from different sources and possibly featuring varied structures or formats—such as data from different stock exchanges, financial news media, social media platforms, and macroeconomic indicators. Given the complex influence of these factors on financial markets, future research will aim to develop robust data fusion techniques to integrate this information and uncover intricate patterns and correlations.

Potential research directions include:

Data fusion techniques, to manage heterogeneity and inconsistencies among different sources while ensuring high data quality. For example, integrating data from multiple stock markets and financial news can help form a more holistic analytical model.

Cross-market analysis, to investigate data across different markets or exchanges and identify inter-market patterns and influences. For instance, exploring the relationship between global equity markets and social media sentiment.

Heterogeneous graph neural networks, to represent relationships among diverse entities (e.g., companies, industries, geopolitical events), thereby offering a richer context for prediction tasks.

Comprehensive assessment of external variables, extending beyond traditional quantitative indicators to include more external data sources, such as supply chain networks or ESG (Environmental, Social, and Governance) factors, to enhance the accuracy of market trend forecasts.


References

[1]. Li, J. (n.d.). Research on stock price index prediction based on improved recurrent neural network (Doctoral dissertation, Shandong University of Business and Technology).

[2]. Wu, L. (2022). Stock price prediction based on LSTM neural network (Doctoral dissertation, Chongqing University).

[3]. Ji, K. (n.d.). Stock price trend prediction based on BP neural network (Doctoral dissertation, Zhengzhou University).

[4]. Xie, J., Jiang, F., Du, J., & Zhao, J. (2022). Stock price prediction based on improved artificial fish swarm algorithm and RBF neural network. Computer Engineering and Science, 44(11), 2080–2090.

[5]. Ji, X., Dong, J., & Tao, H. (2023). Option pricing based on neural stochastic differential equations. Journal of Jilin University: Science Edition, 61(6), 1324–1332.

[6]. Li, F. (2023). Research and implementation of intelligent financial investment algorithm based on deep reinforcement learning [Doctoral dissertation, Southeast University, Jiangsu].

[7]. Liu, Q. (2024). Research on stock prediction based on GARCH-BiLSTM network (Doctoral dissertation, Changchun University of Science and Technology).

[8]. Zhu, R. (2024). Research on agricultural enterprise stock price trend prediction based on sentiment quantification and deep learning (Doctoral dissertation, Zhejiang A&F University).

[9]. Yang, X. (2024). Stock price prediction based on improved Transformer model (Doctoral dissertation, Jiangxi University of Finance and Economics).

[10]. Han, J., Lu, S., Sun, N., Shang, J., Zhang, Y., & Bao, Z. (2023). Application of deep learning in stock prediction. Information Technology and Informatization, (9), 190–193.


Cite this article

Zhu,Z. (2025). A Stock Price Prediction Model Based on Neural Networks and Deep Learning. Theoretical and Natural Science,120,1-7.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of CONF-APMM 2025 Symposium: Controlling Robotic Manipulator Using PWM Signals with Microcontrollers

ISBN:978-1-80590-227-0(Print) / 978-1-80590-228-7(Online)
Editor:Marwan Omar, Mustafa Istanbullu
Conference date: 19 September 2025
Series: Theoretical and Natural Science
Volume number: Vol.120
ISSN:2753-8818(Print) / 2753-8826(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. Li, J. (n.d.). Research on stock price index prediction based on improved recurrent neural network (Doctoral dissertation, Shandong University of Business and Technology).

[2]. Wu, L. (2022). Stock price prediction based on LSTM neural network (Doctoral dissertation, Chongqing University).

[3]. Ji, K. (n.d.). Stock price trend prediction based on BP neural network (Doctoral dissertation, Zhengzhou University).

[4]. Xie, J., Jiang, F., Du, J., & Zhao, J. (2022). Stock price prediction based on improved artificial fish swarm algorithm and RBF neural network. Computer Engineering and Science, 44(11), 2080–2090.

[5]. Ji, X., Dong, J., & Tao, H. (2023). Option pricing based on neural stochastic differential equations. Journal of Jilin University: Science Edition, 61(6), 1324–1332.

[6]. Li, F. (2023). Research and implementation of intelligent financial investment algorithm based on deep reinforcement learning [Doctoral dissertation, Southeast University, Jiangsu].

[7]. Liu, Q. (2024). Research on stock prediction based on GARCH-BiLSTM network (Doctoral dissertation, Changchun University of Science and Technology).

[8]. Zhu, R. (2024). Research on agricultural enterprise stock price trend prediction based on sentiment quantification and deep learning (Doctoral dissertation, Zhejiang A&F University).

[9]. Yang, X. (2024). Stock price prediction based on improved Transformer model (Doctoral dissertation, Jiangxi University of Finance and Economics).

[10]. Han, J., Lu, S., Sun, N., Shang, J., Zhang, Y., & Bao, Z. (2023). Application of deep learning in stock prediction. Information Technology and Informatization, (9), 190–193.