Skip to main content
Log in

Improving stock trend prediction with pretrain multi-granularity denoising contrastive learning

  • Regular Paper
  • Published:
Knowledge and Information Systems Aims and scope Submit manuscript

Abstract

Stock trend prediction (STP) aims to predict price fluctuation, which is critical in financial trading. The existing STP approaches only use market data with the same granularity (e.g., as daily market data). However, in the actual financial investment, there are a large number of more detailed investment signals contained in finer-grained data (e.g., high-frequency data). This motivates us to research how to leverage multi-granularity market data to capture more useful information and improve the accuracy in the task of STP. However, the effective utilization of multi-granularity data presents a major challenge. Firstly, the iteration of multi-granularity data with time will lead to more complex noise, which is difficult to extract signals. Secondly, the difference in granularity may lead to opposite target trends in the same time interval. Thirdly, the target trends of stocks with similar features can be quite different, and different sizes of granularity will aggravate this gap. In order to address these challenges, we present a self-supervised framework of multi-granularity denoising contrastive learning (MDC). Specifically, we construct a dynamic dictionary of memory, which can obtain clear and unified representations by filtering noise and aligning multi-granularity data. Moreover, we design two contrast learning modules during the fine-tuning stage to solve the differences in trends by constructing additional self-supervised signals. Besides, in the pre-training stage, we design the granularity domain adaptation module (GDA) to address the issues of temporal inconsistency and data imbalance associated with different granularity in financial data, alongside the memory self-distillation module (MSD) to tackle the challenge posed by a low signal-to-noise ratio. The GDA alleviates these complications by replacing a portion of the coarse-grained data with the preceding time step’s fine-grained data, while the MSD seeks to filter out intrinsic noise by aligning the fine-grained representations with the coarse-grained representations’ distribution using a self-distillation mechanism. Extensive experiments on the CSI 300 and CSI 100 datasets show that our framework stands out from the existing top-level systems and has excellent profitability in real investing scenarios.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Algorithm 1
Fig. 6
Fig. 7

Similar content being viewed by others

References

  1. Wang M, Chen F, Guo J, Jia W (2023) Improving stock trend prediction with multi-granularity denoising contrastive learning. In: International joint conference on neural networks (IJCNN). https://doi.org/10.1109/IJCNN54540.2023.10191523

  2. Jiang W (2021) Applications of deep learning in stock market prediction: recent progress. Expert Syst Appl 184:115537

    Article  Google Scholar 

  3. Chen Y, Wei Z, Huang X (2018) Incorporating corporation relationship via graph convolutional neural networks for stock price prediction. In: Proceedings of the 27th ACM international conference on information and knowledge management, pp 1655–1658

  4. Keogh E, Lin J (2005) Clustering of time-series subsequences is meaningless: implications for previous and future research. Knowl Inf Syst 8:154–177

    Article  Google Scholar 

  5. Chen C, Zhao L, Bian J, Xing C, Liu T-Y (2019) Investment behaviors can tell what inside: exploring stock intrinsic properties for stock trend prediction. In: Proceedings of the 25th ACM SIGKDD, pp 2376–2384

  6. Yang Y, Wei Z, Chen Q, Wu L (2019) Using external knowledge for financial event prediction based on graph neural networks. In: Proceedings of the 28th ACM international conference on information and knowledge management, pp 2161–2164

  7. Liu H, Lin Y, Han J (2011) Methods for mining frequent items in data streams: an overview. Knowl Inf Syst 26:1–30

    Article  Google Scholar 

  8. Kadiyala S, Shiri N (2008) A compact multi-resolution index for variable length queries in time series databases. Knowl Inf Syst 15:131–147

    Article  Google Scholar 

  9. You J, Han T, Shen L (2022) From uniform models to generic representations: stock return prediction with pre-training. In: International joint conference on neural networks (IJCNN), pp 1–8

  10. Liu R, Wang F, He M, Jiao L (2019) An adjustable fuzzy classification algorithm using an improved multi-objective genetic strategy based on decomposition for imbalance dataset. Knowl Inf Syst 61:1583–1605

    Article  Google Scholar 

  11. Basu S, Meckesheimer M (2007) Automatic outlier detection for time series: an application to sensor data. Knowl Inf Syst 11:137–154

    Article  Google Scholar 

  12. Kargupta H, Datta S, Wang Q, Sivakumar K (2005) Random-data perturbation techniques and privacy-preserving data mining. Knowl Inf Syst 7:387–414

    Article  Google Scholar 

  13. Hou M, Xu C, Li Z, Liu Y, Liu W, Chen E, Bian J (2022) Multi-granularity residual learning with confidence estimation for time series prediction. In: Proceedings of the ACM web conference 2022, pp 112–121

  14. Chen C-H, Lu C-Y, Lin C-B (2020) An intelligence approach for group stock portfolio optimization with a trading mechanism. Knowl Inf Syst 62:287–316

    Article  Google Scholar 

  15. Hou M, Xu C, Liu Y, Liu W, Bian J, Wu L, Li Z, Chen E, Liu T-Y (2021) Stock trend prediction with multi-granularity data: a contrastive learning approach with adaptive fusion. In: Proceedings of the 30th ACM international conference on information and knowledge management, pp 700–709

  16. De Long JB, Shleifer A, Summers LH, Waldmann RJ (1990) Noise trader risk in financial markets. J Polit Econ 98(4):703–738

    Article  Google Scholar 

  17. Scharfstein DS, Stein JC (2000) The dark side of internal capital markets: divisional rent-seeking and inefficient investment. J Finance 55(6):2537–2564

    Article  Google Scholar 

  18. Moraffah R, Sheth P, Karami M, Bhattacharya A, Wang Q, Tahir A, Raglin A, Liu H (2021) Causal inference for time series analysis: problems, methods and evaluation. Knowl Inf Syst 63:3041–3085

    Article  Google Scholar 

  19. Fathalla A, Salah A, Li K, Li K, Francesco P (2020) Deep end-to-end learning for price prediction of second-hand items. Knowl Inf Syst 62:4541–4568

    Article  Google Scholar 

  20. Chen J, Yang S, Zhang D, Nanehkaran YA (2021) A turning point prediction method of stock price based on RVFL-GMDH and chaotic time series analysis. Knowl Inf Syst 63(10):2693–2718

    Article  Google Scholar 

  21. Zhang X, Li Y, Wang S, Fang B, Yu PS (2019) Enhancing stock market prediction with extended coupled hidden Markov model over multi-sourced data. Knowl Inf Syst 61:1071–1090

    Article  Google Scholar 

  22. Özorhan MO, Toroslu İH, Şehitoğlu OT (2019) Short-term trend prediction in financial time series data. Knowl Inf Syst 61:397–429

    Article  Google Scholar 

  23. Zhu X, Wu X, Yang Y (2006) Effective classification of noisy data streams with attribute-oriented dynamic classifier selection. Knowl Inf Syst 9:339–363

    Article  Google Scholar 

  24. Jia Y, Zhang J, Huan J (2011) An efficient graph-mining method for complicated and noisy data with real-world applications. Knowl Inf Syst 28:423–447

    Article  Google Scholar 

  25. Prati RC, Luengo J, Herrera F (2019) Emerging topics and challenges of learning from noisy data in nonstandard classification: a survey beyond binary class noise. Knowl Inf Syst 60:63–97

    Article  Google Scholar 

  26. Henrique BM, Sobreiro VA, Kimura H (2019) Literature review: machine learning techniques applied to financial market prediction. Expert Syst Appl 124:226–251

    Article  Google Scholar 

  27. Soni P, Tewari Y, Krishnan D (2022) Machine learning approaches in stock price prediction: a systematic review. J Phys Conf Ser 2161:012065

    Article  Google Scholar 

  28. Sun L, Zhang K, Ji F, Yang Z (2019) TOI-CNN: a solution of information extraction on Chinese insurance policy. In: Proceedings of the NAACL-HLT 2019, 174–181. Association for Computational Linguistics, Minneapolis, Minnesota

  29. Zhang K, Yao Y, Xie R, Han X, Liu Z, Lin F, Lin L, Sun M (2021) Open hierarchical relation extraction. In: Proceedings of the 2021 conference of the North American chapter of the Association for Computational Linguistics: Human Language Technologies, pp 5682–5693

  30. Rather AM, Agarwal A, Sastry V (2015) Recurrent neural network and a hybrid model for prediction of stock returns. Expert Syst Appl 42(6):3234–3241

    Article  Google Scholar 

  31. Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780

    Article  Google Scholar 

  32. Chung J, Gulcehre C, Cho K, Bengio Y (2014) Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555

  33. Feng F, Chen H, He X, Ding J, Sun M, Chua T-S (2019) Enhancing stock movement prediction with adversarial training. In: IJCAI, pp 5843–5849

  34. Ding Q, Wu S, Sun H, Guo J, Guo J (2020) Hierarchical multi-scale Gaussian transformer for stock movement prediction. In: 2020 international joint conference on artificial intelligence (IJCAI), pp 4640–4646

  35. Wu F, Chen F, Jing X-Y, Hu C-H, Ge Q, Ji Y (2020) Dynamic attention network for semantic segmentation. Neurocomputing 384:182–191

    Article  Google Scholar 

  36. Chen F, Wu F, Gao G, Ji Y, Xu J, Jiang G-P, Jing X-Y (2022) Jspnet: learning joint semantic & instance segmentation of point clouds via feature self-similarity and cross-task probability. Pattern Recognit 122:108250

    Article  Google Scholar 

  37. Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, Ye Q, Liu T-Y (2017) Lightgbm: a highly efficient gradient boosting decision tree. In: Advances in neural information processing systems, vol 30

  38. Casanova PVGCA, Lio ARP, Bengio Y (2018) Graph attention networks. In: ICLR

  39. Xu W, Liu W, Wang L, Xia Y, Bian J, Yin J, Liu T-Y (2021) Hist: a graph-based framework for stock trend forecasting via mining concept-oriented shared information. arXiv preprint arXiv:2110.13716

  40. Yang Y, Chen F, Wu F, Zeng D, Ji Y-M, Jing X-Y (2020) Multi-view semantic learning network for point cloud based 3d object detection. Neurocomputing 397:477–485

    Article  Google Scholar 

  41. Chen F, Wu F, Xu J, Gao G, Ge Q, Jing X-Y (2021) Adaptive deformable convolutional network. Neurocomputing 453:853–864

    Article  Google Scholar 

  42. Chen T, Kornblith S, Norouzi M, Hinton G (2020) A simple framework for contrastive learning of visual representations. In: International conference on machine learning (ICML). PMLR, pp 1597–1607

  43. Pöppelbaum J, Chadha GS, Schwung A (2022) Contrastive learning based self-supervised time-series analysis. Appl Soft Comput 117:108397

    Article  Google Scholar 

  44. Du Y, Li Q, Zhang Z, Liu Y (2022) Stock volatility forecast base on comparative learning and autoencoder framework. In: The 5th international conference on machine vision and applications (ICMVA), pp 99–103

  45. Zhu M, Pan P, Chen W, Yang Y (2019) Dm-gan: dynamic memory generative adversarial networks for text-to-image synthesis. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp 5802–5810

  46. Wang M, Zhang M, Guo J, Jia W (2022) Mtmd: multi-scale temporal memory learning and efficient debiasing framework for stock trend forecasting. arXiv preprint arXiv:2212.08656

  47. Gowthul Alam M, Baulkani S (2019) Local and global characteristics-based kernel hybridization to increase optimal support vector machine performance for stock market prediction. Knowl Inf Syst 60(2):971–1000

    Article  Google Scholar 

  48. Voelker A, Kajić I, Eliasmith C (2019) Legendre memory units: continuous-time representation in recurrent neural networks. In: Wallach H, Larochelle H, Beygelzimer A, Alché-Buc F, Fox E, Garnett R (eds) Advances in neural information processing systems, vol 32

  49. Bulatov A, Kuratov Y, Burtsev M (2022) Recurrent memory transformer. In: Koyejo S, Mohamed S, Agarwal A, Belgrave D, Cho K, Oh A (eds) Advances in neural information processing systems, vol 35, pp 11079–11091

  50. Hu Z, Liu W, Bian J, Liu X, Liu T-Y (2018) Listening to chaotic whispers: a deep learning framework for news-oriented stock trend prediction. In: Proceedings of the eleventh ACM international conference on web search and data mining, pp 261–269

  51. Schroff F, Kalenichenko D, Philbin J (2015) Facenet: a unified embedding for face recognition and clustering. In: Proceedings of the IEEE conference on CVPR

  52. Oord Avd, Li Y, Vinyals O (2018) Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748

  53. Luo Y, Wong Y, Kankanhalli M, Zhao Q (2020) \({\cal{G} }\) -softmax: Improving intraclass compactness and interclass separability of features. IEEE Trans Neural Netw Learn Syst 31(2):685–699

    Article  Google Scholar 

  54. Wang C, Murgulov Z, Haman J (2015) Impact of changes in the CSI 300 index constituents. Emerg Mark Rev 24:13–33

    Article  Google Scholar 

  55. Wang X, Wang X, Li B, Bai Z (2020) The nonlinear characteristics of Chinese stock index futures yield volatility: based on the high frequency data of csi300 stock index futures. China Finance Rev Int 10(2):175–196

    Article  Google Scholar 

  56. Bai M-Y, Zhu H-B (2010) Power law and multiscaling properties of the Chinese stock market. Phys A Stat Mech Its Appl 389(9):1883–1890

    Article  Google Scholar 

  57. Yang X, Liu W, Zhou D, Bian J, Liu T-Y (2020) Qlib: an AI-oriented quantitative investment platform. arXiv preprint arXiv:2009.11189

  58. Akiba T, Sano S, Yanase T, Ohta, T, Koyama M (2019) Optuna: a next-generation hyperparameter optimization framework. In: Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery and data mining

Download references

Author information

Authors and Affiliations

Authors

Contributions

MW contributed to the idea, method, and writing; SW performed the experiment; JG contributed to the method, writing, and supervising; WJ contributed to writing and supervising.

Corresponding authors

Correspondence to Jianxiong Guo or Weijia Jia.

Ethics declarations

Conflict of interest

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This work is an extended version of the paper [1], which has been presented at the International Joint Conference on Neural Networks (IJCNN 2023), Queensland, Australia. The source code can be found in https://github.com/MingjieWang0606/MDC_IJCNN. This work was supported in part by the Guangdong Key Lab of AI and Multi-modal Data Processing, BNU-HKBU United International College (UIC) under Grant 2020KSYS007 sponsored by Guangdong Provincial Department of Education; the National Natural Science Foundation of China (NSFC) under Grant 61872239 & 62202055; the Interdisciplinary Incubation Project of Beijing Normal University under Grant 310430014; the Institute of Artificial Intelligence and Future Networks (BNU-Zhuhai) and Engineering Center of AI and Future Education, Guangdong Provincial Department of Science and Technology, China; the Zhuhai Science-Tech Innovation Bureau under Grants ZH22017001210119PWC & 28712217900001; and the Interdisciplinary Intelligence SuperComputer Center of Beijing Normal University (Zhuhai).

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wang, M., Wang, S., Guo, J. et al. Improving stock trend prediction with pretrain multi-granularity denoising contrastive learning. Knowl Inf Syst 66, 2439–2466 (2024). https://doi.org/10.1007/s10115-023-02006-1

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10115-023-02006-1

Keywords

Navigation