JustinMShea / ExpectedReturns

40 stars 18 forks source link

Vignette: Value-oriented equity selection: Value and Momentum Everywhere! #15

Open JustinMShea opened 4 years ago

JustinMShea commented 4 years ago

Per @braverock "Lets get a working example into a new vignette no later than tomorrow". "Value and momentum everywhere". Asness, Moskowitz, Pedersen (2013).

https://www.aqr.com/Insights/Research/Journal-Article/Value-and-Momentum-Everywhere

Code

Data

AQR website

vi-to commented 4 years ago

For future reference, also related to comments under 1e75089.

We obtain factors and returns data from different sources. Sometimes they express returns (or excess returns) as a decimal number, other times as a percentage. It's a linear transformation so for regressions we run (and we run many), as long as all variables are expressed in the same "unit" there's no difference. Mixing up "units" will return rather silly results.

An idea can be to establish a preferred unit (keeping in mind potential instabilities) and then transform variables as we get them from the source (eg, in parsers and/or scrapers).

braverock commented 4 years ago

we should transform them to decimals. 0.05 for 5%.

This makes all the math work.

jaymon0703 commented 4 years ago

Hi @vi-to are we meant to estimate factor betas for 48 equations, using equation 5? The plot datapoints in Figure 6 and this line could be interpreted this way - "Specifically, we estimate the time series regression for each of the 48 high, middle and low value and momentum portfolios across asset classes:

image

vi-to commented 4 years ago

Hey @jaymon0703, we are meant to do so and it's what we are already doing. Time-series regressions factor betas are the betas.

For figure 6 data points is a matter of calculating the actual (portfolios) average returns and the predicted (portfolios) expected returns plugging in estimates. I will add it shortly.

vi-to commented 4 years ago

Authors use Fama-French (1992) TERM and DEF factors for their "Fama-French 6 factors model". In this regard, they write:

Finally, since we do not have data to construct TERM and DEF internationally, we use the U.S. versions. (p. 956)

Clearly, this is "only" a data availability issue. In their global pricing approach, international proxies should be the natural fit. The issue is common, especially in the case of corporate bonds, for which worldwide long series are generally unavailable (this varies by countries, there could be decades unrecorded depending on the pair of countries considered).

Even broadly used industry benchmarks such as the FTSE WGBI (formerly by Salomon Brothers and later by Citi, until LSEG), and the S&P International Corporate Bond Index, respectively, have different methodologies in a number of relevant characteristics: underlying maturities, whether there has been currency hedging or inflation adjustment, and importantly securities' credit ratings and selection criteria. Sometimes underlings are not precisely the same securities, but broader forms of debt. Using them both as proxies of such factor models would likely need to be specifically examined.

This being said, in aggregate terms the U.S. remains the country with highest weight and the one for which the longest data series are commonly available. For both, government and corporate bonds. FRED offers a wealth of data, yet even for the "U.S. versions":

To alleviate such difficulties, a convenient replication data set could be the one from "The Credit Risk Premium" by Richardson and Asvanunt. It is transparently provided by AQR at https://www.aqr.com/Insights/Datasets/Credit-Risk-Premium-Preliminary-Paper-Data. However, the data set appear to be only partial ("preliminary") and some of the above-mentioned aspects can be identified in available data.

Another option may be to resort to Option-Adjusted Spread (OAS) Indexes as, for example, Ilmanen (2011) argues. FRED provides ICE BofA indexes, however perhaps similar availability issues may arise.

[This discussion can be relevant to #17, with respect to the BOND factor from Barclays.]

braverock commented 4 years ago

FRED fixed corporate income data:

https://fred.stlouisfed.org/categories/32348

I think we have all tenors and rating bands for US corporate bonds.

For international, it is much trickier... we won't have ratings, but that's generally OK, because generally only the highest quality companies internationally can issue corporate bonds.

I can select series here if necessary, but I think that you can use the FRED series to get whatever indices and spreads that you are looking for.

vi-to commented 4 years ago

Thanks @braverock. So, since authors mentioned Fama-French (FF) without further details, independently of the cross-country dimension I'm assuming they refer to the original versions of those factors.

Government bonds. For TERM, FF originally used two composite portfolios covering maturities of 1 to 5 and 6 to 10 years. Combining FRED and U.S. Treasury data, I do believe we can cover this factor at least for the US.

Corporate bonds. For DEF, FF included all Moody's ratings from Aaa to LG (below Baa). From FRED I can only see Moody's Aaa and Baa, which gets us bonds with 20+ yrs maturities until medium-grade. Does each include the full spectrum of Aaa1, Aaa2, Aaa3 and Baa1, Baa2, Baa3, respectively?

The latter is what I'm finding less convincing in data sources at the moment. Not to be pedantic, but being some LG missing in principle one may have reasons to suspect an undue factor underestimation. For this reason, while looking forward to receiving your reply, I'm adding a quick parser for https://www.aqr.com/Insights/Datasets/Credit-Risk-Premium-Preliminary-Paper-Data. Here authors used Barclays U.S. Corporate Investment Grade Index and U.S. Corporate High Yield Index reported to reach until Baa3 rating for the same 20+ yrs maturities as FRED-Moody's. We may also need to take advantage of their 20+ yrs total government bonds total returns series (obtained from different sources, including Ibbotson Associates and Citi) because, although it certainly is not what FF did, it matches corporate bonds maturities we're looking at. What do you think?

Lastly, their data series are provided only until 2014, which is OK to replicate results in this paper, but perhaps a limitation to attempt updated results.

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 3 years ago

@JiaruiWang-Jill Revisiting this, with an emphasis on refactoring code to FactorAnalytics package functions, starting at line 296

JustinMShea commented 3 years ago

Several issues with chunk on L237. Needs to be refactored, as there is a mismatch of month end dates on various data sets that create a messy merge

JustinMShea commented 2 years ago

@bryan506 Looks like I'm getting the following error:

Quitting from lines 337-369 (Value-momentum-everywhere.Rmd) 
Error in pdata.frame(data, index) : 
  variable PORTF.ID does not exist (individual index)
Calls: <Anonymous> ... eval -> <Anonymous> -> eval -> eval -> plm -> pdata.frame
Execution halted

It's generating in the previous code chunk here. Looks like another merge issue has corrupted a variable name https://github.com/JustinMShea/ExpectedReturns/blob/8bb451da71337433d4e64c6ebb9f515acc50d23b/vignettes/Value-momentum-everywhere.Rmd#L330