# How to extract normalised portfolio weights from PCA, when the eigenvector has negative elements?

Most of the examples of using PCA of asset returns to construct an eigen portfolio seem to tend to focus on equities, which tend to all be positively correlated. As such I usually see normalised (such that they sum to 1) asset weights along the lines of:

weights = eigenvector[0, :] / sum(eigenvector[0, :])


Where eigenvector zero is associated with the eigenvalue of the largest variance.

Occasionally negative values will appear in that PC0 (for example if there is a negatively correlated asset introduced), which will be explained as a weight towards a short sale. But I am confused about how these weights should be correctly normalised in the presence of negative value(s).

Following the same procedure as above, the weights will of course sum to one, but the net and gross exposures now will of course be different. Is this just accepted?

I'm not entirely sure what you are carrying out the PCA on, are you using a correlation matrix or covariance matrix? As for the negative eigenvalue issue, the sign associated with an eigenvalue is not important as eigenvectors are only unique up to a constant. If you have a square matrix, $$X$$, an Eigenvalue $$\lambda_i$$ and eigenvector $$v_i$$ for $$X$$ satisfy, $$$$Xv_i = \lambda_i v_i$$$$ If you flip the sign of $$\lambda_i$$ to $$-\lambda_i$$ then it implies that we have $$-v_i$$ as an eigenvector of $$X$$ and the above equation is still valid. These eigenvalues represent the variance explained by the corresponding Eigenvector in relation to the original axis.

For your question on weights, I'm not fully sure what you are weighting. You could allocate a 'weight' to each Eigenvector as $$\frac{\sum_{j=1}^{k}\lambda_j}{\sum_{i=1}^{p}\lambda_i}$$ which would represent the the proportion of variance explained by including the first k components. You may then use this to drop or retain components that contribute little to the overall variance of the portfolio.

• Ah yes I see. In that case, I believe you would want to use the $L^2$ norm to normalise each Eigen vector. This means that your Eigenvectors become unit vectors (magnitude 1) but retain their original directions, this is the standard method of 'normalising' a vector. Here, negative values are treated the same as positive values. The $L^2$ norm for a vector $v = (v_1, ... , v_n)$ is defined as $\sqrt{\sum_{i=1}^{n} v_i^2}$. Commented Jun 21, 2021 at 23:15
• Yes my eigenvectors are already normalised to unit length (using NumPy, does this by default), but some of the individual elements are negative. So -i / L^2 is (and would still be even if they weren't already unit length) negative
• If I assume I understand you correctly, you want your gross market exposure $\sum_{i=1}^N |w_i|$ to be equal to $1$, so in this case you would consider weights $\lambda_i/(\sum_{i=1}^N |\lambda_i|)$. Commented Jun 22, 2021 at 15:01