Accessing CRSP data using SAS

Eventus software is written in the macro language of The SAS System. This allows Eventus to build
the statistical and data-handling power of SAS into event study methods. Users do not need to know
SAS programming or macros to start being productive. An Eventus program consists of a few simple
but customizable statements. Options allow users to tailor data input, estimation and statistical testing.

Every Eventus program is also a SAS program, so users can add SAS statements if desired

CRSP data can be accessed within SAS in two ways. First, the CRSP binary data can be directly
extracted into SAS using Eventus. Eventus is an add-in to SAS which accesses CRSP data from the
COBA network and performs event studies. Eventus is installed by default in SAS installations.

<Note> If the application deployed, you should have a desktop folder called Eventus 7. If that folder
             is not there, you need to click START -> RUN and type NAL and enter.  That will deploy
             the application and restart your machine.

SAS Tutorial

The Research and Statistical Support at UNT has a series of SAS tutorial available on their website.
(http://www.unt.edu/rss)

Structure of a SAS Data Set Containing Time Series Data

SAS requires time series data to be in a specific form that is recognizable by the SAS System. This form
is a two-dimensional array, called a SAS data set, whose columns correspond to series variables and
whose rows correspond to measurements of these variables at certain time periods. The time periods at
which observations are recorded can be included in the data set as a time ID variable.

Syntax

Description Statement Option
specify a CRSPAccess set id where 10 is daily and 20 monthly, which limits the frequency selection of time series that are included in the SAS data set. This is a required option. LIBNAME libref SASECRSP SETID=
specify the PERMNO of a security to be kept in the SAS data set. LIBNAME libref SASECRSP PERMNO=
specify the range of CRSP data to access. begdt and enddt specify the range of CRSPAccess data in YYYYMMDD format. LIBNAME libref SASECRSP RANGE=
use a SAS data set named setname as input for issues. LIBNAME libref SASECRSP INSET=


In addition, CRSP data is available in SAS format on the COBA Network. The data is appears as four
SAS datasets:

  1. da.sas7bdat contains the daily CRSP data in its entirety
  2. dacont.sas7bdat contains a list of variable names and labels
  3. daevent.sas7bdat contains events such as delistings
dakey.sas7bdat lists information on the data series collected for each company such as start/end
dates for series, number of observations, etc.

To view the CRSP access using SAS presentation, click here.
To view sample SAS programs for accessing CRSP data, click here.
 

Eventus Sample Program (testevt.sas)

This testevt.sas sample program code is located in the Eventus folder on drive D:\.
To run this sample program, double-click on the SAS file, testevt.  SAS V8.2
should then run automatically.  After SAS deploys, select "RUN" on the menu bar
and click "SUNMIT" to have SAS run the Eventus code.

NOTE:  To run an Eventus, both testevt.sas (the program file) and request1.dat
             (the request data file) are required.  The Eventus program cannot run
             without the request data file.  So, make sure that request1.dat is also
             located in the same Eventus folder in your D:\ drive.


The testevt.sas program code is written as:

filename request 'd:\Eventus\request1.dat';
eventus;
request cusiperm autodate est=-251;
windows (-
10,3);
evtstudy pre=70 post=70 garch nomar;

Note: The program may take up to a minute to run.


The testevt.sas program output:

You should have a 9-page SAS output for the testevt.sas file.  A copy of the SAS
output is located in the Evetus folder for your reference.  The file is called "testevt-results.txt"


Another Eventus Sample Program (Simple.sas)

The Simple.sas Eventus program we ran on Sol can be used in SAS as well.  To run this sample
program, you need to, first, create the request file in *.dat format.  The request file should contain
the PERMNOs and Dates in Figure 2.2 (Eventus 7.0 User's Guide).

72100 19970626
75111 19980209
77142 981016
36150   19970616
77170 19981118
75241 19980805
76263 19980210
76369 19970814
77446 19981117
83447 19980615
10506 19971013
67652 19980330
91732 19980708
79739 970617
76754 19980615
77833 19970331
10914 19970306

After the request file is created, you can save it in the Eventus folder on Drive D:\.  Next, you need
to enter the "Simple.sas" code in Figure 2.1.  Note: The request file is called simple.dat in this program.

filename request 'd:\Eventus\simple.dat';
eventus;
request;
evtstudy;

Run the Simple.sas program and you should get an output that is identical to the one we ran on Sol.

For more Eventus Examples, click here.

                                     
NOTE: Useable returns means all non-missing returns except the
first day after a missing estimation period return.


Sources: Eventus 7.0 User's Guide
              Information Technology, W.P. Carey College of Business, Arizona State University