Modeling Financial Market Dynamics with Temporal and Relational Learning: An LSTM-GNN Approach

Main Article Content

Yihan Zheng

Abstract

This study proposes a stock market prediction method based on long short-term memory network (LSTM) and graph neural network (GNN) to simultaneously capture the time series characteristics of individual stocks and the market network relationship. Traditional stock prediction methods mainly rely on time series models such as LSTM and GRU, but these methods often ignore the complex interactive relationships between stocks. To solve this problem, this study constructs a graph structure of the stock market and uses GNN for relationship modeling, so that the prediction model can comprehensively consider the historical trading data of individual stocks and the overall market dynamics. The experiment is verified based on the trading data of the S&P 500 index in 2018, and MLP, 1D-CNN, GRU and Transformer are used as comparison models. The experimental results show that LSTM+GNN achieves the best performance in terms of mean square error (MSE), root mean square error (RMSE) and coefficient of determination (R²), verifying the effectiveness of integrating time series and market structure information. In addition, ablation experiments and optimizer sensitivity experiments further illustrate the contribution of GNN structure and AdamW optimizer in improving prediction accuracy. Future research can combine multimodal data and reinforcement learning to further optimize the model and explore more efficient financial market prediction methods to enhance the decision-making ability of intelligent trading systems.

Article Details

Section

Articles

References

[1]J. Lai, "Attention Alignment under Logical Constraints for Reliable Financial Statement Reasoning," 2024.

[2]D. Matsunaga, T. Suzumura and T. Takahashi, "Exploring Graph Neural Networks for Stock Market Predictions with Rolling Window Analysis," arXiv preprint arXiv:1909.10660, 2019.

[3]D. Filipović and P. Pasricha, "Empirical Asset Pricing via Ensemble Gaussian Process Regression," arXiv preprint arXiv:2212.01048, 2022.

[4]P. Nithya, C. D. Nandakumar and S. Srinivasan, "Analysis of the Life Insurance Business Performance Based on COVID by Using Machine Learning Algorithms," Advances in Machine Learning and Big Data Analytics I: ICMLBDA 2023, pp. 347, 2023.

[5]W. Bao, J. Yue and Y. Rao, "A Deep Learning Framework for Financial Time Series Using Stacked Autoencoders and Long-Short Term Memory," PLOS ONE, vol. 12, no. 7, e0180944, 2017.

[6]L. Liu, B. Peng and J. Yu, "Stock Price Prediction Based on Machine Learning," Proceedings of the 2022 2nd International Conference on Economic Development and Business Culture (ICEDBC 2022), pp. 1277-1282, 2022.

[7]C. Wang, Y. Chen, S. Zhang and Q. Zhang, "Stock Market Index Prediction Using Deep Transformer Model," Expert Systems with Applications, vol. 208, 118128, 2022.

[8]L. Peng, "Stock Price Prediction of 'Google' Based on Machine Learning," BCP Business & Management, vol. 34, pp. 912-918, 2022.

[9]W. Khan, M. A. Ghazanfar, M. A. Azam, A. Karami, K. H. Alyoubi and A. S. Alfakeeh, "Stock Market Prediction Using Machine Learning Classifiers and Social Media, News," Journal of Ambient Intelligence and Humanized Computing, vol. 13, no. 7, pp. 3433-3456, 2022.

[10]I. Orquin-Serrano, "Predictive Power of Adaptive Candlestick Patterns in Forex Market: EURUSD Case," Mathematics, vol. 8, no. 5, 802, 2020.

[11]D. Daiya and C. Lin, "Stock Movement Prediction and Portfolio Management via Multimodal Learning with Transformer," Proceedings of the 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 3305-3309, 2021.

[12]Q. Gan, "Large Language Model Framework for Multi-Document Financial Anomaly Detection in Intelligent Auditing via Semantic Mapping and Risk Reasoning," 2024.

[13]S. Li, J. Wu, X. Jiang and K. Xu, "Chart GCN: Learning Chart Information with a Graph Convolutional Network for Stock Movement Prediction," Knowledge-Based Systems, vol. 248, 108842, 2022.

[14]W. Li, R. Bao, K. Harimoto, D. Chen, J. Xu and Q. Su, "Modeling the Stock Relation with Graph Network for Overnight Stock Movement Prediction," Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, pp. 4541-4547, 2021.

[15]Y. Li, Z. Simon and D. Turkington, "Investable and Interpretable Machine Learning for Equities," The Journal of Financial Data Science, vol. 4, no. 1, pp. 54-74, 2022.