Skip to content
All library documents

Finding Repeating Time-Series Patterns with Matrix Profiles and DTW

Article Quant Q&A · Author: amirHosein

Summary

The document considers how to find recurring motifs in time series. It points to the Matrix Profile as a method designed for motif discovery, while one respondent reports that it did not capture repeating patterns across all scales in their tests. They instead used dynamic time warping (DTW), adjusting its configuration to suit the patterns and searching with multiple configurations.

The respondent also reports backtesting the resulting strategy and achieving a highest win rate of 62%, which they judged insufficient to justify the effort. This is an individual experience, not a general benchmark: the document gives no details about the data, test design, costs, or risk-adjusted returns. It therefore offers candidate discovery methods and a caution about implementation effort, but not evidence that motif-based trading is broadly profitable.

Key ideas

  • The Matrix Profile is suggested as a dedicated approach to time-series motif discovery.
  • One user found it did not identify repeating patterns across all scales in their tests.
  • Dynamic time warping required configuration choices tailored to the patterns being sought.
  • The reported backtest reached a 62% win rate, but the author considered the effort unjustified.

Tags

Full text
# How to find motif in a time series?


# How to find motif in a time series?












Literally the question in the title

## Answer by amirHosein (score 1, accepted)

https://quant.stackexchange.com/a/81062

I tested matrix profile as suggested in another answer, but it couldn't find repeating patterns in all scales. The answer was DTW, it needed some configuration changes based on the patterns extracted. Now I'm using many different configurations to find patterns. For future readers, I back-tested this strategy, and the highest win rate I got was 62%, did not worth the effort

## Answer by babelproofreader (score 2)

https://quant.stackexchange.com/a/80915

Try looking at Matrix Profile (dedicated homepage here). This is designed for exactly your use case.

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.