Comparing PCA Eigenvalues with Principal Portfolio Variances
Summary
The document raises a practical question about a statement in a diversification paper: principal component eigenvalues correspond to the variances of uncorrelated portfolios. The author compares eigenvalues from the covariance matrix of asset returns with sample variances of returns projected onto PCA loadings, but reports that the two sets of values differ. The included R workflow downloads adjusted prices, calculates returns, performs a covariance-based principal component analysis, and computes portfolio returns using the loadings.
The underlying concept is that covariance-matrix eigenvectors define mutually uncorrelated linear combinations, and their variances should correspond to the associated eigenvalues when the same centered data and covariance convention are used. The posted code and output do not resolve the discrepancy or identify its cause. Differences may require checking that both calculations use identical observations, centering, scaling, and component ordering; the document offers no confirmed diagnosis or broader empirical result.
Key ideas
- Covariance-matrix eigenvectors define linear combinations of returns that are uncorrelated with one another.
- The variance of each principal portfolio corresponds to its covariance eigenvalue when calculations use consistent data and conventions.
- The document compares eigenvalues with projected-return variances and reports a mismatch.
- The example does not establish the cause, so centering, scaling, observations, and component order need checking.
Tags
Full text
# PCA Variances and Principal Portfolio Variances
# PCA Variances and Principal Portfolio Variances
In Meucci's paper called "Managing Diversification" he mentions that:
"Indeed, the eigenvalues A correspond to the variances of these uncorrelated portfolios"
I tried to replicate it but found they differ. Any thoughts?
```
> round(prin.port.risk,8)
[1] 0.00017323 0.00013995 0.00030159 0.00007239
> round(eval,8)
[1] 0.00053912 0.00010127 0.00003948 0.00000730
```
Full R Code:
```
rm(list=ls())
require(RCurl)
sit = getURLContent('https://github.com/systematicinvestor/SIT/raw/master/sit.gz', binary=TRUE, followlocation = TRUE, ssl.verifypeer = FALSE)
con = gzcon(rawConnection(sit, 'rb'))
source(con)
close(con)
load.packages('quantmod,lattice')
#######################################################
#Get and Prep Data
#######################################################
data <- new.env()
tickers<-spl("VBMFX,VTSMX,VGTSX,VGSIX")
getSymbols(tickers, src = 'yahoo', from = '1980-01-01', env = data, auto.assign = T)
for(i in ls(data)) data[[i]] = adjustOHLC(data[[i]], use.Adjusted=T)
bt.prep(data, align='remove.na', dates='1990::2013')
#################
prices<-data$prices
ret<-prices / mlag(prices) - 1
ret[1,]<-0
demean = scale(coredata(ret), center=TRUE, scale=FALSE)
#eigen decomposition of return (using "princomp")
pca<-princomp(ret,cor=F)
loadings<-pca$loadings[] #eigen vectors
eval<-eigen(cov(demean))$values #eigen values that supposedly represent risk of principal portfolios
prin.port.ret<-ret %*% loadings #principal port ret
#These two differ??!?!?!?!?
prin.port.risk<-(apply(prin.port.ret,2,var))
(eval)
```Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.