# Simple distance measure for financial time series

I have a large quantity of financial trading systems that I believe are highly duplicative, meaning that I believe a large number of the trading systems are essentially the same thing.

I am looking for a way to measure the differences between each of the trading systems. One simple way to do this is correlation of daily returns, although that limits me to linear relationships and a correlation matrix of 100k x 100k, which is not really useful.

What methods can I use to measure differences between the time series and then to cluster them together, with the eventual goal of removing the trading systems that are highly similar?

I'm new to this, so if I'm leaving out relevant information please let me know and I will modify this question.

Thanks.

Sample data is below:

StratID SystemID Date   Daily Simple Return
1   1   1/25/2011   0.04
1   1   1/26/2011   0.49
1   1   1/27/2011   -0.02
1   1   1/28/2011   0.76
1   1   1/31/2011   0.61
1   2   1/3/2011    1.37
1   2   1/4/2011    -0.02
1   2   1/5/2011    -0.52
1   2   1/6/2011    0.16
1   2   1/7/2011    0.85
1   2   1/10/2011   -0.14

-
You should provide some details about the data structure. Suppose, you could arrange your data in a spreadsheet format. What would the columns represent and what would the rows represent? Ideally, a snippet of sample data should be part of the question. –  varty Nov 8 '11 at 22:58
@varty I would guess the OP has a time x n_systems matrix of the returns of each strategy, possibly with no missing values. –  shabbychef Nov 9 '11 at 1:42
@shabbychef What is a 'system'? Is the same as 'strategy'? If we had 6 systems and 4 strategies does that we mean that we have 24 columns? Is the goal to distinguish between systems/strategies or both? I am afraid it is confusing for an outsider like me. –  varty Nov 9 '11 at 1:46
@varty the OP claims he has a "a large quantity of financial trading systems". I take this at face value. One column for each "system". I assume the OP can recognize whether this is correct and chime in. In all likelihood, the different "systems" are similar models but with different parameters used, but that is only a guess. –  shabbychef Nov 9 '11 at 5:06
The data is in the form of daily simple returns, with no missing values. To clarify terminology - I consider a strategy to have multiple systems. Each system within a strategy uses similar logic, but with different input parameters such as periodicity. I have, for example, 10 strategies each with 5 systems, for a total of 50 systems. I want to measure how similar the systems are within a specific strategy, and also across strategies. Thanks in advance for your help. –  idris Nov 9 '11 at 5:38

Consider calculating the squared difference of each daily return and taking the mean over all returns (mean square error). You could conisder each daily return to be an axis in a high dimensional space and user standard clustering techniques, e.g. k-means is the easiest to understand and implement and it may be sufficient for what you want although I was advised at one time that k-means may not be a good choice for high dimensional spaces (but I have no data to back this up - I personally would try it as a first step).

-