Research Center for Information Technology Innovation, Academia Sinica, Taipei 10607, Taiwan.
Sensors (Basel). 2021 Nov 29;21(23):7957. doi: 10.3390/s21237957.
Determining the price movement of stocks is a challenging problem to solve because of factors such as industry performance, economic variables, investor sentiment, company news, company performance, and social media sentiment. People can predict the price movement of stocks by applying machine learning algorithms on information contained in historical data, stock candlestick-chart data, and social-media data. However, it is hard to predict stock movement based on a single classifier. In this study, we proposed a multichannel collaborative network by incorporating candlestick-chart and social-media data for stock trend predictions. We first extracted the social media sentiment features using the Natural Language Toolkit and sentiment analysis data from Twitter. We then transformed the stock's historical time series data into a candlestick chart to elucidate patterns in the stock's movement. Finally, we integrated the stock's sentiment features and its candlestick chart to predict the stock price movement over 4-, 6-, 8-, and 10-day time periods. Our collaborative network consisted of two branches: the first branch contained a one-dimensional convolutional neural network (CNN) performing sentiment classification. The second branch included a two-dimensional (2D) CNN performing image classifications based on 2D candlestick chart data. We evaluated our model for five high-demand stocks (Apple, Tesla, IBM, Amazon, and Google) and determined that our collaborative network achieved promising results and compared favorably against single-network models using either sentiment data or candlestick charts alone. The proposed method obtained the most favorable performance with 75.38% accuracy for Apple stock. We also found that the stock price prediction achieved more favorable performance over longer periods of time compared with shorter periods of time.
确定股票价格走势是一个具有挑战性的问题,因为有行业表现、经济变量、投资者情绪、公司新闻、公司业绩和社交媒体情绪等因素。人们可以通过在历史数据、股票蜡烛图数据和社交媒体数据中应用机器学习算法来预测股票价格走势。然而,仅基于单个分类器很难预测股票走势。在这项研究中,我们提出了一种多通道协作网络,该网络将蜡烛图和社交媒体数据结合起来进行股票趋势预测。我们首先使用自然语言工具包提取社交媒体情绪特征,并从 Twitter 提取情绪分析数据。然后,我们将股票的历史时间序列数据转换为蜡烛图,以阐明股票走势的模式。最后,我们整合了股票的情绪特征及其蜡烛图,以预测股票在 4、6、8 和 10 天时间段内的价格走势。我们的协作网络由两个分支组成:第一个分支包含一维卷积神经网络(CNN)执行情绪分类。第二个分支包括二维(2D)CNN,根据 2D 蜡烛图数据执行图像分类。我们评估了我们的模型对于五支高需求股票(苹果、特斯拉、IBM、亚马逊和谷歌),并确定我们的协作网络取得了有希望的结果,并与仅使用情绪数据或蜡烛图的单一网络模型相比具有优势。该方法在苹果股票上获得了最有利的 75.38%的准确率。我们还发现,与短期相比,股票价格预测在较长时间内的表现更有利。