Blaise Labriola
June 08, 2018
Blaise Labriola @ Zoonova.com
Managing Partner Zoonova.com.

Calculating a Correlation Matrix, Clustering Matrix, and Principal Component Analysis for an underlying portfolio.

A Portfolio Correlation matrix is a table showing correlation coefficients between the underlying positions in the portfolio. The following is a screenshot of an underlying portfolio.

Now here is the Correlation matrix that has been calculated from the portfolio.

Hierarchical Correlation Clustering

Hierarchical Clustering (a.k.a. "hierarchical cluster analysis" or HCA) is a method of cluster analysis which seeks to build a hierarchy of clusters.  ZooNova.com uses an agglomerative technique (Ward Variance Minimization algorithm) where each observation starts in its own cluster, and pairs of clusters are merged as one moves up the hierarchy – and where each pair of clusters is merged based on the optimal value of the error sum of squares. The dendrogram (tree diagram) and heat-mapped grid illustrate this resulting hierarchy.

Screenshot of Correlation Cluster

PC Analysis

Principal component analysis is a statistical technique used to analyze the interrelationships between a large number of variables and to explain them in terms of a smaller set of variables (i.e., "principal components"). Using the correlation matrix for the stock watch portfolio,  eigenvalues and eigenvectors are calculated – which imply corresponding principal components. The output is as follows:

Principal component coefficients (Reduced Model)

Principal component coefficients displays eigenvectors for the principal components ( NOTE:  components with an eigenvalue of less than 1 are omitted, i.e., "Reduced"). Values with a high correlation (relative to the user-defined threshold) between the principal components and the (standardized) original variables are highlighted.

Screenshot of PCA

Cheers.

All calculations are from Zoonova.com  

More from Blaise Labriola
The most important insight of the day
Get the Harvest Daily Digest newsletter.