Research article Special Issues

MSGraph: Modeling multi-scale K-line sequences with graph attention network for profitable indices recommendation

  • Received: 30 December 2022 Revised: 13 February 2023 Accepted: 01 March 2023 Published: 09 March 2023
  • Indices recommendation is a long-standing topic in stock market investment. Predicting the future trends of indices and ranking them based on the prediction results is the main scheme for indices recommendation. How to improve the forecasting performance is the central issue of this study. Inspired by the widely used trend-following investing strategy in financial investment, the indices' future trends are related to not only the nearby transaction data but also the long-term historical data. This article proposes the MSGraph, which tries to improve the index ranking performance by modeling the correlations of short and long-term historical embeddings with the graph attention network. The original minute-level transaction data is first synthesized into a series of K-line sequences with varying time scales. Each K-line sequence is input into a long short-term memory network (LSTM) to get the sequence embedding. Then, the embeddings for all indices with the same scale are fed into a graph convolutional network to achieve index aggregation. All the aggregated embeddings for the same index are input into a graph attention network to fuse the scale interactions. Finally, a fully connected network produces the index return ratio for the next day, and the recommended indices are obtained through ranking. In total, 60 indices in the Chinese stock market are selected as experimental data. The mean reciprocal rank, precision, accuracy and investment return ratio are used as evaluation metrics. The comparison results show that our method achieves state-of-the-art results in all evaluation metrics, and the ablation study also demonstrates that the combination of multiple scale K-lines facilitates the indices recommendation.

    Citation: Changhai Wang, Jiaxi Ren, Hui Liang. MSGraph: Modeling multi-scale K-line sequences with graph attention network for profitable indices recommendation[J]. Electronic Research Archive, 2023, 31(5): 2626-2650. doi: 10.3934/era.2023133

    Related Papers:

  • Indices recommendation is a long-standing topic in stock market investment. Predicting the future trends of indices and ranking them based on the prediction results is the main scheme for indices recommendation. How to improve the forecasting performance is the central issue of this study. Inspired by the widely used trend-following investing strategy in financial investment, the indices' future trends are related to not only the nearby transaction data but also the long-term historical data. This article proposes the MSGraph, which tries to improve the index ranking performance by modeling the correlations of short and long-term historical embeddings with the graph attention network. The original minute-level transaction data is first synthesized into a series of K-line sequences with varying time scales. Each K-line sequence is input into a long short-term memory network (LSTM) to get the sequence embedding. Then, the embeddings for all indices with the same scale are fed into a graph convolutional network to achieve index aggregation. All the aggregated embeddings for the same index are input into a graph attention network to fuse the scale interactions. Finally, a fully connected network produces the index return ratio for the next day, and the recommended indices are obtained through ranking. In total, 60 indices in the Chinese stock market are selected as experimental data. The mean reciprocal rank, precision, accuracy and investment return ratio are used as evaluation metrics. The comparison results show that our method achieves state-of-the-art results in all evaluation metrics, and the ablation study also demonstrates that the combination of multiple scale K-lines facilitates the indices recommendation.



    加载中


    [1] R. D. Edwards, J. Magee, W. C. Bassetti, Technical Analysis of Stock Trends, CRC press, 2018. https://doi.org/10.4324/9781315115719
    [2] Y. Wang, Y. Guo, Forecasting method of stock market volatility in time series data based on mixed model of arima and xgboost, China Commun., 17 (2020), 205–221. https://doi.org/10.23919/JCC.2020.03.017 doi: 10.23919/JCC.2020.03.017
    [3] S. Barra, S. M. Carta, A. Corriga, A. S. Podda, D. R. Recupero, Deep learning and time series-to-image encoding for financial forecasting, IEEE/CAA J. Autom. Sin., 7 (2020), 683–692. https://doi.org/10.1109/jas.2020.1003132 doi: 10.1109/jas.2020.1003132
    [4] Y. Zhou, H. Zheng, X. Huang, S. Hao, D. Li, J. Zhao, Graph neural networks: Taxonomy, advances, and trends, ACM Trans. Intell. Syst. Technol., 13 (2022), 1–54. https://doi.org/10.1145/3495161 doi: 10.1145/3495161
    [5] F. Feng, X. He, X. Wang, C. Luo, Y. Liu, T. S. Chua, Temporal relational ranking for stock prediction, ACM Trans. Inf. Syst., 37 (2019), 1–30. https://doi.org/10.1145/3309547 doi: 10.1145/3309547
    [6] Y. L. Hsu, Y. C. Tsai, C. T. Li, Fingat: Financial graph attention networks for recommending top-k profitable stocks, IEEE Trans. Knowl. Data Eng., 35 (2021), 469–481. https://doi.org/10.1109/tkde.2021.3079496 doi: 10.1109/tkde.2021.3079496
    [7] X. Ma, T. Zhao, Q. Guo, X. Li, C. Zhang, Fuzzy hypergraph network for recommending top-k profitable stocks, Inf. Sci., 613 (2022), 239–255. https://doi.org/10.1016/j.ins.2022.09.010 doi: 10.1016/j.ins.2022.09.010
    [8] C. Wang, H. Liang, B. Wang, X. Cui, Y. Xu, Mg-conv: A spatiotemporal multi-graph convolutional neural network for stock market index trend prediction, Comput. Electr. Eng., 103 (2022), 108285. https://doi.org/10.1016/j.compeleceng.2022.108285 doi: 10.1016/j.compeleceng.2022.108285
    [9] W. Chen, M. Jiang, W. G. Zhang, Z. Chen, A novel graph convolutional feature based convolutional neural network for stock trend prediction, Inf. Sci., 556 (2021), 67–94. https://doi.org/10.1016/j.ins.2020.12.068 doi: 10.1016/j.ins.2020.12.068
    [10] R. Bisoi, P. K. Dash, A hybrid evolutionary dynamic neural network for stock market trend analysis and prediction using unscented kalman filter, Appl. Soft Comput., 19 (2014), 41–56. https://doi.org/10.1016/j.asoc.2014.01.039 doi: 10.1016/j.asoc.2014.01.039
    [11] S. Li, X. Jiang, J. Wu, L. Tong, K. Xu, Detection of mutual exciting structure in stock price trend dynamics, Entropy, 23 (2021), 1411. https://doi.org/10.3390/e23111411 doi: 10.3390/e23111411
    [12] L. Cao, Ai in finance: Challenges, techniques, and opportunities, ACM Comput. Surv., 55 (2022), 1–38. https://doi.org/10.1145/3502289
    [13] L. Wang, F. Ma, J. Liu, L. Yang, Forecasting stock price volatility: New evidence from the garch-midas model, Int. J. Forecasting, 36 (2020), 684–694. https://doi.org/10.1016/j.ijforecast.2019.08.005 doi: 10.1016/j.ijforecast.2019.08.005
    [14] R. A. Kamble, Short and long term stock trend prediction using decision tree, in 2017 International Conference on Intelligent Computing and Control Systems, IEEE, (2017), 1371–1375. https://doi.org/10.1109/ICCONS.2017.8250694
    [15] N. I. Sapankevych, R. Sankar, Time series prediction using support vector machines: a survey, IEEE Comput. Intell. Mag., 4 (2009), 24–38. https://doi.org/10.1109/mci.2009.932254 doi: 10.1109/mci.2009.932254
    [16] P. Shahbaz, B. Ahmad, E. Atani Reza, J. Moghaddam Jalal, Stock market forecasting using artificial neural networks, Eur. Online J. Nat. Social Sci. Proc., 2 (2014), 2404–2411.
    [17] M. Zolfaghari, S. Gholami, A hybrid approach of adaptive wavelet transform, long short-term memory and arima-garch family models for the stock index prediction, Expert Syst. Appl., 182 (2021), 115149. https://doi.org/10.1016/j.eswa.2021.115149 doi: 10.1016/j.eswa.2021.115149
    [18] K. K. Yun, S. W. Yoon, D. Won, Prediction of stock price direction using a hybrid ga-xgboost algorithm with a three-stage feature engineering process, Expert Syst. Appl., 186 (2021), 115716. https://doi.org/10.1016/j.eswa.2021.115716 doi: 10.1016/j.eswa.2021.115716
    [19] S. Pouyanfar, S. Sadiq, Y. Yan, H. Tian, Y. Tao, M. P. Reyes, et al., A survey on deep learning: Algorithms, techniques, and applications, ACM Comput. Surv., 51 (2018), 1–36. https://doi.org/10.1145/3234150 doi: 10.1145/3234150
    [20] E. Chong, C. Han, F. C. Park, Deep learning networks for stock market analysis and prediction: Methodology, data representations, and case studies, Expert Syst. Appl., 83 (2017), 187–205. https://doi.org/10.1016/j.eswa.2017.04.030 doi: 10.1016/j.eswa.2017.04.030
    [21] J. Duchi, E. Hazan, Y. Singer, Adaptive subgradient methods for online learning and stochastic optimization, J. Mach. Learn. Res., 12 (2011), 2121–2159.
    [22] M. D. Zeiler, Adadelta: an adaptive learning rate method, arXiv preprint, arXiv: 1212.5701. https://doi.org/10.48550/arXiv.1212.5701
    [23] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, arXiv preprint, arXiv: 1412.6980. https://doi.org/10.48550/arXiv.1412.6980
    [24] A. Bose, C. H. Hsu, S. S. Roy, K. C. Lee, B. Mohammadi-ivatloo, S. Abimannan, Forecasting stock price by hybrid model of cascading multivariate adaptive regression splines and deep neural network, Comput. Electr. Eng., 95 (2021), 107405. https://doi.org/10.1016/j.compeleceng.2021.107405 doi: 10.1016/j.compeleceng.2021.107405
    [25] O. B. Sezer, A. M. Ozbayoglu, Algorithmic financial trading with deep convolutional neural networks: Time series to image conversion approach, Appl. Soft Comput., 70 (2018), 525–538. https://doi.org/10.1016/j.asoc.2018.04.024 doi: 10.1016/j.asoc.2018.04.024
    [26] X. Zhang, N. Gu, J. Chang, H. Ye, Predicting stock price movement using a dbn-rnn, Appl. Artif. Intell., 35 (2021), 876–892. https://doi.org/10.1080/08839514.2021.1942520 doi: 10.1080/08839514.2021.1942520
    [27] D. Fister, M. Perc, T. Jagrič, Two robust long short-term memory frameworks for trading stocks, Artif. Intell., 51 (2021), 7177–7195. https://doi.org/10.1007/s10489-021-02249-x doi: 10.1007/s10489-021-02249-x
    [28] H. He, S. Dai, A prediction model for stock market based on the integration of independent component analysis and multi-lstm, Electron. Res. Arch., 30 (2022), 3855–3871. https://doi.org/10.3934/era.2022196 doi: 10.3934/era.2022196
    [29] C. Wang, Y. Chen, S. Zhang, Q. Zhang, Stock market index prediction using deep transformer model, Expert Syst. Appl., 208 (2022), 118128. https://doi.org/10.1016/j.eswa.2022.118128 doi: 10.1016/j.eswa.2022.118128
    [30] R. Zhang, Z. Yuan, X. Shao, A new combined cnn-rnn model for sector stock price analysis, in 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC), IEEE, (2018), 546–551. https://doi.org/10.1109/COMPSAC.2018.10292
    [31] W. Lu, J. Li, J. Wang, L. Qin, A cnn-bilstm-am method for stock price prediction, Neural Comput. Appl., 33 (2021), 4741–4753. https://doi.org/10.1007/s00521-020-05532-z doi: 10.1007/s00521-020-05532-z
    [32] A. F. Kamara, E. Chen, Z. Pan, An ensemble of a boosted hybrid of deep learning models and technical analysis for forecasting stock prices, Inf. Sci., 594 (2022), 1–19. https://doi.org/10.1016/j.ins.2022.02.015 doi: 10.1016/j.ins.2022.02.015
    [33] W. Jiang, J. Luo, Graph neural network for traffic forecasting: A survey, Expert Syst. Appl., 207 (2022), 117921. https://doi.org/10.1016/j.eswa.2022.117921 doi: 10.1016/j.eswa.2022.117921
    [34] L. Wu, Y. Chen, K. Shen, X. Guo, H. Gao, S. Li, et al., Graph neural networks for natural language processing: A survey, arXiv preprint, arXiv: 2106.06090. https://doi.org/10.48550/arXiv.2106.06090
    [35] W. Liao, B. Bak-Jensen, J. R. Pillai, Y. Wang, Y. Wang, A review of graph neural networks and their applications in power systems, J. Mod. Power Syst. Clean Energy, 10 (2021), 345–360. https://doi.org/10.35833/MPCE.2021.000058 doi: 10.35833/MPCE.2021.000058
    [36] J. Wu, K. Xu, X. Chen, S. Li, J. Zhao, Price graphs: Utilizing the structural information of financial time series for stock prediction, Inf. Sci., 588 (2022), 405–424. https://doi.org/10.1016/j.ins.2021.12.089 doi: 10.1016/j.ins.2021.12.089
    [37] S. Li, J. Wu, X. Jiang, K. Xu, Chart gcn: Learning chart information with a graph convolutional network for stock movement prediction, Knowledge-Based Syst., 248 (2022), 108842. https://doi.org/10.1016/j.knosys.2022.108842 doi: 10.1016/j.knosys.2022.108842
    [38] R. Cheng, Q. Li, Modeling the momentum spillover effect for stock prediction via attribute-driven graph attention networks, in Proceedings of the AAAI Conference on Artificial Intelligence, AAAI, (2021), 55–62. https://doi.org/10.1609/aaai.v35i1.16077
    [39] T. Yin, C. Liu, F. Ding, Z. Feng, B. Yuan, N. Zhang, Graph-based stock correlation and prediction for high-frequency trading systems, Pattern Recognit., 122 (2022), 108209. https://doi.org/10.1016/j.patcog.2021.108209 doi: 10.1016/j.patcog.2021.108209
    [40] W. Li, R. Bao, K. Harimoto, D. Chen, J. Xu, Q. Su, Modeling the stock relation with graph network for overnight stock movement prediction, in Proceedings of the Twenty-Ninth International Conference on International Joint Conferences on Artificial Intelligence, ACM, (2021), 4541–4547. https://doi.org/10.24963/ijcai.2020/626
    [41] S. Feng, C. Xu, Y. Zuo, G. Chen, F. Lin, J. XiaHou, Relation-aware dynamic attributed graph attention network for stocks recommendation, Pattern Recognit., 121 (2022), 108119. https://doi.org/10.1016/j.patcog.2021.108119 doi: 10.1016/j.patcog.2021.108119
    [42] C. Xu, H. Huang, X. Ying, J. Gao, Z. Li, P. Zhang, et al., Hgnn: Hierarchical graph neural network for predicting the classification of price-limit-hitting stocks, Inf. Sci., 607 (2022), 783–798. https://doi.org/10.1016/j.ins.2022.06.010 doi: 10.1016/j.ins.2022.06.010
    [43] H. Wang, T. Wang, S. Li, J. Zheng, S. Guan, W. Chen, Adaptive long-short pattern transformer for stock investment selection, In Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, (2022), 3970–3977. https://doi.org/10.24963/ijcai.2022/551
    [44] Y. S. Jeong, M. K. Jeong, O. A. Omitaomu, Weighted dynamic time warping for time series classification, Pattern Recognit., 44 (2011), 2231–2240. https://doi.org/10.1016/j.patcog.2010.09.022 doi: 10.1016/j.patcog.2010.09.022
    [45] Z. Zheng, K. Chen, G. Sun, H. Zha, A regression framework for learning ranking functions using relative relevance judgments, in Proceedings of the 30th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, ACM, (2007), 287–294. https://doi.org/10.1145/1277741.1277792
    [46] J. Luo, G. Zhu, H. Xiang, Artificial intelligent based day-ahead stock market profit forecasting, Comput. Electr. Eng., 99 (2022), 107837. https://doi.org/10.1016/j.compeleceng.2022.107837 doi: 10.1016/j.compeleceng.2022.107837
    [47] L. Zhang, C. Aggarwal, G. J. Qi, Stock price prediction via discovering multi-frequency trading patterns, in Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, ACM, (2017), 2141–2149. https://doi.org/10.1145/3097983.3098117
  • Reader Comments
  • © 2023 the Author(s), licensee AIMS Press. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0)
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Metrics

Article views(953) PDF downloads(70) Cited by(0)

Article outline

Figures and Tables

Figures(9)  /  Tables(4)

Other Articles By Authors

/

DownLoad:  Full-Size Img  PowerPoint
Return
Return

Catalog