Stock prices forecasting has always been a challenging task. Although many research projects try to address the problem, few of them pay attention to the varying degrees of dependencies between stock prices. In this paper, we introduce a hybrid model that improves the prediction of stock prices by emphasizing the dependencies between adjacent stock prices. The proposed model, ResNLS, is mainly composed of two neural architectures, ResNet and LSTM. ResNet serves as a feature extractor to identify dependencies between stock prices, while LSTM analyzes the initial time series data with the combination of dependencies, which are considered as residuals. Our experiment reveals that when the closing price data for the previous 5 consecutive trading days is used as input, the performance of the model (ResNLS-5) is optimal compared to those with other inputs. Furthermore, ResNLS-5 demonstrates at least a 20% improvement over current state-of-the-art baselines. To verify whether ResNLS-5 can help clients effectively avoid risks and earn profits in the stock market, we construct a quantitative trading framework for back testing. The result shows that the trading strategy based on ResNLS-5 predictions can successfully mitigate losses during declining stock prices and generate profits in periods of rising stock prices. The relevant code is publicly available on GitHub.
翻译:股票价格预测始终是一项具有挑战性的任务。尽管许多研究项目试图解决该问题,但鲜有研究关注股票价格之间不同程度的依赖关系。本文提出一种混合模型,通过强调相邻股票价格之间的依赖关系来改进股票价格预测。所提出的模型ResNLS主要由ResNet和LSTM两种神经架构组成。ResNet作为特征提取器来识别股票价格之间的依赖关系,而LSTM则结合这些被视为残差的依赖关系来分析初始时间序列数据。我们的实验表明,当使用前5个连续交易日的收盘价数据作为输入时,模型(ResNLS-5)的性能相较于其他输入设置达到最优。此外,ResNLS-5相比当前最先进的基线模型至少实现了20%的性能提升。为验证ResNLS-5能否帮助客户在股票市场中有效规避风险并获取收益,我们构建了一个量化交易框架进行回测。结果表明,基于ResNLS-5预测的交易策略能够成功减轻股价下跌期间的损失,并在股价上涨时期产生收益。相关代码已在GitHub上公开。