I have a question with regards to combining two data bases with a linking table:
Has anyone ever tried to combine the monthly stock return data table of CRSP with the yearly accounting data tables of Compustat through the CCM table? WRDS only offers a SAS solution, but unfortunately not one for R.
In detail: I have a table with all stock returns month-wise and their respective PERMNO-code (CRSP). I also have the yearly accounting data of these stocks with their GVKEY (Compustat). Obviously, the accounting data is the same for the company during the year and only changes every 12 months. Now I have the linking table which assigns each GVKEY to a PERMNO. I would like to combine them the following way:
Company | Month/Year | Return for this month | Accounting data columns | Stock Return columns for the prior 20 months
Does anyone have experience in this field?
Thanks in advance!