Last Updated: 21 Jul 2022 Views: 524 (After reading, tell us below if this answer was helpful)

How do I access WRDS via SAS?


Most of the time, databases in WRDS are accessed via the standard web interface. If you have an individual WRDS account, you may prefer to access the databases directly via SAS scripts.  This will allow you to write large, efficient queries that combine data sets, then download just the resulting data. It is particularly useful for BoardEx which has many linked tables of data (for example, the gender of a person is kept in a different table to the employment history, linked by person ID). See SASsyFridays Introduction to SAS to learn more about the SAS.

You can access to WRDS via SAS in one of following ways:

  1. PC SAS on Windows
  2. SAS Studio
  3. WRDS Cloud (advanced)

PC SAS  

Using PC SAS on Windows

WRDS provide a training exercise for PC SAS. It requires the use of a PC with SAS installed, such as the Eddie Davies Finance Zone (Bloomberg Suite), Humanities Bridgeford Street 2.1 and 2.2, and George Kenyon computer clusters.

Using SAS Studio

WRDS provide a training exercise for SAS Studio. It works via the web. This is the newest method available and perhaps the easiest to configure. Access SAS Studio.

  • Look up the Library and File name described in the 'Variable Descriptions' tab of a data set's web query page.
  • Use these to find the data set in SAS Studio under 'Libraries', for example, 'COMPD' then 'G_SECURITY' for the Compustat Global securities details. 
  • You can run queries and add filters, for example, filter to 'excntry' = 'GBR' for exchange country of the United Kingdom.
  • You can download your queries from SAS Studio (up to 10 GB).
    1. After running a query or filter, browse to the 'WORK' Library then 'QUERY' table to see the most recently run query, right-click and choose 'Export'.
    2. Select the home directory and type a filename.csv.
    3. Then go to 'Server Files and Folders', find your file and right-click 'Download'. 

Using WRDS Cloud (advanced)

PGR and academic researchers can write SAS scripts, upload them to run on the WRDS Cloud server then download the results. See our (slightly out-of-date) blog posts on WRDS Cloud for more details.

Using Eventus via SAS

One of the databases you can use via SAS is Eventus. There is a slight change of syntax that may be required if you use SAS Studio with the SAS data set containing the Fama-French factors:

  • Documentation says: Eventus Monthly FFF=FF.Factors;
  • Change for SAS Studio: Eventus Monthly FFF=ff.Factors_monthly;