I’ve been reading The Big Picture, and again, there was a discussion about seasonality in stock markets (see
Fourth Quarter is Da Bomb).

I’ve already discussed the two seasonal investment scenarios (Nov. to Apr VS May to Oct) in this post, and was wondering if one could break it down further into a monthly analysis.

The quick R snippet below, edited in an informal way like this blog likes it, shows us a little boxplot (yes, I’m a sucker for those) of market returns per month. This suggests that the months of February and September are not witnessing great returns of the S&P 500.


require(quantmod)
require(PerformanceAnalytics)

getSymbols('^GSPC', from='1900-01-01')
m <- lapply(d, getMonth)
t <- monthlyReturn(GSPC)
d <- index(t)
getMonth <- function(i) {
        as.numeric(format(i, format="%m"))
}
t$month <- lapply(d, getMonth)
boxplot(monthly.returns ~ month, t)
title('Market returns by month')
abline(0,0)

Photograph used with permission from mylittleshoebox.ca