Abstract
In order to improve the accuracy of stock prediction, people major in computer science and technology begin to apply their techniques to the financial market. In the financial market, there are many similar but not simultaneous fluctuations caused by different reaction efficiencies to the same event. Therefore, quickly reflected stocks’ trends could improve trend predictions of similar slowly reflected stocks. To find the temporal correlation between stocks in the same securities exchange, a financial time series classification approach based on aligning change points is proposed to help investors discover hidden temporal correlations, which could improve stock trend prediction, to adjust portfolios. Firstly, the securities index of the securities exchange is chosen to be the benchmark, and the important change points are screened out to mark the essential fluctuations. Secondly, the points of all the constituent stocks of the same securities index which could be aligned to the important change points of the index are screened out and aligned through the aligning algorithm. Then the number of aligned stocks’ points in different types helps to divide stocks into lead class and lag class. Temporal correlation and time difference are obtained through the temporal correlation analysis algorithm. Finally, four different prediction models are used to verify whether the classification information and time difference obtained from temporal correlation analysis could improve the stock trend prediction. The results show that our work could reveal potential connections among stocks as a bridge to introduce valid exogenous information, which is promising for stock trend prediction studies.
This is a preview of subscription content, access via your institution.









Data availability
The stock data used in this article is collected by Tushare Pro (https://tushare.pro/).
Code availability
All code was written in Python.
References
Alhnaity B, Abbod M (2020) A new hybrid financial time series prediction model. Eng Appl Artif Intell 95:103873. https://doi.org/10.1016/j.engappai.2020.103873
Bhandari HN, Rimal B, Pokhrel NR et al (2022) Predicting stock market index using LSTM. Mach Learn with Appl 9:100320. https://doi.org/10.1016/j.mlwa.2022.100320
Bi X, Zhang C, Wang F et al (2022) An uncertainty-based neural network for explainable trajectory segmentation. ACM Trans Intell Syst Technol 13:1–18. https://doi.org/10.1145/3467978
Chen W, Jiang M, Zhang WG, Chen Z (2021) A novel graph convolutional feature based convolutional neural network for stock trend prediction. Inf Sci (NY) 556:67–94. https://doi.org/10.1016/j.ins.2020.12.068
Dang HV, Lin M (2016) Herd mentality in the stock market: on the role of idiosyncratic participants with heterogeneous information. Int Rev Financ Anal 48:247–260. https://doi.org/10.1016/j.irfa.2016.10.005
Du J, Rada R (2018) A semantic-based, distance-proportional mutation for stock classification. Expert Syst Appl 95:212–223. https://doi.org/10.1016/j.eswa.2017.11.029
Efendi R, Arbaiy N, Deris MM (2018) A new procedure in stock market forecasting based on fuzzy random auto-regression time series model. Inf Sci (ny) 441:113–132. https://doi.org/10.1016/j.ins.2018.02.016
Hájek P (2018) Combining bag-of-words and sentiment features of annual reports to predict abnormal stock returns. Neural Comput Appl 29:343–358. https://doi.org/10.1007/s00521-017-3194-2
He J, Shang P (2017) Comparison of transfer entropy methods for financial time series. Phys A Stat Mech Its Appl 482:772–785. https://doi.org/10.1016/j.physa.2017.04.089
Huang Y, Mao X, Deng Y (2021) Natural visibility encoding for time series and its application in stock trend prediction. Knowl-Based Syst 232:107478. https://doi.org/10.1016/j.knosys.2021.107478
Iwana BK, Frinken V, Uchida S (2020) DTW-NN: A novel neural network for time series recognition using dynamic alignment between inputs and weights. Knowl-Based Syst 188:104971. https://doi.org/10.1016/j.knosys.2019.104971
Jazayeri S, Saghafi A, Esmaeili S, Tsokos CP (2019) Automatic object detection using dynamic time warping on ground penetrating radar signals. Expert Syst Appl 122:102–107. https://doi.org/10.1016/j.eswa.2018.12.057
Jiang M, Liu J, Zhang L, Liu C (2020a) An improved Stacking framework for stock index prediction by leveraging tree-based ensemble models and deep learning algorithms. Phys A Stat Mech Its Appl 541:122272. https://doi.org/10.1016/j.physa.2019.122272
Jiang Y, Qi Y, Wang WK et al (2020b) EventDTW: An improved dynamic time warping algorithm for aligning biomedical signals of nonuniform sampling frequencies. Sensors (switzerland). https://doi.org/10.3390/s20092700
Kenji Iwana B, Uchida S (2020) Time series classification using local distance-based features in multi-modal fusion networks. Pattern Recognit 97:1–12. https://doi.org/10.1016/j.patcog.2019.107024
Lee C, Shleifer A, Thaler RH (2003) Investor sentiment and the closed-end-puzzele. 1–51
Lerato L, Niesler T (2019) Feature trajectory dynamic time warping for clustering of speech segments. Eurasip J Audio Speech Music Process. https://doi.org/10.1186/s13636-019-0149-9
Liang M, Wang X, Wu S (2021) A novel time-sensitive composite similarity model for multivariate time-series correlation analysis. Entropy. https://doi.org/10.3390/e23060731
Liu YT, Zhang YA, Zeng M (2019) Adaptive global time sequence averaging method using dynamic time warping. IEEE Trans Signal Process 67:2129–2142. https://doi.org/10.1109/TSP.2019.2897958
Long J, Chen Z, He W et al (2020) An integrated framework of deep learning and knowledge graph for prediction of stock price trend: an application in Chinese stock exchange market. Appl Soft Comput J 91:106205. https://doi.org/10.1016/j.asoc.2020.106205
Majumdar S, Laha AK (2020) Clustering and classification of time series using topological data analysis with applications to finance. Expert Syst Appl. https://doi.org/10.1016/j.eswa.2020.113868
Mohanty DK, Parida AK, Khuntia SS (2021) Financial market prediction under deep learning framework using auto encoder and kernel extreme learning machine. Appl Soft Comput 99:106898. https://doi.org/10.1016/j.asoc.2020.106898
Nasseri AL, Tucker A, De Cesare S (2015) Quantifying StockTwits semantic terms’ trading behavior in financial markets: an effective application of decision tree algorithms. Expert Syst Appl 42:9192–9210. https://doi.org/10.1016/j.eswa.2015.08.008
Niu T, Wang J, Lu H et al (2020) Developing a deep learning framework with two-stage feature selection for multivariate financial time series forecasting. Expert Syst Appl 148:113237. https://doi.org/10.1016/j.eswa.2020.113237
Sakoe H, Chiba S (1978) Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans Acoust 26:43–49. https://doi.org/10.1109/TASSP.1978.1163055
Shih SY, Sun FK, Lee H (2019) Temporal pattern attention for multivariate time series forecasting. Mach Learn 108:1421–1441. https://doi.org/10.1007/s10994-019-05815-0
Soheily-Khah S, Marteau PF (2019) Sparsification of the alignment path search space in dynamic time warping. Appl Soft Comput J 78:630–640. https://doi.org/10.1016/j.asoc.2019.03.009
Thakkar A, Patel D, Shah P (2021) Pearson correlation coefficient-based performance enhancement of vanilla neural network for stock trend prediction. Neural Comput Appl 33:16985–17000. https://doi.org/10.1007/s00521-021-06290-2
Tsinaslanidis PE (2018) Subsequence dynamic time warping for charting: bullish and bearish class predictions for NYSE stocks. Expert Syst Appl 94:193–204. https://doi.org/10.1016/j.eswa.2017.10.055
Tsinaslanidis PE, Kugiumtzis D (2014) A prediction scheme using perceptually important points and dynamic time warping. Expert Syst Appl 41:6848–6860. https://doi.org/10.1016/j.eswa.2014.04.028
Udagawa Y (2017) Approach for retrieving similar stock price patterns using dynamic programming method. ACM Int Conf Proceeding Ser. https://doi.org/10.1145/3151759.3151820
Vargas MR, De Lima BSLP, Evsukoff AG (2017) Deep learning for stock market prediction from financial news articles. 2017 IEEE int conf comput intell virtual environ meas syst appl CIVEMSA 2017—Proc 60–65. https://doi.org/10.1109/CIVEMSA.2017.7995302
Vaughan N, Gabrys B (2020) Scoring and assessment in medical VR training simulators with dynamic time series classification. Eng Appl Artif Intell 94:103760. https://doi.org/10.1016/j.engappai.2020.103760
Wang XX, Xu LY, Yu J et al (2019) Detection of correlation characteristics between financial time series based on multi-resolution analysis. Adv Eng Inform 42:100957. https://doi.org/10.1016/j.aei.2019.100957
Wang Y (2017) Stock market forecasting with financial micro-blog based on sentiment and time series analysis. J Shanghai Jiaotong Univ 22:173–179. https://doi.org/10.1007/s12204-017-1818-4
Wu S, Wang X, Liang M, Wu D (2021) Pfc: A novel perceptual features-based framework for time series classification. Entropy 23:1–23. https://doi.org/10.3390/e23081059
Yang CY, Chen PY, Wen TJ, Jan GE (2019) Imu consensus exception detection with dynamic time warping—a comparative approach. Sensors (switzerland). https://doi.org/10.3390/s19102237
Yao X, Wei HL (2016) Off-line signature verification based on a new symbolic representation and dynamic time warping. 2016 22nd International conference on automation and computing ICAC 2016 tackling new challenges automation and computing, pp 108–113. https://doi.org/10.1109/IConAC.2016.7604903
Yao X, Wei HL (2017) Short-term stock price forecasting based on similar historical patterns extraction. ICAC 2017—2017 23rd IEEE International conference on automation and computing Addressing Glob Challenges through automation and computing, pp 7–8. https://doi.org/10.23919/IConAC.2017.8082009
Zhang Y, Yan B, Aasma M (2020) A novel deep learning framework: Prediction and analysis of financial time series using CEEMD and LSTM. Expert Syst Appl 159:113609. https://doi.org/10.1016/j.eswa.2020.113609
Acknowledgements
This work is supported by the National Natural Science Foundation of China [grant number 61573118]; the Science and Technology Planning Project of Shenzhen Municipality [grant number JCYJ20190806112210067].
Funding
This work was supported by the National Natural Science Foundation of China [Grant No.: 61573118]; the Science and Technology Planning Project of Shenzhen Municipality [Grant No.: JCYJ20190806112210067].
Author information
Authors and Affiliations
Contributions
Conceptualization: [ML]; Methodology: [ML]; Formal analysis and investigation: [ML], [SW]; Software: [ML]; Writing—original draft preparation: [ML]; Writing—review and editing: [ML], [XW], [SW]; Funding acquisition: [XW]; Resources: [ML], [XW]; Supervision: [XW].
Corresponding author
Ethics declarations
Conflict of interest
The authors have no conflicts of interest to declare that are relevant to the content of this article.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
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.
About this article
Cite this article
Liang, M., Wang, X. & Wu, S. Improving stock trend prediction through financial time series classification and temporal correlation analysis based on aligning change point. Soft Comput 27, 3655–3672 (2023). https://doi.org/10.1007/s00500-022-07630-7
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00500-022-07630-7
Keywords
- Financial time series
- Temporal correlation
- Align change point
- Stock trend prediction