节点文献

基于LSTM的股票预测实证分析

Empirical Analysis of Stock Predictions Based on LSTM

【作者】 张杰

【导师】 林路;

【作者基本信息】 山东大学 , 应用统计(专业学位), 2020, 硕士

【摘要】 2019年A股发生了许多大事,科创板开板、沪伦通开通、还有重组新规的落地等,我国股票市场正走在变革的道路上并且日渐完善。随着科技的进步,大量的金融数据得以保留,为股票市场的分析提供了坚实的数据基础。伴随深度学习研究的不断深入,人们正在不断的探索其在股票市场的上的应用。循环神经网络(RNN)是一种引入时序概念的神经网络,它的提出为分析时间序列数据提供了新的方法。长短时神经网络(LSTM)是一种优化了的循环神经网络,因其引入了门控的概念,克服了 RNN容易出现梯度消失和爆炸的问题;同时,LSTM神经元内部的多种门控各司其职,形成了对记忆数据的独立存储,进而可以解决数据的长序依赖问题。与传统的时间序列模型相比,LSTM得益于内部非线性激活函数的构建,在非线性相关数据的分析上具有一定的优势。本文尝试通过LSTM在股价预测和股价涨跌预测两个方面的实证分析,来验证LSTM对股票数据分析的适用性。同时本文对LSTM进行股票数据建模时容易出现的问题进行了总结,并对如何解决这些问题提出了自己的见解。希望从实证的角度为构建LSTM股票预测模型,提供一些具有参考价值的信息。本文选取了沪深300指数近5年的日交易数据、技术指标和估值指标三方面的数据作为样本数据。首先,在股价预测的实验中,本文分别从单特征输入和多特征输入的角度,采用LSTM模型对未来一天的收盘指数进行建模预测,再以ARIMA模型作为对比模型,进而分析LSTM在股价预测上的适用性。其次,在股价涨跌预测的实验中,也从单特征输入和多特征输入的角度,以未来一天的收盘指数的涨跌为预测对象进行LSTM建模分析。经过实证研究,两组实验都能说明LSTM多特征输入模型效果相对较好,证明了 LSTM多特征输入模型在股票预测方面的适用性。就收盘指数预测结果来看,LSTM多特征输入模型比ARIMA模型的MSE约低100个点,比LSTM单特征输入模型的MSE约低150个点。就收盘指数的涨跌预测结果来看,LSTM多特征输入模型比LSTM单特征输入模型的预测正确率提高23%,预测准确的天数增加了 10天,同时在模型训练时LSTM多特征输入模型预测正确率的走势比单特征输入模型要稳定很多。最后,本文针对LSTM在股票预测建模中出现的过拟合和不稳定的问题,采取了特征选择、初始化参数设定、单次训练样本量的选择、训练次数的选择、插入L2正则项、设置学习率衰减系数这六个方面措施,来防止过拟合和抑制不稳定的发生。

【Abstract】 In 2019,many major events occurred in the A-share market,such as the opening of the Science and Technology Board,the opening of the Shanghai-London Stock Connect,and the landing of the reorganization of new regulations.China’s stock market is on the path of change and is becoming more and more perfect.With advances in technology,large amounts of financial data are preserved,providing a solid data base for stock market analysis.With deep learning research,people are constantly exploring its application to the stock market.Recurrent neural network(RNN)is a neural network that introduces the concept of time series,and its proposal provides a new method for analyzing time series data.Long-short term neural network(LSTM)is an improved version of traditional recurrent neural network,because it introduces the concept of gate,which solves the problem of RNN gradient disappearance and explosion,and can also deal with the problem of long-term dependence of data.Compared with the traditional time series model,thanks to the internal nonlinear activation function,LSTM has some advantages in studying the problem of nonlinear sequence related data.This paper attempts to validate the applicability of LSTM to stock data analysis through the empirical analysis of both stock price prediction and rise and fall prediction.At the same time,it will analyze the problems of LSTM,that are prone to appear when fitting the model.In addition,it will provide suggestions about how to solve these problems.It is hoped to provide some valuable information for constructing the LSTM stock forecasting model.This paper selects the trading data,technical index and valuation index of CSI 300 in the past five years as the sample data.First,in the experiment of stock prediction,the closing index is modeled and predicted by LSTM from the perspective of single feature input and multi-feature input,and then the ARIMA model is used as the comparative model of closing index prediction to analyze the applicability of LSTM in stock price prediction.Secondly,in the experiment of rise and fall prediction,the LSTM model is also used to model the rise and fall of closing index from the angle of single feature input and multi-feature input.Through empirical research,both sets of experiments can illustrate the relatively good effect of the LSTM multi-featured input prediction model,proving the applicability of the LSTM multi-featured input model in stock prediction.In terms of closing index predictions,the LSTM multi-feature input model is about 100 points lower than the MSE of the ARIMA model and about 150 points lower than the MSE of the LSTM single-feature input model.In terms of the results of predicting the rise and fall of the closing index,the LSTM multi-featured input model is 23%more correct than the LSTM single-featured input model.Finally,this paper analyzes the problems of overfitting and instability of LSTM in stock prediction modeling and proposes specific solutions.

  • 【网络出版投稿人】 山东大学
  • 【网络出版年期】2020年 10期
  • 【分类号】F224;F832.51
  • 【被引频次】17
  • 【下载频次】1620
节点文献中: