0
$\begingroup$

Take for example the S&P500 universe with 500 stocks. Something interesting would be to create clusters based on stocks' correlations in order to have clusters that have the same "direction" in the market. That's easily done by a clustering algorithm, with a well-defined distance matrix from the correlation matrix.

But if we want to cluster the 500 stocks based on both stocks' correlations and features, how would we do that ? As far as I know the clustering algorithms only works with either similarity measures (often correlations) or features (P/E ratio, size...) but not both at the same time.

Do you have any idea ?

$\endgroup$
1
$\begingroup$

Often before running these types of clustering algorithms, it would be good to run a PCA on them and create those as your feature set. This allows you to run clustering on multi-dimensional data without worrying about feature importance too much.

$\endgroup$
4
  • $\begingroup$ That would only make a clustering based on features matrix, doesn't it ? How do you tell the algorithm to consider the correlations too ? (which is another full matrix that can't be put into the features matrix) $\endgroup$
    – FredNgu
    May 20 '20 at 6:35
  • $\begingroup$ I think correlation is good, co-variance is better. But a KNN would be able to pick up on both. What's the end goal here? $\endgroup$
    – Hao Zhang
    May 20 '20 at 9:42
  • $\begingroup$ The end goal is to create a final clustering based on stocks' features and correlations, so in the end in a cluster we will have stocks that have 1) similar features and 2) similar time-evolution. $\endgroup$
    – FredNgu
    May 20 '20 at 18:14
  • $\begingroup$ Is it to be inputted into a pairs trading algorithm? A similar time-evolution would be hard as correlations break from time to time. If that's the case focusing on clustering with similar features. $\endgroup$
    – Hao Zhang
    May 23 '20 at 7:34
0
$\begingroup$

You're describing something similar to a Fama-French model with cluster exposure instead of market exposure. So regress-out the cluster-specific beta before computing your feature coefficients.

I think that, in practice, your clusters will simply be a sector or industry.

$\endgroup$
1
  • $\begingroup$ Yes indeed intuitively the final clusters should be the sectors. I might have misunderstood but are you saying that I have to make a first correlation-based clustering, and then compute the cluster-specific betas with a multilinear regression on these clusters? How do you then obtain the final clusters ? $\endgroup$
    – FredNgu
    May 19 '20 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.