The SASECRSP Interface Engine

The SAS Output Data Set

You can use the SAS DATA step to write the selected CRSP or Compustat data to a SAS data set. This enables you to easily analyze the data using SAS. When you specify the name of the output data set on the DATA statement, it causes the engine supervisor to create a SAS data set using the specified name in either the SAS WORK library or, if specified, the USER library.

The contents of the SAS data set include the DATE of each observation, the series name of each series read from the CRSPAccess database, event variables, and the label or description of each series/event or array.

You can use PROC PRINT and PROC CONTENTS to print your output data set and its contents. Alternatively, you can view your SAS output observations by opening the desired output data set in the SAS Explorer. You can also use PROC SQL with your SASECRSP libref to create a custom view of your data.

In general, CRSP missing values are represented as ‘.’ in the SAS data set. When accessing the CRSP STOCK data, SASECRSP uses the mapping shown in Table 39.6 for converting CRSP missing values into SAS missing codes.

Table 39.6: Mapping of CRSP Stock Missing Values to SAS Missing Codes

CRSP Stock

SAS

Condition

–99

.

No valid price

–88

.A

Out of range

–77

.B

Off-exchange

–66

.C

No valid previous price

–55

.D

No delisting information

–44

.E

No valid comparison for an excess return


When accessing the CCM database, CRSP uses certain Compustat missing codes which SASECRSP then converts into SAS missing codes. Table 39.7 shows the mapping of Compustat missing codes for the CCM database.

Table 39.7: Mapping of Compustat and SAS Missing Codes

Compustat

SAS

Condition

0.0001

.

No data for data item

0.0002

.S

Data is only on a semi-annual basis

0.0003

.A

Data is only on an annual basis

0.0004

.C

Combined into other item

0.0007

.N

Data is not meaningful

0.0008

.I

Reported as insignificant


Missing value codes conform with Compustat’s Strategic Insight and binary conventions for missing values. See Notes on Missing Values in the second chapter of the CRSP/Compustat Merged Database Guide for more information about how CRSP handles Compustat missing codes.