Temporal-Relational Hypergraph Tri-Attention Networks for Stock
Total Page:16
File Type:pdf, Size:1020Kb
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 1 Temporal-Relational Hypergraph Tri-Attention Networks for Stock Trend Prediction Chaoran Cui, Xiaojie Li, Juan Du, Chunyun Zhang, Xiushan Nie, Meng Wang, and Yilong Yin Abstract—Predicting the future price trends of stocks is a trend prediction, which aims to forecast the future price trends challenging yet intriguing problem given its critical role to help of stocks, has received increasing attention due to its potential investors make profitable decisions. In this paper, we present a in helping investors make profitable decisions. Although the collaborative temporal-relational modeling framework for end- to-end stock trend prediction. The temporal dynamics of stocks famous efficient market hypothesis [1] holds a pessimistic is firstly captured with an attention-based recurrent neural view that the future price of a stock is unpredictable with network. Then, different from existing studies relying on the respect to currently available information, continuous research pairwise correlations between stocks, we argue that stocks are works [2]–[4] on stock trend prediction have achieved impres- naturally connected as a collective group, and introduce the sive success in past decades, and provided strong evidence for hypergraph structures to jointly characterize the stock group- wise relationships of industry-belonging and fund-holding. A the predictability of stock markets. novel hypergraph tri-attention network (HGTAN) is proposed A natural solution to stock trend prediction is to regard it as to augment the hypergraph convolutional networks with a hier- a time series modeling problem, for which the autoregressive archical organization of intra-hyperedge, inter-hyperedge, and model and its variants [5] were initially applied to fit the inter-hypergraph attention modules. In this manner, HGTAN stock trends based on the historical price data. Afterwards, adaptively determines the importance of nodes, hyperedges, and hypergraphs during the information propagation among stocks, classic linear models including logistic regression and sup- so that the potential synergies between stock movements can port vector machine (SVM) were frequently adopted as the be fully exploited. Extensive experiments on real-world data predictive models [6]. However, the inherent non-linear and demonstrate the effectiveness of our approach. Also, the results non-stationary nature of stock prices limits the applicability of of investment simulation show that our approach can achieve a these early techniques. With the rise of deep learning, recurrent more desirable risk-adjusted return. The data and codes of our work have been released at https://github.com/lixiaojieff/HGTAN. neural networks (RNNs) [7], [8] and transformer networks [9] have shown promising results in stock trend prediction, owing to their powerful abilities to capture the underlying dynamics Index Terms—Stock trend prediction, stock investment simula- tion, hypergraph convolutional networks, triple attention mech- of the chaotic time series. anism. In another research line, the relationship information be- tween stocks has proven to be highly valuable in improv- ing stock trend prediction. Especially with the popularity of I. INTRODUCTION graph neural networks [10], [11], different stocks and their Or a long time, the stock market has been one of the most relationships are typically viewed as nodes and edges in a F important investment options for both individuals and graph, and the influence between stocks is incorporated via the institutions to chase wealth. As recently reported, the overall node representation learning applied on the graph. Despite the capitalization of major stock markets worldwide has exceeded encouraging progress, existing studies [12], [13] make the pre- 100 trillion U.S. dollars by the first quarter of 20211. Stock dictions on future trends depending mainly on the correlations between pairs of stocks. But in fact, we argue that different This work was supported by the National Natural Science Foundation stocks are naturally connected as a collective group rather than arXiv:2107.14033v1 [q-fin.ST] 22 Jul 2021 of China under Grant 62077033 and Grant 61876098, by the National by pairwise interactions. For example, multiple stocks could Key R&D Program of China under Grant 2018YFC0830100 and Grant 2018YFC0830102, by Shandong Provincial Natural Science Foundation Key belong to the same industry or be held by the same fund, and Project under Grant ZR2020KF015, and by the Fostering Project of Dom- they may thus share common intrinsic properties [14], [15]. inant Discipline and Talent Team of Shandong Province Higher Education Fig. 1 also displays the price volatility patterns of such two Institutions. C. Cui, X. Li, and C. Zhang are with the School of Computer Science groups of stocks within a certain period of time. Obviously, and Technology, Shandong University of Finance and Economics, Jinan the stocks in each group exhibit approximately consistent price 250014, China (e-mail: [email protected]; [email protected]; trends, and the phenomenon suggests the existence of the [email protected]). J. Du is with the School of Finance, Shandong University of Finance and group-wise relationships among stocks. As a result, simply Economics, Jinan 250014, China (e-mail: [email protected]). decomposing the group-wise relationships into pairwise ones X. Nie is with the School of Computer Science and Technology, Shandong may inevitably cause the loss of information. Jianzhu University, Jinan 250101, China (e-mail: [email protected]). M. Wang is with the School of Computer Science and Information Motivated by the above discussions, in this paper, we Engineering, Hefei University of Technology, Hefei 230601, China (email: introduce the hypergraph structures [16] to jointly characterize [email protected]). the group-wise relationships of industry-belonging and fund- Y. Yin is with the School of Software, Shandong University, Jinan 250101, China (e-mail: [email protected]). holding among stocks. A hypergraph is a generalization of 1http://www.businesskorea.co.kr/news/articleView.html?idxno=63985 a simple graph, in which a hyperedge expresses a group- JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 2 1.0 Shanghai Pudong Development Bank based gated recurrent unit (GRU) model. Hua Xia Bank Extensive experiments are carried out on real-world data 0.8 China Construction Bank collected from China’s A-share market, and the results show the superiority of our approach over state-of-the-art methods 0.6 for stock trend prediction. In addition, we simulate the stock investment using the trading strategies based on different meth- 0.4 ods, and the results show that our approach earns significantly 0.2 higher returns with limited downside risk. Finally, detailed Normalized Closing Price ablation studies are performed to investigate the efficacy of 0.0 the key components in our approach. 10/08/2019 10/28/2019 11/17/2019 12/07/2019 12/27/2019 Trading Date In summary, the main contributions of our work are: (a) Daily closing prices of stocks belonging to the bank industry. • We introduce the hypergraph structures to jointly charac- terize the group-wise relationships of industry-belonging and fund-holding for stock trend prediction. 1.0 Haier Smart Home China Jushi • We propose a novel HGTAN consisting of hierarchical 0.8 Weichai Power attention modules to consider the importance of different Jinjiang Hotel nodes, hyperedges, and hypergraphs when guiding the 0.6 information propagation in stock hypergraphs. • We conduct both experimental evaluation and investment 0.4 simulation on real-world data, and the results demonstrate 0.2 the validity and rationality of our approach. Normalized Closing Price The remainder of the paper is organized as follows. Sec- 0.0 tion II reviews the related work. Section III details the 10/08/2019 10/28/2019 11/17/2019 12/07/2019 12/27/2019 Trading Date proposed framework for stock trend prediction. Experimental setups are described in Section IV, and the results and analysis (b) Daily closing prices of constituent stocks of a mutual fund. are reported in Section V. Section VI concludes our work and Fig. 1: Price volatility patterns of two groups of stocks outlines the directions of future research. belonging to the same industry and held by the same fund in China’s A-share market, respectively. II. RELATED WORK In this paper, we first review the existing literature on stock trend prediction. Then, we present a brief overview of the topic wise relationship that links multiple nodes simultaneously. of hypergraph learning, which is closely related to our work. Accordingly, the recently proposed hypergraph convolutional networks (HGCNs) [17], [18] could be easily used for stock representation learning, so that the group-wise relationship in- A. Stock Trend Prediction formation is integrated in stock trend prediction [19]. However, In the early stage, many statistical models such as autore- due to the complexity of the influence process between stocks, gressive integrated moving average (ARIMA) [5] and Kalman HGCNs still face three main problems: 1) It equally treats the filters [20] were widely adopted as solutions to stock trend neighbors of a stock in a hyperedge, and ignores the subtle prediction. Besides, some technical indicators were designed differences of their impacts on the target stock; 2) When a based on stocks’ historical prices and volumes to provide stock is associated with multiple hyperedges, how to choose insights about the future trends [15]. Machine learning tech- proper hyperedge weights remains an open question; and 3) niques like logistic regression and SVM have also shown The industry-belonging and fund-holding relationships result promise for stock trend prediction [6]. The major limitation of in two heterogeneous stock hypergraphs, but it is difficult for these research efforts lies in that they make the premise that HGCNs to effectively coordinate them. the input signals are linear and stationary, regardless of the To address the issues, we propose a hypergraph tri-attention fact that the stock market is a highly volatile dynamic system.