# [R-SIG-Finance] correlation based time series clustering?

Murali.Menon at avivainvestors.com Murali.Menon at avivainvestors.com
Thu Feb 23 10:47:52 CET 2012

Folks,

There's been quite a bit of work on clustering in finance:

http://www.mendeley.com/research/correlation-based-hierarchical-clustering-in-financial-time-series/

Very simply, though, you can calculate a correlation matrix given your time series of returns, and then apply, say, a medoid-clustering scheme (e.g. the pam function in package 'cluster') and see what happens. According to Mantegna, if you do this on the components of the Dow Jones, the various industrial types very naturally form individual clusters.

Hope this helps.

Murali

-----Original Message-----
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of julien cuisinier
Sent: 23 February 2012 09:29
To: comtech.usa at gmail.com; r-sig-finance at stat.math.ethz.ch
Subject: Re: [R-SIG-Finance] correlation based time series clustering?

Hi Michael,

A very general question here with little input from you...I am not surprised to see little feedback

I have been looking for something similar & same result so I do not think it exist yet. I am a complete newbie in clustering but looking around there are plenty of R function available, nothing that I could find as simple as using correlation per se.

Thinking about it Im not sure how it would work & anything I can think of would be quite sensitive to the starting point (e.g. calculate pair-wise correls within a market, then start by one stock & cluster with it all other stocks with corrells higher than a certain threshold?) May be some recursive function trying many different starting points? But then what to do with the resulting different cluster structure?

Could you share with the list what reference (not in R) you found on the topic? That would be great if you could share / bring something to the list as well & then see if we can build that in? (very very ambitious of me here =)

Thanks & regards,
Julien

> Date: Tue, 21 Feb 2012 15:05:59 -0600
> From: comtech.usa at gmail.com
> To: r-sig-finance at stat.math.ethz.ch
> Subject: [R-SIG-Finance] correlation based time series clustering?
>
> Hi all,
>
> I am looking for a function for correlation based time-series clustering in
> R... I have googled for quite a while and couldn't find any in R...
>
>
> Thanks a lot!
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.