I have thousands of time series that I wish to assign to one of two groups such that these two groups, in the aggregate, are as 'similar' as possible (maximising the coefficient of correlation between them). The purpose is so that one may serve as a 'control' group and the other as a 'test' group.

Currently, I'm just randomly assigning an individual series to one of two groups (using a random number drawn from a uniform distribution). This doesn't seem the best way.

What methods are available that could help me with the task at hand?

enter image description here

  • 1
    $\begingroup$ Search this site for "time-series clustering" $\endgroup$ Sep 15, 2021 at 1:51
  • $\begingroup$ hi @kjetilbhalvorsen, thanks, but I don't think my problem is clustering per se since clustering would find distinct groups... I'm after allocating many time series to two groups such that these two groups are similar. $\endgroup$
    – Three14
    Sep 15, 2021 at 15:09

1 Answer 1


I used the best_matches function with argument suggest_market_splits = TRUE from the MarketMatching package in R.

Section "Getting optimized market pairs (test/control) recommendations" from https://cran.microsoft.com/web/packages/MarketMatching/vignettes/MarketMatching-Vignette.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.