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

IBES-related missing values in 2022 revision? #90

Closed chenandrewy closed 2 years ago

chenandrewy commented 2 years ago

Yufeng Han (UNCC) writes:

In an effort to update the date we try to use your most recent data and found there are some differences between the new and old data. We used your 2020 data and try to update to your 2022 data, but some of the variables have more missing value in the new data than in the old data. I didn’t do an extensive comparison but just notice, for example, sfe and aop used to have more values for say permno 10000 in the 2020 data but now are all missing in the 2022 data. Do you have an explanation for this?

Both sfe and aop use ibes data. Perhaps there is an ibes linking issue in the 2022 update?

mk0417 commented 2 years ago

Hi @chenandrewy,

This might not be the linking problem. I had a check sfe of permno 10001 (ibes ticker GFGC).

Signals/Code/Predictors/sfe.do

keep if fpi == "1" & month(statpers) == 3 // OP uses march forecasts

keep if fpedats != . & fpedats > statpers + 90 // keep only forecasts past June

After the above two filters, this is the observations from IBES. We can see that there are no medest from 2002 to 2015.

ibes

Futher, after adding the condition below, there should be no values before 2007. So the values of sfe in the latest version is from 201603 to 201802

* only dec fyr ends
keep if month(datadate) == 12
comp
chenandrewy commented 2 years ago

Thanks @mk0417 for helping look into this!

There is no issue with linking, or with the code as far as I can tell. It seems that Yufeng Han was previously using data based on v0.1.2, and v1.0.0 and later included many more screens to match the text in the original papers.

Between these two code versions sfe had the following screen added:

image

We added this screen because, based on our reading, Elgers, Lo, and Pfeiffer only found predictability in low analyst coverage stocks:

image

It's worth noting that the Chen-Zimmermann strategies don't do size adjustment, as is done in the Elgers-Lo-Pfeiffer table.

AOP seems to have some new screens too:

image

I'm closing this issue since it seems to be tracked down now and as far as I can tell the missing values needed to try to match the original findings.