Hi, I am using the following to download crsp/Compustat data. I want to download daily stock data not monthly. So, I have to change msf to dsf. Am I right? And I need data from 2000 to 2015. I don't need all the historical data. How will I customize the date? I also need the outstanding share to collect. Please help. proc sql; create table CCM_LINK as select distinct a.permno, gvkey, liid as iid, date, prc, vol, ret from crsp.msf as a, /*CRSP Monthly stock file*/ crsp.msenames ( where=(shrcd in (10 11)) /*Common stocks of U.S. Companies*/ ) as b, ccm.Ccmxpf_linktable ( where=( linktype in ('LU' 'LC') /*KEEP reliable LINKS only*/ and LINKPRIM in ('P' 'C') /*KEEP primary Links*/ and USEDFLAG=1 ) /*Legacy condition, no longer necessary*/ ) as c where a.permno=b.permno=c.lpermno /*Linking by permno*/ and NAMEDT<=a.date<=NAMEENDT /*CRSP Date range conditions*/ and linkdt<=a.date<=coalesce(linkenddt, today()); /*LinkTable Date range conditions*/ quit; proc download data=CCM_LINK out=common.ccm_link; run; endrsubmit;
... View more