Q) I tried to match IBES Detail Recommendations with Detail History File based on analyst code, IBES ticker, and recommendation/forecast dates. For roughly 50% of recommendations, I could find at least one earnings forecast issued on the same date as the recommendation. However, for the rest, I couldn’t find any accompanying earnings forecasts. Why is this?
A) There are several issues you need to take into account when merging Detail Recommendations and History files. First, IBES stores the ticker variable in two different LENGTHs in the two files, so to avoid any problems with the merge, the TICKER variable in the Detail History File needs to be expanded to 7 characters (the same length as in the Recommendations File).
Second, the merge on dates should not be an "equality" condition. Our detrec sample program may help you.
Or if you are a WRDS-UNIX users, you can look directly at: /wrds/ibes/samples/detrec.sas