JustinMShea / ExpectedReturns

39 stars 18 forks source link

Vignette: Momentum and trend following: Time Series Momentum #17

Open jaymon0703 opened 4 years ago

jaymon0703 commented 4 years ago

Create a Static Vignette. Save the vignette .Rmd file to the parser folder, and then follow the instructions referenced in issue #20.

Paper & Data

Link to Journal of Financial Econoimcs paper Time Series Momentum

Parser containing updated momentum factor data Parser containing updated HML Devil factor data (use for devil factors and Global MKT Factor for MSCI) Parser for long run commodity index data (use for GSCI) Fama-French Factors in data/ folder. Intermediate-Term bond index for BOND via FRED.

Figure 3

Plots the cumulative excess return to the diversified time series momentum strategy over time (on a log scale)

Figure 4

Plots the TSMOM returns against the market index returns.

Table 2

t-statistics of the alphas of time series momentum strategies with different look-back and holding periods.

Reported are the t-statistics of the alphas (intercepts) from time series regressions of the returns of time series momentum strategies over various look-back and holding periods on the following factor portfolios: MSCI World Index (AQR Global mkt fator), Lehman Brothers/Barclays Bond Index (generic intermediate-term bond), S&P GSCI Index (commodities for the long run index), and HML, SMB, and UMD Fama and French factors from Ken French's Web site.

Table 3

Performance of the diversified time series momentum strategy

Panel A reports results from time series regressions of monthly and non-overlapping quarterly returns on the diversified time series momentum strategy that takes an equal-weighted average of the time series momentum strategies across all futures contracts in all asset classes, on the returns of the MSCI World Index (AQR Global MKT factor) and the Fama and French factors SMB, HML, and UMD, representing the size, value, and cross-sectional momentum premiums in US stocks.

Panel B reports results using the Asness, Moskowitz, and Pedersen (2010) value and momentum “everywhere“ factors instead of the Fama and French factors, which capture the premiums to value and cross-sectional momentum globally across asset classes.

Panel C reports results from regressions of the time series momentum returns on the market (AQR Global Mkt), volatility (VIX), funding liquidity (TED spread), and sentiment variables from Baker and Wurgler, 2006, Baker and Wurgler, 2007, as well as their extremes.

Table 5. Time series momentum vs. cross-sectional momentum.

Panel A reports results from regressions of the 12-month time series momentum strategies by asset class (TSMOM) on 12-month cross-sectional momentum strategies (XSMOM) of Asness, Moskowitz, and Pedersen (2010).

Panel B reports results from the decomposition of cross-sectional momentum and time series momentum strategies according to Section 4.2, where Auto is the component of profits coming from the auto-covariance of returns, Cross is the component coming from cross-serial correlations or lead-lag effects across the asset returns, Mean is the component coming from cross-sectional variation in unconditional mean returns, and Mean squared is the component coming from squared mean returns.

Panel C reports results from regressions of several XSMOM strategies in different asset classes, the Fama-French momentum, value, and size factors, and two hedge fund indexes obtained from Dow Jones/Credit Suisse on our benchmark TSMOM factor.

JustinMShea commented 4 years ago

We need to transform this into a static vignette as suggested in issue #20.

As part of this, in the data section, we should not source parsers, but fully display the parser code within the vignette. This will allow users to reproduce everything from this single vignette.

JustinMShea commented 4 years ago

@vi-to @jaymon0703 I've updated the notes above. Most tables are complete. I added graphs should be very easy and we have the data, and illustrate the problem well. The biggest work is the static vigentte, and switching out MSCI for AQR Gobal mkt factor, in addition to showing the full data parser script within the vignette.

There are minor issues, like Fama-French should be sourced from data/FF3.monthlyRdata on L86 L87, instead of downloading it fresh onto the users machine.

A more in depth code review pending.

vi-to commented 4 years ago

Loading is the best, just wanted to point out that as a result of 2bbf27a the existing data/FF3.monthly.RData should be updated. At this point I'm wondering why not making e.g. a data/FF4.monthly.RData with Momentum as well instead? (See also #16).

Thanks for reviewing, looking forward to receiving the more in depth reviews pending.

JustinMShea commented 4 years ago

Good idea, go for it!

jaymon0703 commented 4 years ago

Hi @vi-to any reason for removing TSMOM All Assets portfolio from the regression in line 172 y <- colnames(TSM[, -1])?

vi-to commented 4 years ago

Hey @jaymon0703, thanks for reviewing! Apparently no, the only explanations coming to my mind is that it's just a leftover from when TSM was a data.frame. But yes, the portfolio level TSMOM regression is definitely in the paper so thanks for fixing.

For what concerns subsetting series by papers sample periods in 96f5851, this is a recurrent topic and perhaps it's worth providing more discussion. We are using replication data sets authors provided and thus yes, unless we (or R packages used) are doing wrong computations, I'd assume in good faith that restricting scripts on the given sample period should typically hold results close to those printed in the paper. In this and other cases in the repository (e.g., #13 , #15, #19), thankfully AQR maintains and shares updated data sets. Web-based data parsers we have try to import updated data series and therefore as long as this goes we can always study fresh data and produce "updated results". By and large, this will likely bring to more or less divergent results from actual printed results in the paper, yet if claims in the papers reasonably hold I'd expect results to remain in line.

This being said, of course, I check results on the sample period myself and often leave this subsetting in comments for others to see. With xts such subsetting is easy and self-explanatory, with data.frames less so. Because there are quite often many such computations to carry, I'm not sure we want to proceed with that kind of subsetting each and every time? May we simplify by doing it in principle, say within data imports?

Given the topic recurrence, we may discuss in #18 and reference thereafter.

JustinMShea commented 3 years ago

Getting a build error on L352

Error in `.rowNamesDF<-`(x, value = value) : 
  duplicate 'row.names' are not allowed