随机森林与XGBoost在股票价格预测中的应用
Application of Random Forest and XGBoost in Stock Price Prediction
摘要: 金融市场具有强随机性、非线性、非平稳性等特征,对股票价格预测提出了挑战。本文引入支持向量机(SVM)、决策树、随机森林、XGBoost等四种机器学习算法,通过数据收集、数据预处理、模型训练、结果分析等步骤,对股票价格进行预测。实验结果表明,四类模型均能在一定程度上捕捉股价变化趋势;综合考虑预测效果和稳定性,随机森林和XGBoost模型更具优势,为预测股票价格提供了有益参考。
Abstract: Financial markets are characterized by high randomness, nonlinearity, and non-stationarity, posing significant challenges to stock price prediction. This study introduces four machine learning algorithms—Support Vector Machine (SVM), Decision Tree, Random Forest, and XGBoost—to predict stock prices through a process encompassing data collection, data preprocessing, model training, and result analysis. Experimental results demonstrate that all four models can, to some extent, capture the trends in stock price movements. When considering both predictive performance and stability, the Random Forest and XGBoost models exhibit superior advantages, offering valuable insights for stock price prediction.
参考文献
|
[1]
|
覃业梅, 周帆, 胡博飓, 等. 基于样本卷积交互网络的股票价格预测及资产分配[J/OL]. 系统科学与数学: 1-21. https://link.cnki.net/urlid/11.2019.o1.20250708.1517.060, 2025-08-23.
|
|
[2]
|
林娜娜, 秦江涛. 基于随机森林的A股股票涨跌预测研究[J]. 上海理工大学学报, 2018, 40(3): 267-273, 301.
|
|
[3]
|
杨新斌, 黄晓娟. 基于支持向量机的股票价格预测研究[J]. 计算机仿真, 2010, 27(9): 302-305.
|
|
[4]
|
丁宇昕. 基于SVM的股价预测模型研究[D]: [硕士学位论文]. 太原: 山西大学, 2021.
|
|
[5]
|
邹婕, 李路. 基于随机森林的SA-BiGRU模型的股票价格预测研究[J]. 中国物价, 2023(11): 52-56.
|
|
[6]
|
谷嘉炜, 韦慧. XGBoost-ESN组合模型股价预测方法[J]. 牡丹江师范学院学报(自然科学版), 2022(1): 1-5.
|
|
[7]
|
Pedregosa, F., Varoquaux, G., Gramfort, A., et al. (2011) Scikit-Learn: Machine Learning in Python. Journal of Machine Learning Research, 12, 2825-2830.
|
|
[8]
|
Hyndman, R.J. and Koehler, A.B. (2006) Another Look at Measures of Forecast Accuracy. International Journal of Forecasting, 22, 679-688. [Google Scholar] [CrossRef]
|
|
[9]
|
郑洁, 颜七笙. 基于多特征量分析XGBoost-EMD-LSTM模型的股票价格预测[J]. 应用数学进展, 2025, 14(4): 558-571.
|
|
[10]
|
Basak, S., Kar, S., Saha, S., Khaidem, L. and Dey, S.R. (2019) Predicting the Direction of Stock Market Prices Using Tree-Based Classifiers. The North American Journal of Economics and Finance, 47, 552-567. [Google Scholar] [CrossRef]
|