OpenSourceAP / CrossSection

Code to accompany our paper Chen and Zimmermann (2020), "Open source cross-sectional asset pricing"
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3604626
GNU General Public License v2.0
738 stars 218 forks source link

mom6mjunk data ends in 2017 #135

Closed chenandrewy closed 2 months ago

chenandrewy commented 1 year ago

Here are the obs counts by month:

image

Does the WRDS SP credit ratings data move after 2016? Here's the current data pull:

https://github.com/OpenSourceAP/CrossSection/blob/master/Signals/Code/DataDownloads/X_SPCreditRatings.do

mk0417 commented 1 year ago

Hi @chenandrewy, SP credit ends on Feb 2017. Post 2017 data is here: /wrds/capitaliq/sasdata/ratings/. This database covers ratings from 1923 to current date. See the document below for details https://wrds-www.wharton.upenn.edu/documents/1849/WRDS_Credit_Rating_Data_Overview.pdf

Maybe use CIQ rating data and replace comp.adsprate? ratingsymbol from CIQ ratings should be splticrm from SP credit if set ratingtypecode to STDLONG

chenandrewy commented 1 year ago

Ah, this is so helpful. Thank you @mk0417!! We'll address this on the next release.

chenandrewy commented 2 months ago

It seems like we need to append comp.adsprate with CIQ ratings data.

It's tempting to go with -just- the CIQ ratings data, but it seems like this data isn't really populated until 1991:

image

chenandrewy commented 2 months ago

The compustat ratings data coverage plummets in 2016 (below). So the simplest patch is to start using CIQ in 2016. image

chenandrewy commented 2 months ago

I decided to use CIQ's ratingaction == "Downgrade" whenever the Compustat data is missing. 4ecc256b9331f5a377664654338778385e6f7484

chenandrewy commented 2 months ago

Argh, I forgot that I need to update Mom6mJunk.do, as described in the title of this issue. Reopening.

chenandrewy commented 2 months ago

Updated Mom6mJunk.do. I ran into a wrinkle where the number of signal obs drops sharply around the Compustat to CIQ data switch. It seems this is (was) an issue with how we define the signal, where in the past we assign a stock to "Junk" if it has a Compustat credit rating that is low or blank. Following this method with the CIQ data leads to a big drop off in signal obs, because I think, these blank ratings are just capricious. So, I updated the code so that we only assign a stock to "Junk" if it has a proper credit rating and the credit rating is low. This leads to about 1,000 stocks per year with signals, and is relatively consistent across years. It is also consistent with Avramaov Hordia Jostova Philipov 2007 Table III

image

Code is updated here: https://github.com/OpenSourceAP/CrossSection/commit/c215204f2d95b865d310cc7912213749b2888b11