180 likes | 422 Views
WRDS Workshop. Part 1 UNC – Charlotte Department of Accounting. By: Keejae Hong. Data Source?. Commercial database CRSP, COMPUSTAT , IBES, AuditAnalytics and many other data are available through WRDS … http://wrds-web.wharton.upenn.edu directEDGAR
E N D
WRDS Workshop Part 1 UNC – Charlotte Department of Accounting By: Keejae Hong
Data Source? • Commercial database • CRSP, COMPUSTAT, IBES, AuditAnalytics and many other data are available through WRDS… • http://wrds-web.wharton.upenn.edu • directEDGAR • Facilitates the hand-collection of SEC filings (10-K) • http://www.directedgar.com/
What package (software) do I use? • Learning more than one package is unavoidable (SAS vs. stata) • Willingness to run existing programs/routines in a different package can save you time • Do I need to learn FORTRAN/C or UNIX Operating system? • Advantages of UNIX • Powerful system • Remote access is possible • Free up your PC • Advantage of FORTRAN/C/C++ • More flexible, • Disadvantage?
Compustat • Annual, Quarterly, and Segment Financial Statement Data: • Active and Inactive Files • North American Public Firms • Updated annually (quarterly with more money) • Over 40 years data on WRDS
CRSP Stock • Provides stock market data for NYSE, AMEX, and Nasdaq firms • Prices, Returns, etc. • Monthly and Daily • Market returns
Standard & Poor’s ExecuComp • Executive and Director Compensation • Including option and stock holding by insiders • Updated annually
Institutional Brokers Estimates System (I/B/E/S) • Monthly analyst forecastson earnings, cash flows, dividend, sales and etc. • Summary and Detail Files • Adjusted and Unadjusted numbers available • 1987 to current • US companies and International companies
WRDS • Request account • wrds.wharton.upenn.edu/wrdsauth/account_req.shtml • Our subscription • http://wrds.wharton.upenn.edu/mywrds/dslist_desc.shtml • CRSP • Compustat • ExeuComp • A lot of free data: Fama French factors, etc. • We do not subscribe to • CRSP / Compustat Merged Database
How to pull data from WRDS? • To access the WRDS through the web interface • http://wrds.wharton.upenn.edu/ • To access the WRDS through UNIX • FORTRAN or C • Download SSH (secure tools) from webstore (free) • http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html • To remotely access the WRDS through SAS • WRDS and STATA do not support this function yet • To be explained later
Database in WRDS • How to access? • Web Querying? • If files are too large, you may have to split • Unix of WRDS • Where is the data in Unix of WRDS • /wrds/crsp/sasdata (fortran C++ etc) • How to access data in Unix? • Download directly • SSH file transfer • Program to retrieve data • SAS • Fortran and C++ • Where are sample program codes? • wrds.wharton.upenn.edu/support/dslist/dslist.shtml
How to SAS in WRDS? • PC SAS -Remote Submit • Where to get help? • wrds.wharton.upenn.edu/support/docs/wrdsSASConnect.shtml • Use WRDS server to remotely execute SAS • Good for stupid old PC computers • Easily get disconnected • Not always so fast • SAS in Unix of WRDS • Where to get help? • wrds.wharton.upenn.edu/support/index.shtml
PC SAS—Remote SubmitSample Codes • %let wrds=wrds.wharton.upenn.edu 4016;options comamid=TCP remote=WRDS;signon username=_prompt_;rsubmit;* libname comp '/wrds/compustat/sasdata'; *not necessary;data mydata;set comp.compann;where yeara=2002;proc print data=mydata (obs=30);run;endrsubmit;
SAS in Unix of WRDS • Write program and compile it • Use WRDS server • Personal account: 750 MB • Nearly unlimited temporary capacity • /wrds/sastemp01-09 • Only 48 hours or even shorter
Where to get help? • WRDS: http://wrds.wharton.upenn.edu/support/dataoverview.shtml • CRSP, Compustat and IBES documentation • WRDS: wrds.wharton.upenn.edu/support/docs/manual.shtml • Unix Programming • WRDS: wrds.wharton.upenn.edu/support/index.shtml • SAS programming • support.sas.com/onlinedoc/913/docMainpage.jsp
Good empirical research practice • Know your data well • Avoid shortcuts: • Learn to code properly – don’t modify your data by hand • Learn to do the data extraction (avoid WRDS web interface) • Document!: • Source of each series, how it was modified • Include detailed comments in your programs • Create a document in which you have a flow chart (what program creates what files, what inputs are needed), as summary description of your files, a list of things to do.
Practice Input file • Calculate compounding return of stock and value-weighted market return using one year daily return over the time period starts n_month_after, e.g., 3 months after fiscal year and month end Output File