Tuesday, June 19, 2012

Where are the Fat Tails?

In Crazy RUT, I started to explore why the moving average strategy has failed for the last 2 decades on the Russell 2000.  I still do not have an answer, but I thought looking at skewness and kurtosis might help explain some of the challenge of beating this index.  I think--but don’t have as much rigid objective evidence as I would like--that moving average systems work best when skew is negative and kurtosis is positive because that implies that the bad stuff happens below the mean when you would be out.

The Russell 2000 has been remarkably tame in terms of skewness and kurtosis even including 2008-2009.

From TimelyPortfolio
From TimelyPortfolio

R code from GIST (do raw for copy/paste):

require(lattice)
require(latticeExtra)
require(directlabels)
require(reshape2)
require(quantmod)
require(PerformanceAnalytics)
#I will use a csv file of weekly returns to get more history
#but if you do not have access to that then use getSymbols for data to 1987
#getSymbols("^RUT",from="1900-01-01")
#then get weekly ROC
#rut.return <- ROC(to.weekly(RUT)[,4],type="discrete",n=1)
RUT <- read.csv("rut.csv",stringsAsFactors=FALSE)
RUT <- as.xts(RUT[,2],order.by=as.Date(RUT[,1]))
rut.return <- ROC(RUT,type="discrete",n=1)
#get skewness for short and long rolling periods
skew.short <- apply.rolling(rut.return,FUN=skewness,width=20,trim=FALSE)
colnames(skew.short) <- "roll20w"
skew.long <- apply.rolling(rut.return,FUN=skewness,width=250,trim=FALSE)
colnames(skew.long) <- "roll250w"
#do the same for kurtosis
kurtosis.short <- apply.rolling(rut.return,FUN=kurtosis,width=20,trim=FALSE)
colnames(kurtosis.short) <- "roll20w"
kurtosis.long <- apply.rolling(rut.return,FUN=kurtosis,width=250,trim=FALSE)
colnames(kurtosis.long) <- "roll250w"
#combine into data frame so we can melt as plot with lattice
skew <- as.data.frame(cbind(index(skew.short),coredata(merge(skew.short,skew.long))))
#melt to please lattice
skew.melt <- melt(skew,id.vars=1)
#clean up with good column names as properly formatted dates
colnames(skew.melt) <- c("date","measure","skew")
skew.melt[,"date"] <- as.Date(skew.melt[,"date"])
direct.label(asTheEconomist(xyplot(skew~date,groups=measure,data=skew.melt,type="l",lwd=c(1,3),
main="Russell 2000 Rolling Skewness")),"last.qp")
#combine into data frame so we can melt as plot with lattice
kurtosis <- as.data.frame(cbind(index(kurtosis.short),coredata(merge(kurtosis.short,kurtosis.long))))
#melt to please lattice
kurtosis.melt <- melt(kurtosis,id.vars=1)
#clean up with good column names as properly formatted dates
colnames(kurtosis.melt) <- c("date","measure","kurtosis")
kurtosis.melt[,"date"] <- as.Date(kurtosis.melt[,"date"])
direct.label(asTheEconomist(xyplot(kurtosis~date,groups=measure,data=kurtosis.melt,type="l",lwd=c(1,3),
main="Russell 2000 Rolling Kurtosis")),"last.qp")

3 comments:

  1. Perhaps this paper be of help: http://www.frankfurt-school.de/clicnetclm/fileDownload.do?goid=000000311260AB4

    ReplyDelete
  2. outstanding paper. I really appreciate you sharing this with me. Look for some posts very soon incorporating this analysis.

    I knew there was a reason I was doing all this blogging for free. Thanks.

    ReplyDelete
  3. I feel humbled, your blog is one of the best out there - keep up the good work!

    ReplyDelete