Solved – Clustering of stock market returns

clusteringfinancepanel data

I am trying to cluster the companies listed in a stock market on the basis of the risk and returns.
I have about 100 companies (categories) and two variables (risk, return) under each category. The data comprises of daily data for the past 10 years.
I want to run a cluster analysis to group the companies (categories) but I am unsure about the methodology.
Can anyone suggest?
Thanks!

Best Answer

This example from the scikit-learn project might give you some ideas on how to combine sparse covariance graph estimation with traditional clustering so as to identify some of the underlying structure of a market from daily price data.

Disclaimer: I contribute to the scikit-learn project even though I am not the one who wrote this example.