Dynamic Time Warping for Comparing Offset Time Series
Summary
The document asks how to compare the shape or growth of two value series when their timestamps are slightly offset and their observation intervals differ. It is concerned with similarity independent of absolute levels, and mentions cross-correlation as a possible approach that seems unnecessarily complex for the use case. The accepted response recommends Dynamic Time Warping (DTW), a method that aligns sequences while allowing local shifts in timing.
The answer is only a brief recommendation. It does not explain how to preprocess the series, select a distance measure, constrain the warping path, or convert DTW distance into a normalized similarity score. Nor does it present a comparison with correlation or evidence that DTW is best for these particular data. DTW is a useful candidate when similar patterns unfold at different speeds, but the result can depend on the alignment constraints and scale treatment.
Key ideas
- Dynamic Time Warping is recommended for comparing series with slightly misaligned timestamps.
- DTW can align similar shapes even when local timing differs.
- The question prioritizes curve growth and shape over absolute values.
- The source gives no implementation details or comparison against cross-correlation.
- Alignment constraints and scaling choices can affect a DTW comparison.
Tags
Full text
# Two time series similarity with slightly offset timestamps # Two time series similarity with slightly offset timestamps Let's say I have two time-series S1 and S2 where S1 looks like this: ``` Epoch timestamp |value 1492827582, 100 1492827782, 127 1492827982, 135 1492828082, 200 ... ... ``` and S2 looks like this: ``` Epoch timestamp |value 1492827133, 50 1492827333, 155 1492827533, 156 1492827933, 300 ... ... ``` What is the most straightforward method to produce some kind of similarity value? I am mainly interested in seeing how the growth is. Don't really care about the absolute values -- just want to have a sense of how similar the curve shapes are. Please note that the timestamps are slightly offset with a slightly different stepping but generally very close. I have heard about cross-correlation approaches but they seem like an overkill. Thank you very much for reading this! ## Answer by onlyvix.blogspot.com (score 1, accepted) https://quant.stackexchange.com/a/33844 It looks like a good case to use Dynamic Time Warping
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.