How can I do a hierarchical clustering with correlation as distance?

4 次查看(过去 30 天)
I have a set of monthly financial returns data for a few stocks. I have also computed the pairwise correlation between all these. I am told to do a hierarchical cluster analysis to assign these stocks to groups so as to minimize the average within group distance between group members. Distance is to be measured as 1 minus the correlation coefficient between the two stock returns.
I have found the matlab function clusterdata which also supports 'distance' with the option 'correlation' that explains: One minus the sample correlation between points (treated as sequences of values)
I cannot understand how I can pass my data to this function and that 'sequence of values' to be passed. Should I pass the correlations or the raw data? And how am I to extract groupings for each stock?
Thank you

回答(0 个)

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by