基于LSTM模型的股票分类与预测研究
Research on Stock Classification and Prediction Based on LSTM Model
摘要: 本文以中国A股上市银行为研究对象,构建了一个融合PCA降维、DTW相似度分析与层次聚类技术的金融评价框架,并结合LSTM模型对股票价格走势进行趋势预测。首先,基于5年财务与市场数据,利用主成分分析提取银行关键特征,并应用动态时间规整算法量化银行间时间序列相似度。随后,采用加权DTW距离与层次聚类相结合的方法将银行划分为五类,并为每类构建加权指数。在此基础上,引入长短期记忆网络(LSTM)对各类指数进行预测建模。实证结果显示,该方法在训练集上取得了R2超过0.93的拟合度,测试集多数类别的R2也稳定在0.80以上,部分类别预测精度接近0.89,验证了分类结构与模型构建的有效性。该研究为金融时序建模与行业板块化评价提供了新的思路与实证依据。
Abstract: Taking Chinese A-share listed banks as the research object, this paper constructs a financial evaluation framework integrating PCA dimensionality reduction, DTW similarity analysis and hierarchical clustering, and combines it with an LSTM model for trend prediction of stock price movements. First, based on 5-year financial and market data, key bank characteristics are extracted using principal component analysis, and the dynamic time regularization algorithm is applied to quantify the time series similarity among banks. Subsequently, a combination of weighted DTW distance and hierarchical clustering is used to classify banks into five categories, and a weighted index is constructed for each category. On this basis, the Long Short-Term Memory (LSTM) network is introduced to predictively model the indices for each category. The empirical results show that the method achieves a goodness of fit of R2 over 0.93 on the training set, and most categories of the test set are also stabilized above 0.80, and the prediction accuracy of some categories is close to 0.89, which verifies the validity of the categorization structure and the model construction. This study provides new ideas and empirical basis for financial time series modeling and industry segmentation evaluation.
文章引用:王秉基. 基于LSTM模型的股票分类与预测研究[J]. 应用数学进展, 2025, 14(8): 76-85. https://doi.org/10.12677/aam.2025.148372

参考文献

[1] Wang, J. and Wang, J. (2015) Forecasting Stock Market Indexes Using Principle Component Analysis and Stochastic Time Effective Neural Networks. Neurocomputing, 156, 68-78. [Google Scholar] [CrossRef
[2] 郑磊, 李颖, 陈晓红. 基于深度学习的股票趋势预测研究综述[J]. 管理科学学报, 2017, 20(4): 87-104.
[3] Huang, W., Nakamori, Y. and Wang, S. (2005) Forecasting Stock Market Movement Direction with Support Vector Machine. Computers & Operations Research, 32, 2513-2522. [Google Scholar] [CrossRef
[4] 王铁山, 王敏, 张军辉. 基于聚类分析的股票市场分类预测模型研究[J]. 系统工程理论与实践, 2018, 38(7): 1790-1799.
[5] Hochreiter, S. and Schmidhuber, J. (1997) Long Short-Term Memory. Neural Computation, 9, 1735-1780. [Google Scholar] [CrossRef] [PubMed]
[6] Chen, K., Zhou, Y. and Dai, F. (2015) A LSTM-Based Method for Stock Returns Prediction: A Case Study of China Stock Market. 2015 IEEE International Conference on Big Data (Big Data), Santa Clara, 29 October-1 November 2015, 2823-2824. [Google Scholar] [CrossRef
[7] Jolliffe, I.T. and Cadima, J. (2016) Principal Component Analysis: A Review and Recent Developments. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 374, Article ID: 20150202. [Google Scholar] [CrossRef] [PubMed]
[8] García-Escudero, L.A. and Gordaliza, A. (2019) Trimmed Fuzzy Clustering of Financial Time Series Based on Dynamic Time Warping. Annals of Operations Research, 299, 1379-1395.
[9] Tang, G., Tian, R. and Wu, B. (2022) An Overview of Clustering Methods in the Financial World. Proceedings of the 2022 7th International Conference on Financial Innovation and Economic Development (ICFIED 2022), 14-16 January 2022, 524-529. [Google Scholar] [CrossRef
[10] Das, N., Goswami, B. and Begum, R.N.A. (2023). Stock Prices Prediction Using Long Short Term Memory. 2023 4th International Conference on Computing and Communication Systems (I3CS), Shillong, 16-18 March 2023, 1-5.[CrossRef
[11] Ding, Q., Wu, S., Sun, H., Guo, J. and Guo, J. (2020) Hierarchical Multi-Scale Gaussian Transformer for Stock Movement Prediction. Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, Special Track on AI in FinTech, 4640-4646. [Google Scholar] [CrossRef