A research on similarity measurement for time series and its application on stock price prediction
Rui Wang, Zhong-Liang Xiang · 2023
In mining stock price change patterns from historical data using similarity measures, the choice of similarity metrics is critical. Stock data is a multidimensional financial time series characterized by nonlinearity and volatility, which brings challenges to stock price forecasting based on similarity measures. However, existing similarity measures perform poorly in dealing with the negative effects of singularity and correlation in multidimensional time series. This study proposes a new method called Dynamic Weight Similarity Measure (DWSM) to precisely characterize the similarity between multidimensional time series. DWSM utilizes the embedded Canberra distance and Mahalanobis distance and is able to eliminate the effects of multivariate time series data singularity and correlation on similarity measures. Since both the Mahalanobis distance and the Canberra distance have some drawbacks, we weighted both distance calculations to combine the two metrics. In addition, to emphasize the importance of sequence nodes closer to the current time, sequence node weights were also added. In order to verify the effectiveness of DWSM, 285 stocks from the Shenzhen Stock Exchange were used in the experiment. The experimental results of predicting the prediction error show that DWSM outperforms Euclidean distance and DTW.