The previous post summarised the consequences on a tangency portfolio’s asset weights, returns and risks of extending the base case scenario (2 risky assets and 1 risk free asset) by including a third risky asset. The additional asset is constructed in such a way as to command a mean return and risk in excess of those provided by asset number 2 of the base case scenario, while simultaneously being less risky than asset number 1 of the base case,commanding a lower mean return with respect to the same until successive incarnations of that additional asset finally dominates base asset number 1 along both dimensions of interest. By fixing the new asset’s risk to occupy an intermediate spot between the base assets but varying its mean return to increasingly higher levels,one would expect its optimal weight in the tangency portfolio to increase (as it does).

The two fund separation theorem decomposes any investment problem into [1] finding an optimal combination of risky assets and [2] finding the best combination of this optimal risky portfolio and the risk free asset. While the first part of the problem can be addressed independently across different investors without accounting for individual preferences,the latter part of the investment problem must be addressed in relation to the trade offs between risk and return that an individual is willing to incur. As we have seen several posts ago, individual preferences can be captured using indifference curves and utility functions. The total optimal portfolio, itself a combination of the optimal risky portfolio and the risk free asset, emerges at the tangency between preferences (as governed by utility functions and indifference curves) and investment opportunities (as governed by the capital allocation line that connects the riskless fund with the optimal risky fund).

While the previous post was concerned with issues surrounding the optimal risky portfolio, this post will concentrate on the total optimal portfolio. The objective here is to track how optimal asset weights change across individuals with different risk preferences using the framework defined in previous posts. Each investor will be associated with (and identified by) a unique risk aversion parameter ranging from 1 to 5 with increments of 0.5 separating successive agents. Intuitively, a higher risk aversion parameter should be associated with a total optimal portfolio that is less invested in the optimal risky fund than the riskless fund. The converse should be true for lower values of the risk aversion parameter.

##################################################################### #Supplement 3 ##################################################################### idx <- seq(1,5,by=0.5) lay.mat <- matrix(c(1,1,1,2,1,1,1,2,1,1,1,2,3,3,3,4),4,4,byrow=T) lay.h <- c(0.20,0.20,0.2,0.3) lay.w <- rep(1,4) n.assets <- 15 front.col <- adjustcolor(col=rainbow(n.assets),alpha.f=1) rf.col <- adjustcolor(col='grey',alpha.f=1) total.opt.weights <- NULL sim.opt <- simulate.assets(n.assets) sim.mvf <- MVF(sim.opt) cal.opt <- CAL.line('Sharpe',sim.opt,sim.mvf) DrawCAL(cal.opt,sim.opt,sim.mvf,legend.draw=T,lay.mat,lay.h,lay.w,main.title='Frontiers Plot\nwith optimal portfolios') DrawMVF(sim.mvf,FALSE,NULL,NULL) for(i in 1:length(idx)){ utility.contours('Sharpe',sim.opt,idx[i],sim.mvf) } expected.ret <- sim.mvf[[4]][1] risky.var <- (sim.mvf[[4]][2])^2 risk.free <- sim.opt[[4]] opt.risky.alloc <- matrix((expected.ret-risk.free)/(idx* risky.var),ncol=1) opt.riskfree.alloc <- matrix((1-opt.risky.alloc),ncol=1) opt.port.ret <- risk.free+opt.risky.alloc*(expected.ret-risk.free) opt.port.risk <- (opt.risky.alloc^2)*risky.var opt.utility <- opt.port.ret-(0.5*idx*opt.port.risk) z.data <- list() z.data$mean.ret <- matrix(sim.opt[[5]],nrow=1,ncol=n.assets,dimnames=list(c('mean return'),c(paste('Asset',1:n.assets)))) z.data$cov.matrix <-as.matrix(sim.opt[[2]],nrow=n.assets,ncol=n.assets,dimnames=list(c(paste('Asset',1:n.assets)),c(paste('Asset',1:n.assets)))) z.data$risk.free <- risk.free front<-Frontiers(z.data) risky.weights <- matrix(front$tang.weights,nrow=n.assets,ncol=1,dimnames=list(c(paste('Asset',1:n.assets)),c('tangency weight'))) for(i in 1:length(opt.risky.alloc)){ total.opt.weights <-cbind(total.opt.weights,opt.risky.alloc[i]*risky.weights) } total.opt.weights <- t(total.opt.weights) par(mai=c(0.65,0,0.55,0.15)) l <- length(idx) plot(col='green',pch=15,bty='o',x=opt.riskfree.alloc,y=1:l,cex=0.75,cex.axis=0.8,cex.lab=0.8,cex.main=0.8,yaxt='n',main='Optimal Weight\nrisk free rate',xlab='Weight',ylab='') polygon(y=c(1:l,l:1),x=c(rep(0,l),rev(opt.riskfree.alloc)),col=rf.col) text(x=opt.riskfree.alloc,y=1:l,idx,cex=0.7,col='darkgreen',pos=1) par(mai=c(0.65,0.53,0.15,0.3)) transition(total.opt.weights,colours=c(front.col),xlab='Risk aversion parameter',ylab='Asset weights',main='Weight transition map - Risky assets') par(mai=c(0.65,0,0.10,0.15)) plot(1, type="n", axes=F, xlab="", ylab="",bty='o',xaxt='n',yaxt='n') legend('center',fill=c(front.col,rf.col),legend=c(paste('Asset',1:n.assets),'Rf-asset'),ncol=2,bg='white',bty='n',cex=0.85,title='Total\nPortfolio Weights')

kk

In the code above,we simulate 15 random assets, plot them in the risk/return space along with the minimum variance frontier that they span,the optimal risky portfolio (tangency portfolio) that emerges from the markowitz procedure,the capital allocation line (CAL) that connects the riskless fund to the tangency portfolio, as well as the optimal total portfolios that emerge as points on the CAL. Since each investor is presumed to face the same universe of risky assets, the differences across total optimal portfolios across various agents depend on the associated risk aversion parameter.

The dashboard of plots follows.

ll

ll

While both transition maps are defined relative to the risk aversion parameter,I have separated the risky asset weights and riskless asset weights to better emphasise the point of the two fund separation theorem as well as making visualisation less muddy. The results corroborate the intuition that greater values of the risk aversion parameter are associated with increasing proportions of the total optimal portfolio being invested in the riskless fund. The transition function was adapted from alphaism and systematic investor.