摘要: 股票价格预测长久以来都是金融领域的热门研究课题,随着神经网络模型的广泛应用,出现了许多利用神经网络对股票价格进行预测的方法。本文使用基于门控制单元(GRU)的循环神经网络(RNN)模型与股票资金流向分析,尝试利用资金流向从动力学的角度对价格趋势进行学习,并进行预测。本文使用的数据为从A股随机抽取的一支股票最近1000个交易日的收盘价、涨跌幅与资金流向。本文使用MSE作为模型评估指标,模型在训练后MSE能达到0.014,模型预测与真实价格趋势上几乎一致,能够认为此模型对短期价格趋势预测较为准确。
关键词: 门控循环神经网络;价格预测;股票
ABSTRACT: Stock price prediction has long been a popular research topic in the financial field, and with the widespread use of neural network models, many methods for predicting stock prices using neural networks have emerged. This paper uses a Recurrent Neural Network (RNN) model based on Gated Recurrent Units (GRU) and analyzes the stock fund flows to attempt to learn and predict price trends from a dynamic perspective. The data used in this study includes the closing price, change rate, and fund flow of a randomly selected A-share stock in the most recent 1000 trading days. The Mean Squared Error (MSE) is used as the model evaluation metric, and the model's MSE can reach 0.013 after training. The model's predictions are almost consistent with the true price trend, and it can be considered accurate for short-term price trend prediction.
KEY WORDS: RNN;Price Predicting;Stocks
前 言
股票价格预测长久以来都是金融领域的热门研究课题,随着神经网络模型的广泛应用,出现了许多利用神经网络对股票价格进行预测的方法。而对于股票价格此类时间序列数据往往使用循环神经网络进行处理,普通的循环神经网络为了解决梯度消失与梯度爆炸问题需要对梯度进行裁剪因而损失了一些信息,并且可能会过度重视不重要的参数导致模型效果不佳。幸运的是,学术界已经提出许多方法来解决上述问题。最早的是长短期记忆网络(LSTM)[0],还有其简化变体:门控循环单元(GRU)[1],GRU通常可以提供与LSTM同等效果,并且计算速度快得多