Previously, we setup the problem of constructing a minimum expected shortfall portfolio. We exported the portfolio weights from each quarterly rebalancing into R objects.
This post will process those weights and compare the portfolio statistics to a capweight portfolio, a minimum variance portfolio, an equal weight portfolio, the DIA ETF, and the SPY ETF. The weights are converted into share holdings and those holdings used to mark the portfolio. The returns from those marks are used for portfolio statistics. There is nothing new in the R code — all the topics have been covered previously in this blog.
A note on capweight. I do not have access to historic market capitalization. In a perfect world, the shares held in the current weighting would be the same as the initial weighting. I make the assumption that the “Adjusted Price” available from Yahoo! captures all historic corporate actions.
All R code and data frames can be found here.
The main portion of R code loads the data frames and then creates the portfolios by calling an R script for each portfolio.
require(fImport)require(PerformanceAnalytics)require(quadprog)setwd(“c:/temp/dow30_files”)vars = c(“mmm”, “aa”, “axp”, “t”, “bac”, “ba”, “cat”, “cvx”, “csco”, “ko”, “dd”, “xom”, “ge”, “hpq”, “hd”, “intc”, “ibm”, “jnj”, “jpm”, “mcd”, “mrk”, “msft”, “pfe”, “pg”, “trv”, “utx”, “vz”, “wmt”, “dis”)load(“optES”)load(“cov”)load(“prices”)load(“prices_wk”)load(“dia”)startingValue = 100000source(“functions.r”)source(“dow30_minES.r”)source(“dow30_ew.r”)source(“dow30_minVar.r”)source(“dow30_capw.r”)dia = as.xts(dia_spy$dia,dia_spy$Date)spy = as.xts(dia_spy$spy,dia_spy$Date)m = merge(minES,minVar)m = merge(m,ew)m = merge(m,capw)m = merge(m,dia)m = merge(m,spy)chart.CumReturns(m,main=“Reduced Volatility Portfolios”,legend.loc=“topleft”)print(table.AnnualizedReturns(m))print(table.CAPM(as.xts(m[,c(“minES”,“minVar”,“ew”,“capw”,“dia”)]),as.xts(m$spy)))
Without further ado here is the chart of cumulative returns:
We see the minimum variance portfolio outperforms the minimum ES portfolio. Those two along with the equal weight portfolio vastly outperform the traditional capweight, DIA, and SPY.
minES

minVar

ew

capw

dia

spy


Annualized Return

0.0538

0.0615

0.0367

0.0054

0.0119

0.0103

Annualized Std Dev

0.1722

0.1902

0.217

0.2149

0.205

0.2181

Annualized Sharpe (Rf=0%)

0.3122

0.3231

0.1689

0.025

0.0581

0.0471

The minimum ES portfolio has the lowest volatility, lower than the minimum variance portfolio. The Sharpe ratios are close between the two.
minES to spy

minVar to spy

ew to spy

capw to spy

dia to spy


Alpha

0.0002

0.0003

0.0002

0

0.0001

Beta

0.696

0.7852

0.9441

0.9372

0.9019

Beta+

0.7076

0.8009

0.9515

0.9471

0.9302

Beta

0.6882

0.7887

0.9369

0.9365

0.8927

Rsquared

0.7875

0.8212

0.9127

0.9166

0.9197

Annualized Alpha

0.0558

0.0653

0.043

0.0004

0.0209

Correlation

0.8874

0.9062

0.9554

0.9574

0.959

Correlation pvalue

0

0

0

0

0

Tracking Error

0.1037

0.0932

0.0653

0.0636

0.0619

Active Premium

0.0594

0.0671

0.0423

0.0002

0.0222

Information Ratio

0.5725

0.7195

0.6477

0.0038

0.3583

Treynor Ratio

0.0772

0.0783

0.0388

0.0057

0.0132

The interesting thing here is the downside beta from the minimum ES portfolio. It is the lowest of all the portfolios. That makes sense as our methodology takes into account portfolio skews and will tend to select portfolios with a positive skew. The minimum ES also has the lowest overall Beta and least correlation with the SPY.
This study is limited in scope and is intended as a proof of concept. The results show promise. Nothing here should be taken as investment advise.
Rbloggers.com offers daily email updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...