Dynamic time warping (DTW) algorithm is useful to compare similarity of time series data. A corellaction coefficient does not work well if time series are identical but time-shifted or stretched gainst one another. DTW finds an alignment between two time series under certain constraints.
This Python implementation is based on the description provided by Wikipedia.