Posts Tagged ‘Eventus’

Converting an SAS dataset into an Excel file

The Statistical package SAS is often used by researchers who have to deal with very large datasets. It is also used by WRDS (Wharton Research Data Services): a WRDS web query runs a SAS program (using the values on the web form as program parameters) and makes the result dataset available.

For some Eventus web queries on WRDS the results are only available as a SAS dataset. You can convert this to Excel (if it is not too large) using the SAS software.

SAS Export

SAS 9.4 Export wizard

SAS 9.4

  1.     Open the SAS dataset file
  2.     Select File and Export Data
  3.     Follow the SAS Export wizard (Excel is the default)
  4.     Select Finish to start the export
  5.     If the export fails, this is probably due to an incompatability between SAS and Microsoft Office/Excel. The simplest workaround is to use a different format: comma separated values (*.csv), Stata file (*.dta), SPSS file (*.sav) etc.

SAS Enterprise Guide

  •     Open the SAS dataset file
  •     Select File and Export
  •     Select .xls as output format

For detail on converting from SAS to Excel see the 64-bit-gotchas post on The SAS Dummy blog.

SPSS Statistics

If SAS is not available on your PC, you can open a SAS data file in SPSS Statistics and then export to Excel.

Getting data in and out of Eventus

13 February 2015 Leave a comment

WRDS top cornerEventus is a tool to perform event studies on US companies, pulling data directly out of the CRSP stock database. It is available through the WRDS portal for postgraduate students and members of staff at The University of Manchester.

The interface of Eventus is similar to the other platforms available through WRDS, but it can be a little more confusing to the newcomer. The post aims to help you get data in and out of Eventus, resulting in a usable Excel or CSV document. It does not aim to explain the mechanics of Eventus or what is really happening under the surface!

Preparing company identifiers and dates

Eventus 1 - source data

Mergers and acquisitions data, including acquirer PERMNO and announcement date

Eventus 2 - prepare columnsTypically, people who decide to use Eventus already have a list of acquiring companies, identified by PERMNO codes, and a corresponding list of dates to study (in YYYYMMDD format). Copy these two columns to a new Excel workbook in this order, then delete the header row if there is one.

Eventus 3 - ready to uploadThis workbook will need to be Saved as type: Text (Tab delimited) (*.txt). Ignore any warnings about the file type not accepting multiple sheets — you only need the active worksheet. Accept any warning about features not compatible with this file format. After the file has saved, close it, ignoring any further warnings about not saving changes.

You should now have a plain text file that begins like this if you open it in Notepad++ or similar.

Using Eventus

Your file is now ready to be uploaded to Eventus. Log onto WRDS, then choose Eventus from the drop-down list Select a Data Set on the top-left. Choose Cross-Sectional Analysis Daily. (Only the cross-sectional analysis options produce data that can be used in the methods described by this blog post.) You will see that CUSIP codes could have been chosen instead of PERMNO, but I suggest PERMNO where possible — there can be confusion over CUSIP codes sometimes, whether you need 6, 8, or 9-digit versions.

Eventus 4 - fill in fields

Launch Eventus Cross-Sectional Analysis, fill in the fields and upload the prepared file

Choose your new text file to upload. Fill in the options as you require, including the event period and alternative windows.

Eventus 5 - download

Download the files produced by Eventus; the first is the most useful (*.sas7bdat)

When ready, click on the Submit Query button. The next screen can take a few seconds to load, but hopefully it will look like this (above). If not, read the error message and check what you entered on the previous screen.

You can download three files, but the first one is the most useful. It has a filename ending in .sas7bdat. This is a SAS dataset.

Opening or converting the results

If you have SAS installed on your computer, you can open the results file directly in that (double-click the file) then choose File > Export and Files of type: Microsoft Excel Workbooks.

Eventus 6 - Open output in SAS

Output from Eventus opened in SAS Enterprise Guide which can be exported to Microsoft Excel

If you have SPSS instead, you can import the results file then export it to Excel format or CSV.

  • To launch SPSS, go to Start > IBM SPSS Statistics > IBM SPSS Statistics 22 (or 20).
  • To import in SPSS, use File > Open > Data and then Files of type: SAS (*.sas7bdat).
  • To export it from SPSS, use File > Save As and then Save as type: Excel 2007 through 2010 (*.xlsx) or Comma delimited (*.csv).
Eventus 6 - SPSS and Excel

Output from Eventus opened in IBM SPSS Statistics and exported to Microsoft Excel


This guide should help you to upload data to and download data from Eventus, ready for the next stage of your study. If you found this useful, or if you need further help explaining these steps, please leave a comment below.

Updated 20 January 2016 with some new screenshots for WRDS and SAS.

Categories: Data Analysis Tags: , ,