## The Most Diversified or The Least Correlated Efficient Frontier

The “Minimum Correlation Algorithm” is a term I stumbled at the CSS Analytics blog. This is an Interesting Risk Measure that in my interpretation means: minimizing Average Portfolio Correlation with each Asset Class for a given level of return.

One might try to use Correlation instead of Covariance matrix in mean-variance optimization, but this approach, as I will show below, will not produce the least correlated portfolios.

The Average Portfolio Correlation with each Asset Class:

This formula can be easily coded in R:

portfolio.sigma = sqrt( t(weight) %*% assets.cov %*% weight ) mean( ( weight %*% assets.cov ) / ( assets.sigma * portfolio.sigma ) ) # Alternatively portfolio.returns = weight %*% t(assets.hist.returns) mean(cor(assets.hist.returns, portfolio.returns))

I’m not aware of the method to transform this formula in to the linear programming, so I will use a Nonlinear programming solver, Rdonlp2, which is based on donlp2 routine developed and copyright by Prof. Dr. Peter Spellucci. Following code might not properly execute on your computer because Rdonlp2 is only available for R version 2.9 or below.

#-------------------------------------------------------------------------- # Create Efficient Frontier #-------------------------------------------------------------------------- ia = aa.test.create.ia() n = ia$n # 0 <= x.i <= 0.8 constraints = new.constraints(n, lb = 0, ub = 0.8) # SUM x.i = 1 constraints = add.constraints(rep(1, n), 1, type = '=', constraints) # create efficient frontier(s) ef.risk = portopt(ia, constraints, 50, 'Risk') ef.cor.insteadof.cov = portopt(ia, constraints, 50, 'Cor instead of Cov', min.cor.insteadof.cov.portfolio) ef.avgcor = portopt(ia, constraints, 50, 'AvgCor', min.avgcor.portfolio) # Plot multiple Efficient Frontiers layout(1:2) plot.ef(ia, list(ef.risk, ef.avgcor, ef.cor.insteadof.cov), portfolio.risk, F) plot.ef(ia, list(ef.risk, ef.avgcor, ef.cor.insteadof.cov), portfolio.avgcor, F) # Plot multiple Transition Maps layout( matrix(1:4, nrow = 2) ) plot.transition.map(ef.risk) plot.transition.map(ef.avgcor) plot.transition.map(ef.cor.insteadof.cov) # visualize input assumptions plot.ia(ia)

Using Correlation instead of Covariance matrix in mean-variance optimization is a very bad idea to produce the least correlated portfolios. The ‘Cor instead of Cov’ efficient frontier actually increases average portfolio correlation compared to the standard ‘Risk’ efficient frontier.

The portfolio composition of the Average Correlation efficient frontier is split between gold (GLD) and bonds (TLT) at the lower risk levels. This is not surprising because both gold and bonds have positive expected returns and low correlation to the other assets.

To view the complete source code for this example, please have a look at the aa.avg.cor.test() function in aa.test.r at github.

Following is the complete source code for minimizing Average Portfolio Correlation with each Asset Class function:

min.avgcor.portfolio <- function ( ia, # input assumptions constraints # constraints ) { require(Rdonlp2) cov = ia$cov[1:ia$n, 1:ia$n] s = sqrt(diag(cov)) # avgcor fn <- function(x){ sd_x = sqrt( t(x) %*% cov %*% x ) mean( ( x %*% cov ) / ( s * sd_x ) ) } # control structure cntl <- donlp2.control(silent = T, iterma =10000, nstep = 100, epsx = 1e-10) # lower/upper bounds par.l = constraints$lb par.u = constraints$ub # intial guess p = rep(1,n) if(!is.null(constraints$x0)) p = constraints$x0 # linear constraints A = t(constraints$A) lin.l = constraints$b lin.u = constraints$b lin.u[ -c(1:constraints$meq) ] = +Inf # find solution sol = donlp2(p, fn, par.lower=par.l, par.upper=par.u, A=A, lin.u=lin.u, lin.l=lin.l, control=cntl) x = sol$par return( x ) }

nice post– however some important comments: minimizing correlations optimally implies equivalent volatility for the portfolio assets—furthermore non-linear solutions are useful but not necessary to solve this problem. the weights must be constrained to be non-negative. a linear solution will suffice subject to inequality constraints.

best

dv (from css)

David, thank you. Can you please share, how do you formulate the Average Portfolio Correlation with each Asset Class as a linear programming problem?

hi, here is a link:THE MINIMUM VARIANCE PROPERTY

That is, it must possess the minimum variance property. We will show that under

the conditions set out in the classical linear model the OLS estimators are BLUE …

homepages.uel.ac.uk/…/FE2007%20The%20Minimum%20Variance%20Property%20notes

best

david

How I would approach this in Portfolio Probe would be to have the correlation matrix in the utility and constrain the portfolio variance to some value.

Pat, I tried that in ‘Cor instead of Cov’ efficient frontier. To create ‘Cor instead of Cov’ efficient frontier, I used Correlation instead of Covariance matrix in mean-variance optimization.

Unfortunately, this approach, does not produce the least correlated portfolios : the portfolios that minimize Average Portfolio Correlation with each Asset Class. Actually the ‘Cor instead of Cov’ efficient frontier, colored with green in the chart above, is very inefficient in the Average Portfolio Correlation framework.

Okay, I see. Your function is linear in the weights rather than quadratic (not counting the computation of the portfolio variance).

Thinking about this, I’ve decided that I quite like it.

Pat, thank you. All the credits for the ’Minimum Correlation Algorithm’ should go to David Varadi at the CSS Analytics blog. I just implemented this Interesting Risk Measure using R.

Would one not be interested in finding the portfolio that has the least weighted sum of the correlation with it’s underlying assets, rather than the portfolio that has the least mean correlation with the underlying assets (subject to constraints)? In a long only case it’s possible that the optimal allocation could be a corner solution, ie. entirely allocate in one asset. Depending on how you quantify portfolio correlation, a portfolio with only one asset could be considered to have a correlation of 1. The diversification of such a portfolio would be minimal, which generally speaking is regarded as undesirable.

Also you said in referring to gold and bonds splitting the portoflio allocation for low levels of risk “This is not surprising because both gold and bonds have positive expected returns and low correlation to the other assets”.

The fact the the expected (historical mean) returns are possitive has nothing to do with the allocation process.

Perhaps one may want to create a ratio of expected returns over the portfolio correlation (or the exponential of the portfolio correlation) and try to maximize that. Of course how one defines portfolio correlation is important, and then i guess one would need to justify such a ratio.

All and all, interesting stuff.