Replicate Paper with R and rCharts

Fact, Fiction and Momentum Investing

It seems that Gary Antonacci from Optimal Momentum and I were simultaneously enjoying this fine working paper on momentum.

Fact, Fiction and Momentum Investing
Asness, Clifford S. and Frazzini, Andrea and Israel, Ronen and Moskowitz, Tobias J.
available at SSRN
May 9, 2014

I have had it in an open Chrome tab since the day it was posted to SSRN. Even after reading a couple of times, I left it open intending to attempt a replication in R since the data was available, the math was understandable, and the topic was interesing. Beyond a simple replication, I also wanted to add some rCharts and slidify. Below is a fairly complete replication of myths 1 - 3. I have chosen echo = F to hide most of the code. If you would like to see the code and replicate for yourself, please see the Github repository.

Once again this amazing resource Kenneth French Data Library will be our data source. We will use the monthly data files. My code to retrieve these is ugly. Feel free to functionalize it if you have the desire.

For Table 1 the authors try to dispel the notion

Myth #1: Momentum returns are too “small and sporadic”.

Instead of a table I thought some rCharts + dimplejs for an interactive table might help visualize the annualized returns and Sharpe ratios of each of the four factors.

Combining Sharpe and return on the same chart is not ideal, but I thought it would demonstrate some of the power of dimplejs. A facetted approach or separate (small-multiples) charts here would work much better since the scales are so different.

For Table 2 which also seeks to refute the "small and sporadic" Myth #1, we can employ the Gmisc package to easily produce a fairly good looking HTML table.

Table 2: Probability of 1 Year Positive Returns
Sample Mkt.RF SMB HML Mom
1927::2013 70.96 58.08 63.41 80.54
1963::2013 71.88 60.07 64.23 80.03
1991::2013 78.11 61.89 61.13 75.85


I will not produce a chart for every table, but I feel like a couple more will not hurt anything. As in the previous chart, this will use rCharts and dimplejs.

Now for the right half of Table 2 which shows the probability of 5 year positive returns, let's do the same thing with a table and then a chart.

Table 2: Probability of 5 Year Positive Returns
Sample Mkt.RF SMB HML Mom
1927::2013 81.73 64.97 88.53 87.61
1963::2013 77.03 65.1 87.52 88.79
1991::2013 73.27 74.65 74.19 71.43


I have been using iframe mode with rCharts, but for example purposes, I will show this next chart with inline. inline can be cleaner but with multiple charts and especially multiple libraries can be problematic with conflicts.

Table 3 offers even more proof for the arguments against "small and sporadic". It blends pieces of Table 2 with the Sharpe Ratio and probability of positive returns on a portfolio of 60% HML (Value) and 40% UMD (Momentum). This simple portfolio produces very solid results and inspires me to further my exploration of the rebalancing concept introduced in my post Unsolved Mysteries of Rebalancing.

Table 3: 1927 - 2013
  Mkt.RF SMB HML Mom HML60_UMB40
Sharpe Ratios 0.41 0.26 0.39 0.50 0.80
% Positive, 1-year Rolling 0.71 0.58 0.63 0.81 0.81
% Positive, 5-year Rolling 0.82 0.65 0.89 0.88 0.92

We will need to pull in some more French data to work through the next set of tables. This data 6 Portfolios Formed Monthly on Size (3) x Momentum (2) will allow us to decompose the momentum factor into short and long buckets and also small and large size buckets.

Now that we have the additional French data, we can replicate the authors` attempt to disprove

Myth #2: Momentum cannot be captured by long-only investors as “momentum can only be exploited on the short side”.

My numbers differ slightly on the market-adjusted returns (left half), but are close enough to think that the approach is the same.

Table 4
UMD market-adjusted returns  UMD returns minus market
Sample Short Side Long Side UMD % Long   Short Side Long Side UMD % Long
1927::2013 4.98 5.62 10.59 53.0   2.19 6.09 8.28 73.6
1963::2013 3.75 5.43 9.18 59.1   2.45 5.92 8.38 70.7
1991::2013 3.74 4.96 8.70 57.0   1.05 5.24 6.29 83.2

The last myth that we will tackle here, but only the 3rd of 10 myths in the paper, is

Myth #3: Momentum is much stronger among small cap stocks than large caps.

We will use the same French data (HML (3) x SMB (2)) from Table 4 to replicate Table 5. I will leave the right half (Value) of this table as homework.

Table 5
Momentum
Sample UMD Small UMD Big Mom
1927::2013 9.75 6.81 8.28
1963::2013 11.26 5.50 8.38
1991::2013 8.10 4.49 6.30

As I hope you can tell, this post was more a function of the efforts of others than of my own.

Thanks specifically: