Russell 2000 Softail Fat Boy
[This article was first published on Timely Portfolio, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
If the Russell 2000 were a motorcycle, maybe it should be a Harley-Davidson Softail Fat Boy. I have explored the exception case of the Russell 2000 in quite a few posts
but I still am not sure I have done a job of clearly and simply explaining some of the unique characteristics of the Russell 2000 over the last 25 years. The Russell 2000 has been extremely difficult to beat because the upside has been so good (fat boy) and the downside has been the same or better (softtail).
![]() |
From TimelyPortfolio |
![]() |
From TimelyPortfolio |
![]() |
From TimelyPortfolio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#explore exceptional case of the Russell 2000 | |
require(quantmod) | |
require(PerformanceAnalytics) | |
require(xtsExtra) | |
getSymbols("^RUT", from = "1900-01-01") | |
getSymbols("^GSPC", from = "1900-01-01") | |
#do initial exploration of distribution | |
chart.QQPlot(na.omit(ROC(RUT[,4],type="discrete",n=250))["1987::"]) | |
chart.QQPlot(na.omit(ROC(GSPC[,4],type="discrete",n=250))["1987::"]) | |
#explore barplot.xts to do a chart of annual returns for both indexes | |
#merge prices | |
prices <- merge(GSPC[,4],RUT[,4]) | |
#use endpoints to get annual returns | |
returns.annual <- as.xts(apply( | |
ROC(prices[endpoints(prices,"years")],type="discrete",n=1), | |
MARGIN = 2, | |
FUN = na.fill, fill = 0), | |
order.by = index(prices[endpoints(prices,"years")])) | |
#name columns something a little more clear | |
colnames(returns.annual) <- c("S&P 500","Russell 2000") | |
#using barplot.xts create the plot | |
#I made some subtle changes to barplot.xts to experiment so plot will be cosmetically different | |
barplot.xts(returns.annual, | |
stacked=FALSE, | |
box="transparent", #get rid of box surrounding the plot | |
ylim=c(-0.5,0.5), | |
ylab=NA, | |
border=c(brewer.pal(n=11,"BrBG")[c(4,9)]), | |
col=c(brewer.pal(n=11,"BrBG")[c(4,9)])) #deliberately trying some new colors | |
title(main="Annual Returns of S&P 500 and Russell 2000", | |
outer = TRUE, | |
adj=0.05, font.main = 1, cex.main = 1.25, line = -2) | |
require(latticeExtra) | |
require(reshape2) | |
roc <- na.omit(merge(ROC(GSPC[,4],type="discrete",n=250),ROC(RUT[,4],type="discrete",n=250))) | |
#name columns something a little more clear | |
colnames(roc) <- c("S&P 500","Russell 2000") | |
roc.melt <- melt(coredata(roc)) | |
asTheEconomist( | |
densityplot(~value,data=roc.melt,groups=Var2, | |
#par.settings=theEconomist.theme(box="transparent"), | |
#lattice.options=theEconomist.opts(), | |
auto.key=list(space="right",col=(brewer.pal(n=11,"BrBG")[c(9,4)]),lines=FALSE), | |
col=(brewer.pal(n=11,"BrBG")[c(9,4)]), | |
ylab=NA, | |
main="Annual Returns (Rolling 250 Day) of S&P 500 and Russell 2000") | |
) | |
To leave a comment for the author, please follow the link and comment on their blog: Timely Portfolio.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.