About me

My name is Henry Bowers, I graduated from CUNY Baruch College, Zicklin School of Business with a Bachelors of Business Administration in Finance & Investments. I have always had an interest in learning data science for finance to make better informed investment decisions. After taking online courses through Data Camp and reading many articles on R for finance. I decided to take a capstone course in financial econometrics, which was my favorite course in college. Throughout the class I was able to learn even more about risk management and data visualization of time series. I have a growing passion for understanding data science for finance and applying those skills to make better-informed investment decisions for my personal portfolio using computational finance strategies with R programming. Skills I developed include multi-asset portfolio construction, optimization, and quantitative risk management.

Linkedin: https://www.linkedin.com/in/henry-bowers/

Introduction

In undergrad we learned about the Efficient Market Hypothesis (EMH), and how it is nearly impossible to generate alpha constantly over time. Hence why their is active funds who seek to outperform the market and passive funds who mission is to replicate the returns of the market. Strong believers of EMH believe that conducting research on individual stocks to find at a fair value compared to the market value is pointless, because in their belief the market value we see includes everything is priced into the market. Famous investor Warren Buffet has been able to prove this hypothesis wrong year of year by following a very simple strategy of value investing. Investing into companies that have low PE ratios and companies that have a fair value larger then the market value, the current price we see on brokerages this will be another indication of an undervalued opportunity and investors are buying at a discount now and would be potentially rewarded later.


first.date = "2000-01-01"
last.date = "2022-06-06"


getSymbols(c("SPY", "BRK-B"), from = first.date, to = last.date, periodicity = "daily")
[1] "SPY"   "BRK-B"
prices <- merge(Ad(SPY), Ad(`BRK-B`))

rets <- Return.calculate(prices = prices, method = "log")

colnames(rets) <- c("SP500", "Buffet")

chart.CumReturns(rets, plot.engine = "ggplot2") + theme_classic() + scale_y_continuous(labels = scales::percent) + 
  labs(title = "SP500 VS Buffet", caption = "Data Source: Yahoo Finance", x = "Investment Horizon", y = "Cumulative Returns")

Since 2000 Warren Buffet has been able to outperform the SP500 year over year with a nice gap in between. According the EMH this should not be true and the only way to outperform the SP500 would be to take on additional risk measures, however that is completely wrong since Buffet is cut clear with his investment approach and buys companies that are financially stable and undervalued. Throughout the research report I will be answering the question whether or not if it is possible to outperform the SP500 by using sector ETFs and creating a simple linear optimization model then backtesting the performance against the SP500.

Disclosures

Data gathered for research has been downloaded from yahoo finance API, there is other sources to obtain data if you want to pay for a service. for retail investors obtaining data through yahoo finance is one of the best options. Historical returns are also not predictors of future performance.

Sector ETF Portfolio

I gathered the weights per sector from ETF.com which broke down the ETFs and the allocations.

Sector ETFs: https://www.etf.com/sections/etf-strategist-corner/sector-sector-sp-500?nopaging=1


ETFs <- c("VGT", "VHT", "VCR", "VOX", "VFH", "VIS", "VDC", "VPU", "VAW", "VNQ", "VDE")

ETF.Weights <- c(0.276, 0.135, 0.127, 0.108, 0.104, 0.084, 0.065, 0.028, 0.026, 0.024, 0.023)

sum(ETF.Weights)
[1] 1
getSymbols(ETFs, from=first.date, to=last.date, periodicity = 'daily')
 [1] "VGT" "VHT" "VCR" "VOX" "VFH" "VIS" "VDC" "VPU" "VAW" "VNQ" "VDE"
ETF.prices <- merge(Ad(VGT), Ad(VHT), Ad(VCR), Ad(VOX), Ad(VFH), Ad(VIS), Ad(VDC), Ad(VPU), Ad(VAW), Ad(VNQ), Ad(VDE))


ETF.rets <- na.omit(Return.calculate(ETF.prices, method = "log"))

ETF.current <- Return.portfolio(ETF.rets, weights = ETF.Weights, rebalance_on = "years")

colnames(ETF.current) <- "Sector ETF Portfolio"


SPY.rets <- Return.calculate(Ad(SPY), method = "log")

colnames(SPY.rets) <- "SP500"


returns.1 <- na.omit(cbind(SPY.rets, ETF.current))

chart.CumReturns(returns.1, plot.engine = "ggplot2") + theme_classic() + scale_y_continuous(labels = scales::percent, breaks = seq(-1,5,0.50)) + 
  labs(title = "SP500 Performance Vs Sector ETF Portfolio", x = "Investment Horizion", y = "Cumulative Returns", caption = "Data Source: Yahoo Finance")

From 2005, we could notice the Sector ETF has reached nearly 400% and lost about 50% in value during 2008 of the housing market crash. nevertheless, by investing into SP500 sector ETFs and using the weights of the industry, an investor would have had great returns over a long period of time. Since around 2010 that is when investors would start to notice the sector ETF portfolio has began to outperform the SP500 year over year. Even now with the war of Ukraine and Russia, the sector ETF portfolio is still outperforming. Which proves yet again EMH is false and it is possible to outperform the SP500 over a long period of time without taking on any additional level of risk.

Optimization of Sector ETF Portfolio

After proving that a sector ETF portfolio can outperform the SP500, now I will test whether or not if an optimization of the sector ETF portfolio could outperform the SP500. I will be using a simple optimization model with the objectives to maximize returns, and minimize standard deviation given a portfolio risk budget.


port.rets <- merge(ETF.rets)

port_spec <- portfolio.spec(assets = colnames(ETF.rets))

port_spec <- add.constraint(portfolio = port_spec, type = "full_investment") 
port_spec <- add.constraint(portfolio = port_spec, type = "box", min = 0.05, max = 0.45) 


port_spec <- add.objective(portfolio = port_spec, type = "return", name = "mean") 
port_spec <- add.objective(portfolio = port_spec, type = "risk_budget", name = "StdDev", min_prisk = 0.05, max_prisk = 0.10) 


opt <- optimize.portfolio(R = ETF.rets, portfolio = port_spec, optimize_method = "ROI")

round(extractWeights(opt), digits = 2)
VGT.Adjusted VHT.Adjusted VCR.Adjusted VOX.Adjusted VFH.Adjusted VIS.Adjusted 
        0.35         0.05         0.05         0.05         0.05         0.05 
VDC.Adjusted VPU.Adjusted VAW.Adjusted VNQ.Adjusted VDE.Adjusted 
        0.20         0.05         0.05         0.05         0.05 
Weights <- extractWeights(opt)

sum(Weights)
[1] 1
Optimized.Portfolio <- Return.portfolio(ETF.rets, Weights, rebalance_on = "years")

colnames(Optimized.Portfolio) <- "Optimized ETF Sector"


returns.2 <- na.omit(cbind(SPY.rets, Optimized.Portfolio))


chart.CumReturns(returns.2, plot.engine = "ggplot2") + theme_classic() + scale_y_continuous(labels = scales::percent, breaks = seq(-1,5,0.50)) + 
  labs(title = "SP500 Index Vs Optimized Sector ETFs", x = "Investment Horizion", y = "Cumulative Returns", caption = "Data Source: Yahoo Finance")

Now there is evidence of a simple optimization model outperforming the SP500 Index. As presented from the data despite global issues in our current state, the optimized portfolio is still outperforming the the SP500 by a long shot and not experiencing as many losses. This is mostly because the optimized portfolio has high allocations towards the technology sector and consumer stables sector. The portfolio is well off to take advantage of the massive growth potential from the tech sector and the defensiveness from the consumer sector to hedge against the down the fall of an economy since consumer stables is an essential industry for citizens to buy from.


returns.3 <- cbind(SPY.rets, ETF.current, Optimized.Portfolio)

table.AnnualizedReturns(returns.3, Rf = 0.0316/252, digits = 2)
                             SP500 Sector.ETF.Portfolio Optimized.ETF.Sector
Annualized Return             0.05                 0.08                 0.09
Annualized Std Dev            0.20                 0.19                 0.19
Annualized Sharpe (Rf=3.16%)  0.07                 0.26                 0.30
Return.cumulative(returns.3, geometric = TRUE)
                     SP500 Sector.ETF.Portfolio Optimized.ETF.Sector
Cumulative Return 1.744298             3.088505             3.551536

At the time I have made this report, the 10 year treasury yield is at 3.16%. Since 2005 the Optimized portfolio has outperformed both the sector ETF portfolio and the SP500. Optimized portfolio achieved 355% cumulative return meanwhile the SP500 reached a 174% cumulative return, which is a massive difference of 181%.