Thursday, September 11, 2014

R User Group in Birmingham, AL

If Birmingham, UK has one, then Birmingham, AL, USA should too.image

There is a big gaping hole in R user groups between Georgia and Texas that I think needs filling.  Way back in 2011, I weakly posted R User Group Birmingham Alabama, but this time I am more determined.  (note: I might even consider some Julia and Python, and sure you all know I love some Javascript)

image

 

Thanks to @matlabulous for his award winning Shiny analysis of R user groups that supplied the screenshots for this post.

Tuesday, September 9, 2014

Frazzini goes French

A kind reader commented “Don’t know if you have seen it, but Frazzini goes French now too” .  I have profusely thanked and praised Kenneth French for his incredible data library.  Now, it appears I’ll have to repeatedly do the same for Andrea Frazzini.

Here is a quick plot of Quality Minus Junk (QMJ) around the world.  The code snippet is below the chart.

image

#ssrn citation to the paper
#Asness, Clifford S. and Frazzini, Andrea and Pedersen, Lasse Heje
#Quality Minus Junk (October 9, 2013)
#Available at SSRN: http://ssrn.com/abstract=231243



require(gdata)
require(quantmod)
require(latticeExtra)

#read spreadsheet
qmjFactors <- read.xls(
"http://www.econ.yale.edu/~af227/data/QMJ%20-%20Factors%20-%20monthly.xlsx"
,pattern = "DATE"
,blank.lines.skip = T
,stringsAsFactors = F
)
#convert spreadsheet data to R xts
#remove % with gsub, make numeric, and divide by 100
qmjFactors.xts <- as.xts(
do.call(cbind,
lapply(
qmjFactors[,-1]
,function(x){
df<-data.frame(as.numeric(
gsub(
x=x
,pattern="%"
,replacement=""
)
)/100)
colnames(df) <- colnames(x)
return(df)
}
)
) #date is first column; will use in order.by
,order.by = as.Date(qmjFactors[,1]) #as.Date(paste0(qmjFactors[,1],"-01"),format="%Y%m%d")
)

#xyplot(qmjFactors.xts)

asTheEconomist(
xyplot(
cumprod(1+na.omit(qmjFactors.xts))
, scales = list( y = list( relation = "same" ) )
, main = "Quality Minus Junk (2013)\nAsness,Frazzini, Pedersen\nhttp://ssrn.com/abstract=231243"
)
)