2
$\begingroup$

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!

$\endgroup$
4
  • $\begingroup$ What do you mean by "methodology": Clustering algorithm? finding features other that risk/return? Programming language? $\endgroup$
    – cyborg
    Jan 8, 2012 at 12:08
  • 1
    $\begingroup$ You have (only) 100 data points and (only) two features? Have you started by plotting them to see what they look like? $\endgroup$
    – cardinal
    Jan 8, 2012 at 14:47
  • 1
    $\begingroup$ I was thinking the same thing, only plotting summary numbers--one variable to represent risk and one to represent return. If you try creating this plot, I hope you'll post it here. It'll be interesting to see. $\endgroup$
    – rolando2
    Jan 8, 2012 at 14:57
  • $\begingroup$ Look at unsupervised machine learning algorithms. $\endgroup$
    – Jase
    Nov 13, 2012 at 16:10

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ I bet I would find this example pretty interesting if labels were provided for the X- and Y-axis. That would give the viewer something more definite to grapple with. $\endgroup$
    – rolando2
    Jan 8, 2012 at 15:05
  • $\begingroup$ The axis are found using a 2D Locally Linear Embedding as explained in the summary and the inline comments. The axis don't mean anything: it's just a data driven way to project the data points on a 2D space for visualization of the nodes. $\endgroup$
    – ogrisel
    Jan 8, 2012 at 22:37
0
$\begingroup$

If you plot the risk vs. reward on a 2d plot and find that there is some separation between regions, there are quite a few approaches that can be used to classify the regions into clusters. A common unsupervised algorithm is the k-means algorithm.

In addition, there is a good tutorial on using clustering methods to classify hedge funds into groupings of returns vs volatility in this book (p 94 cluster analysis):

"Hedge funds: quantitative insights" By François-Serge Lhabitant

$\endgroup$

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.