Previous Page | Next Page

The SASECRSP Interface Engine

Opening a Database

The SASECRSP engine uses the LIBNAME statement to enable you to specify which CRSPAccess database you would like to access and how you would like 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 35.1. Note 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 LIBNAME to successfully assign.

Table 35.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 purposes and ease of use, SASECRSP supports a variety of options for performing data selection on your CRSPAccess database with the LIBNAME statement. These options enable you to open and retrieve data for only the portion of the database you desire. The availability of some of these options depends on the type of database being opened.

CRSP Stock Databases

When accessing the CRSP Stock databases, you can select which securities you want 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 also be used to select stock data. For example, you could 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 35.2.

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

When accessing Compustat data via the CCM database, you can select which companies you want 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 their respective PERMNO= and PERMCO= options. A full list of possible keys for accessing CCM data is shown in Table 35.3.

Table 35.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 you want to access by specifying their INDNOs. INDNO™ is the primary key for CRSP Indices databases. You can specify which INDNO to use with 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 35.4.

Table 35.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 the 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 you want to select from the CRSP database by using an input SAS data set.

Previous Page | Next Page | Top of Page