A similarity measurement for time series and its application to the stock market. (15th November 2021)