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 perform selection on 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 database desired from those available at the physical path. Specify one SETID from Table 39.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 successfully assign. 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,.

Table 39.1: CRSPAccess Databases SETIDs

SETID

 

Data Set

10

 

CRSP Stock, daily data

20

 

CRSP Stock, monthly data

200

 

CRSP/Compustat Merged (CCM) 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, SASECRSP 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 Stock Databases

When accessing the CRSP Stock databases, you can select which securities to access by specifying their PERMNOs with the PERMNO= option. PERMNO™ is CRSP’s unique permanent issue identification number and the primary key for their 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 39.2.

Table 39.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

The SASEXCCM interface engine provides support for Xpressfeed CCM data access. SASEXCCM provides data item handling access methods by using CRSPAccess versions 3.14–3.23. For a detailed description of this new ETS interface engine, see Chapter 40: The SASEXCCM Interface Engine,. A description of the legacy CCM data access methods that use the SASECRSP engine follows.

When accessing Compustat data via the CCM database using SASECRSP, you can select which companies to access by specifying their GVKEYs. GVKEY™ is Compustat’s unique identifer and primary key. You can specify a GVKEY to include with the GVKEY= option. Two secondary keys, PERMNO and PERMCO, are also supported for access via the PERMNO= and PERMCO= options. A full list of possible keys for accessing CCM data is shown in Table 39.3.

Table 39.3: Keys for Accessing CCM Data

Key

 

Access By

GVKEY

 

Compustat’s unique identifer and primary key for CCM database

PERMNO

 

CRSP’s unique permanent issue identification number

PERMCO

 

CRSP’s unique permanent company identification number


CRSP Indices Databases

When accessing CRSP Indices data, you can select which indices to access by specifying their INDNOs. INDNO™ is the primary key for 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 39.4.

Table 39.4: Keys for Accessing Indices Data

Key

 

Access By

INDNO

 

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


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