The SASECRSP Interface Engine

Opening a Database

The SASECRSP interface engine uses the LIBNAME statement to enable you to specify which CRSPAccess database you want to access and how you want to select time series or events from that database.

To specify the database, you supply the combination of a physical path to indicate the location of the CRSPAccess data files and a set identifier (SETID) to identify the selected database from those available at the physical path. Specify one SETID from Table 38.1. Notice that the CRSP environment variable CRSPDB_SASCAL must be defined before the SASECRSP engine can access the CRSPAccess database calendars that provide the time ID variables and enable the libref to be assigned successfully. If your database SETID is 250, use the SASEXCCM interface to access your data. For more information about the SASEXCCM interface engine, see Chapter 40: The SASEXCCM Interface Engine. Because CRSP no longer supports the CPZ data format, the SASECRSP engine no longer supports the SETID 200 (CRSP/Compustat Merged, CCM) data access.

Table 38.1: CRSPAccess Databases SETIDs

SETID

 

Data Set

10

 

CRSP Stock, daily data

20

 

CRSP Stock, monthly data

400

 

CRSP Indices data, monthly index groups

420

 

CRSP Indices data, monthly index series

440

 

CRSP Indices data, daily index groups

460

 

CRSP Indices data, daily index series


Usually you do not want to open the entire CRSPAccess database, so for efficiency and ease of use, the SASECRSP engine supports a variety of options for performing data selection on your CRSPAccess database by using the LIBNAME statement. These options enable you to open and retrieve data for only the portion of the database that you want. The availability of some of these options depends on the type of database that you open.

CRSP US Stock Databases

When accessing the CRSP US Stock Databases, you can select which securities to access by specifying their PERMNOs with the PERMNO= option. A PERMNO is CRSP’s unique permanent issue identification number and the primary key for its stock databases. Alternatively, a number of secondary keys can be used to select stock data. For example, you can use the PERMCO= option to read selected securities based on CRSP’s unique permanent company identification number, PERMCO. A full list of possible keys for accessing CRSP Stock data is shown in Table 38.2.

Table 38.2: Keys for Accessing CRSP Stock Data

Key

 

Access By

PERMNO

 

CRSP’s unique permanent issue identification number. This is the primary key for CRSP Stock Databases.

PERMCO

 

CRSP’s unique permanent company identification number

CUSIP

 

CUSIP number

HCUSIP

 

Historical CUSIP

SICCD

 

Standard industrial classification (SIC) code

TICKER

 

Ticker symbol (for active companies only)


CRSP/Compustat Merged Databases—No Longer Supported by the SASECRSP Engine

Use the SASEXCCM interface engine instead of the SASECRSP interface engine to access your Xpressfeed CCM data. The SASEXCCM interface engine provides data item handling access methods by using CRSPAccess version 3.23. For a detailed description of this new SAS/ETS interface engine, see Chapter 40: The SASEXCCM Interface Engine.

Because CRSPAccess version 3.23 does not support CPZ data (legacy Compustat data format for SETID 200), the SASECRSP engine issues the following error messages when you specify the SETID=200 option and/or the CRSPLINKPATH= option:

ERROR: Use the SASEXCCM engine instead of the SASECRSP engine for CCM access. 
       The CPZ data format needed for SETID=200 and the CRSPLINKPATH= options
       was last shipped in July 2011 and is no longer supported by CRSP.
       Use of the SASECRSP engine for this purpose is not allowed: 
       Depreciated calendar configurations can result in fatal errors, 
       corrupted memory, tracebacks, exceptions, or incorrect results 
       for all libref assignments that follow the deassignment 
       of a CCM/CRSPLINKPATH libref.
ERROR: Engine is unable to open crspdb CPZ200606
       with SETID 200. Check that your CRSP database contains the
       crsp_ca_ref_2.bin file.

CRSP Indices Databases

When accessing the CRSP Indices Databases, you can select which indices to access by specifying their INDNOs. INDNO is the primary key for the CRSP Indices Databases. You can specify which INDNO to use by specifying the INDNO= option. No secondary key access is supported for CRSP Indices. A full list of possible keys for accessing CRSP Indices data is shown in Table 38.3.

Table 38.3: Keys for Accessing CRSP Indices Data

Key

 

Access By

INDNO

 

CRSP’s unique permanent index identifier number. This is the primary key for CRSP Indices Databases. It enables you to specify which index series or groups you want to select.


Regardless of which database you access, you can always use the INSET= and RANGE= options for subsetting and selection. The RANGE= option subsets the data by date. The INSET= option enables you to specify which issues or companies to select from the CRSP Indices data by using an input SAS data set.