1

One option is a Granger causality test which a statistical hypothesis test for determining whether one time series is useful in forecasting another. One time series is said to Granger-cause another time series if the lagged values of one times series provide statistically significant information about future values of another time series.

0

This looks like a job for Dynamic Time Warping (DTW), as this algorithm calculates an optimal match between two given sequences. If you would like to implement it in Python (for example), I can recommend DTAIDistance. The documentation of this project is also very helpful if you want to understand this method in detail.

But DTW would also count the constant parts as similar, wouldn't it? I would ideally like to disregard or at least give less weight to the parts where one or both are constant. – Tirtha – 2019-10-30T12:17:46.360