COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### two simple time series questions

• Email
• Follow

```These questions pertain not to economics but to climate change, but their answers may be useful to those interested in economic forecasting.

1- I want a way to measure the "similarity" of one time series to another, say series 1 and series 2, a metric like the Euclidean distance (whatever that might mean), call it d(s1,s2), where series 1 and 2 may differ by orders of magnitude and may have very different Fourier structures, but where d(s1,s2) is small if they "look similar".

2 - Given a collection of time series data, say s1, s2, . . . s1000, each with, say, 500 observations, I would like a way to define clusters of similar time series within that collection, so that the collection is segmented into some number k of disjoint groups.

The data I have are not stock data, but I believe the collection of time series does have groups, or clusters of similar time series, just as stock charts from the stocks in a market sector are similar, and perhaps economic forecasting may offer ways to deal with this.

I realize that the problems as described are not well defined. I&#8217;m looking for ideas and thought perhaps some MatLab users in the economic forum might have some suggestions.
```
 0

See related articles to this posting

```"Robert pisani" <r.pisani@mac.com> wrote in message <hr314b\$3el\$1@fred.mathworks.com>...
> These questions pertain not to economics but to climate change, but their answers may be useful to those interested in economic forecasting.
>
> 1- I want a way to measure the "similarity" of one time series to another, say series 1 and series 2, a metric like the Euclidean distance (whatever that might mean), call it d(s1,s2), where series 1 and 2 may differ by orders of magnitude and may have very different Fourier structures, but where d(s1,s2) is small if they "look similar".
>
> 2 - Given a collection of time series data, say s1, s2, . . . s1000, each with, say, 500 observations, I would like a way to define clusters of similar time series within that collection, so that the collection is segmented into some number k of disjoint groups.
>
> The data I have are not stock data, but I believe the collection of time series does have groups, or clusters of similar time series, just as stock charts from the stocks in a market sector are similar, and perhaps economic forecasting may offer ways to deal with this.
>
> I realize that the problems as described are not well defined. I&#8217;m looking for ideas and thought perhaps some MatLab users in the economic forum might have some suggestions.

It's not immediately obvious to me what sort of information you want to get out of these data.  Is each time series from perhaps a separate sensor recorded at the same time from a different site?  If it is one long time series, perhaps autocorrelating it would be the best place to start.

If you have a matrix of time series vectors, and since they seem to be periodic (and ideally stationary) and you want to compare them to each other, cross-correlation (or some such) comes to mind.  That will give you some sense of their similarity.

The Euclidean distance metric would work if you were doing something like a k-th nearest neighbor classification, but you have to have some idea of what it is you're classifying (a pre-defined training set).  Is that actually what you want to do?
```
 0