Abstract
Existing similarity measures in stock correlation analysis often overlook the multidimensional nature of stock data and the dynamics of the time-lag effect (TLE) in phase differences. To address these limitations, this paper proposes a novel method, called Multi-Factor Dynamic Temporal Similarity Measure (MFDTSM). The method introduces an enhanced eXtreme Gradient Boosting (XGBoost) model based on Shapley Additive exPlanations (SHAP) to comprehensively evaluate the influence of stock factors. The proposed method effectively categorizes stocks and reveals the heterogeneity of factor influence by clustering the SHAP values of stock factors. Furthermore, MFDTSM is able to successfully quantify the dynamic rate of phase differences in TLE by constructing the cumulative distance matrix and analyzing the optimal alignment paths of time series data, thereby significantly improving the accuracy of the similarity measure. Empirical analysis is performed using 102 stocks from the communication and financial industries, including 12 key stock factors. The experimental results demonstrate that MFDTSM improves the accuracy of the analysis of industry correlation, linear correlation, and stock correlation pricing by 10%, 16%, and 5%, respectively, over existing methods, which highlight the efficiency and stability of MFDTSM in analyzing complex stock market dynamics.