Skip to main content
Log in

Experimental analysis of similarity measurements for multivariate time series and its application to the stock market

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Similarity measurement takes on critical significance in strategies that seek similar stocks based on historical data to make predictions. Stock data refers to a multidimensional time series with features of non-linearity and high noise, posing a challenge to the practical design of similarity measurement. However, the existing similarity measurements cannot better address the negative effects of the singularity of data and correlations of data in multidimensional stock price series, such that the performance of stock prediction will be reduced. In this study, a novel method named dynamic multi-factor similarity measurement (DMFSM) is proposed to accurately describe the similarity between a pair of multidimensional time series. DMFSM is capable of eliminating effects exerted by singularity and correlations of data using dynamic time warping (DTW) with Mahalanobis distance embedded and weights of series nodes in multidimensional time series. To validate the efficiency of DMFSM, several experiments were performed on a total of 675 stocks, which comprised 290 stocks from the Shanghai Stock Exchange, 285 stocks from the Shenzhen Stock Exchange, as well as 100 stocks from the Growth Enterprise Market of the Shenzhen Stock Exchange. The experiment results for mean absolute error of predictions indicated that DMFSM (0.018) outperformed similarity measurements (e.g., Euclidean distance (0.023), DTW (0.054), and dynamic multi-perspective personalized similarity measurement (0.023)).

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

Similar content being viewed by others

References

  1. Bynen E (2012) Cluster analysis: Survey and evaluation of techniques, volume 1. Springer Science & Business Media

  2. Chen J, Wan Y (2023) Localized shapelets selection for interpretable time series classification. Appl Intell 1–17

  3. Deng C, Huang Y, Hasan N, Bao Y (2022) Multi-step-ahead stock price index forecasting using long short-term memory model with multivariate empirical mode decomposition. Inf Sci 607:297– 321

  4. Fenghua W, Jihong X, Zhifang H, Xu G (2014) Stock price prediction based on ssa and svm. Proc Comput Sci 31:625– 631

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

    Article  Google Scholar 

  6. 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

    Article  Google Scholar 

  7. Klassen G, Tatusch M, Conrad S (2022) Cluster-based stability evaluation in time series data sets. Appl Intell 1–24

  8. Li Q, Tan J, Wang J, Chen H (2021) A multimodal event-driven lstm model for stock prediction using online news. IEEE Trans Knowl Data Eng 33(10):3323–3337

    Article  Google Scholar 

  9. Liang M, Wu S, Wang X, Chen Q (2022) A stock time series forecasting approach incorporating candlestick patterns and sequence similarity. Expert Sys Appl 205:117595

    Article  Google Scholar 

  10. Liu X, Guo J, Wang H, Zhang F (2022) Prediction of stock market index based on issa-bp neural network. Expert Sys Appl 204:117604

    Article  Google Scholar 

  11. Lv P, Shu Y, Xu J, Wu Q (2022) Modal decomposition-based hybrid model for stock index prediction. Expert Syst Appl 202:117252

    Article  Google Scholar 

  12. McLachlan GJ (1999) Mahalanobis distance. Resonance 4(6):20–26

    Article  Google Scholar 

  13. Mi X, Xiao R, Ma C (2022) The inefficiency of information transmission between stock index futures and the underlying index: Measurements and characteristics. Expert Syst Appl 201:117085

    Article  Google Scholar 

  14. Mokni K (2020) A dynamic quantile regression model for the relationship between oil price and stock markets in oil-importing and oil-exporting countries. Energy 213:118639

    Article  Google Scholar 

  15. Ruiz AP, Flynn M, Large J, Middlehurst M, Bagnall A (2021) The great multivariate time series classification bake off: a review and experimental evaluation of recent algorithmic advances. Data Mining Knowl Disc 35(2):401–449

    Article  MathSciNet  MATH  Google Scholar 

  16. Sakoe H, Chiba S (1978) Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans Acoust Speech Signal Process 26(1):43–49

    Article  MATH  Google Scholar 

  17. Sims CA (1980) Macroeconomics and reality. J Econ Soc Econ 1–48

  18. Sun L, Wang K, Balezentis T, Streimikiene D, Zhang C (2021) Extreme point bias compensation: A similarity method of functional clustering and its application to the stock market. Expert Sys Appl 164:113949

    Article  Google Scholar 

  19. Tsinaslanidis PE (2018) Subsequence dynamic time warping for charting: Bullish and bearish class predictions for nyse stocks. Expert Sys Appl 94:193–204

    Article  Google Scholar 

  20. Wang L, Ma F, Liu J, Yang L (2020) Forecasting stock price volatility: New evidence from the garch-midas model. Int J Forecast 36(2):684–694

  21. Xiao J, Chen X, Li Y, Wen F (2022) Oil price uncertainty and stock price crash risk: Evidence from china. Energy Econ 112:106118

  22. Yang J, Jing S, Huang G (2022) Accurate and fast time series classification based on compressed random shapelet forest. Appl Intell 1–19

  23. Zhang D, Lou S (2015) Multivariate time series classification with parametric derivative dynamic time warping. Expert Syst Appl 42(5):2305–2312

    Article  Google Scholar 

  24. Zhang D, Lou S (2021) The application research of neural network and bp algorithm in stock price pattern classification and prediction. Future Gener Comput Syst 115:872–879

    Article  Google Scholar 

  25. Zhang Q, Zhang C, Cui L, Han X, Jin Y, Xiang G, Shi Y (2023) A method for measuring similarity of time series based on series decomposition and dynamic time warping. Appl Intell 53(6):6448–6463

    Article  Google Scholar 

  26. Zhao F, Gao Y, Li X, An Z, Ge S, Zhang C (2021) A similarity measurement for time series and its application to the stock market. Expert Syst Appl 182:115217

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported in part by the Natural Science Foundation of Shandong Province under Grant ZR2021MF015, ZR2021MF068, ZR2021MF107, ZR2020MA030 and in part by the Shandong Technology and Business University Doctoral Initiating Project under Grant BS202105, and in part by the Shandong Technology and Business University Teaching Reform Project under Grant 11688202024, 11688202023, and in part by the National Natural Science Foundation of China under Grant 62176140, and in part by Shandong Computer Society Provincial Key Laboratory Joint Open Fund under Grant SKLCN-2020-06.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rui Wang.

Ethics declarations

Conflicts of interest

The authors declare that there is no conflict of interest regarding the publication of this study.

Additional information

Publisher's Note

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

Appendix

Appendix

1.1 Figures Related with Proposed Methods

This appendix presents the figures for related examples of the Euclidean measure, Mahalanobis measure, DTW, the proposed method (Figs. 4 and 5), four types of prediction scheme (Fig. 6), and the examples of the DMFSM measurements (Fig. 7).

Fig. 4
figure 4

The related examples of Euclidean measure, Mahalanobis measure, and DTW. The capabilities of the three distance measures in handling singularity and time shifts are shown in the figure

Fig. 5
figure 5

The related examples of the DMFSM. For handling singularity and time shifts, the performance of DMFSM compared with the Euclidean measure, Mahalanobis measure, and DTW is demonstrated

Fig. 6
figure 6

Four prediction schemes

Fig. 7
figure 7

The examples of the DMFSM measurements. The three dimensions time series are presented in 3D place and the X-axis is the time axis. In addition, the Y-axis, and Z-axis as two of the dimensions of the time series data. The last dimension is indicated in the shades of the data point colors

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

Xiang, ZL., Wang, R., Yu, XR. et al. Experimental analysis of similarity measurements for multivariate time series and its application to the stock market. Appl Intell 53, 25450–25466 (2023). https://doi.org/10.1007/s10489-023-04874-0

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-023-04874-0

Keywords

Navigation