Abstract
Markowitz detailed, in his work on portfolio theory, that optimal combinations of assets exist. That is, given a level of risk, there is a combination of investments that will have the greatest return. These possible combinations form a “frontier”, or “Markowitz Bullet”. Ideally, ones portfolio should lie on this frontier (that is, you’re getting the highest return for your desired level of risk). An investor can then leverage some assets, and short others, to exceed even the frontier.

This concept is explained far better by a nobel laureat

Currently, I have a random assortment of mutual funds in my IRA and 401k. Likewise, I have a few securities, purchased on a whim or through my employers stock purchase program. I am curious as to how “inefficient” my current asset distribution is.

To that end, I first created a list of my current assets, and their relative weights in my portfolio:

stocks <- c(
"DODFX" = .063,
"VIIIX" = .223,
"VMCPX" = .055,
"VSCPX" = .027,
"VBMPX" = .063,
"JEC"   = .178,
"GOOG"   = .047,
"AAPL"  = 0.0077,
"VMGMX" = 0.119,
"VWINX" = 0.030)

Using the package ‘stockPortfolio’, I will retrieve the returns and volatilities of each asset

library(stockPortfolio)
stockData <- getReturns(names(stocks),start="2013-01-01",end=NULL,freq="month")

Next, using the quadprog package, the returns and risk of a variety of portfolios is calculated.

And then the plot is created:

It is clear that my current portfolio does not lie on the bullet. I am curious as to which portfolio allocation has the same risk as my actual. To that end, a vertical line is drawn through the current allocation, and the data.frame of portfolios is subsetted to this level of risk. The “efficient” portfolio is then:

#The portfolio on the frontier that has the same risk profile has the makeup of:
sameRiskEfficient<-eff[which(abs(eff$Std.Dev-sqrt(currentPerformance$V))==min(abs(eff$Std.Dev-sqrt(currentPerformance$V)))),]

sameRiskEfficient
##            DODFX     VIIIX VMCPX        VSCPX       VBMPX          JEC
## 83 -4.181594e-17 0.4042609     0 6.040678e-19 1.09165e-16 6.120383e-18
##         GOOG       AAPL        VMGMX     VWINX    Std.Dev Exp.Return
## 83 0.2007181 0.03737905 5.443083e-16 0.3576419 0.02717775 0.01227375
##       sharpe
## 83 0.4516103

It appears that I should increase my holdings of Google, Vanguard’s Institutional Index Fund, and Vanguard’s Wellesley Income Fund. For fun, I will track these two portfolios over the next few months, and see which performs better.

The code for this markdown file, as well as the underlying analysis is availabe @ my githubpage