Previous Page | Next Page

The DATASOURCE Procedure

CRSP Stock Files

The Center for Research in Security Prices provides comprehensive security price data through two primary stock files, the NYSE/AMEX file and the NASDAQ file. These files contain master and return components, available separately or combined. CRSP stock files are further differentiated by the frequency at which prices and returns are reported, daily or monthly. Both daily and monthly files contain annual data fields.

CRSP data files are distributed in CRSPAccess format. See Chapter 33, The SASECRSP Interface Engine, for more about accessing your CRSPAccess database. You can convert your CRSPAccess data to binary format (SFA format) by using the CRSP-supplied utility (STK_DUMP_BIN). Use the DATASOURCE procedure for SFA format access and use SASECRSP Interface for CRSPAccess.

CRSP stock data (in SFA format) are provided in two files, a main data file containing security information and a calendar/indices file containing a list of trading dates and market information associated with those trading dates.

The file types for CRSP stock files are constructed by concatenating CRSP with a D or M to indicate the frequency of data, followed by B, C, or I to indicate file formats. B is for host binary, C is for character, and I is for IBM binary formats. The last character in the file type indicates if you are reading the Calendar/Indices file (I), or if you are extracting the security (S) or annual data (A). For example, the file type for the daily NYSE/AMEX combined data in IBM binary format is CRSPDIS. Its calendar/indices file can be read by CRSPDII, and its annual data can be extracted by CRSPDIA.

Starting in 1995, binary data used split records (RICFAC=2), so the 1995 filetypes (CR95*) should be used for 1995 and 1996 binary data. If you use utility routines supplied by CRSP to convert a character format file to a binary format file on a given host, then you need to use host binary file types (RIDFAC=1) to read those files in. Note that you cannot do the conversion on one host and transfer and read the file on another host.

If you are using the CRSPAccess Database, you will need to use the utility routine (stk_dump_bin) supplied by CRSP to generate the UNIX binary format of the data. You can access the UNIX (or SUN) binary data by using PROC DATASOURCE with the CRSPDUS for daily or CRSPMUS for monthly stock data.

For the four-digit year data, use the Y2K-compliant filetypes for that data type.

For CRSP file types, the INFILE= option must be of the form

   INFILE=( calfile security1 < security2 ... > )

where calfile is the fileref assigned to the calendar/indices file, and security1 < security2 ...> are the filerefs given to the security files, in the order in which they should be read.

CRSP Calendar/Indices Files

Table 11.21 CRSP Calendar/Indices Files Format

Metadata Field Types

Metadata Fields

Metadata Labels

Data Files

Database is stored in a single file.

INTERVAL=

DAY

for products DA, DR, DX, EX, NX, and RA

 

MONTH

for products MA, MX, and MZ

BY Variables

None

Series Variables

VWRETD

Value-Weighted Return (including all distributions)

 

VWRETX

Value-Weighted Return (excluding dividends)

 

EWRETD

Equal-Weighted Return (including all distributions)

 

EWRETX

Equal-Weighted Return (excluding dividends)

 

TOTVAL

Total Market Value

 

TOTCNT

Total Market Count

 

USDVAL

Market Value of Securities Used

 

USDCNT

Count of Securities Used

 

SPINDX

Level of the Standard & Poor’s Composite Index

 

SPRTRN

Return on the Standard & Poor’s Composite Index

 

NCINDX

NASDAQ Composite Index

 

NCRTRN

NASDAQ Composite Return

Default KEEP List

All variables will be kept.

CRSP Daily Security Files

Table 11.22 CRSP Daily Security Files Format

Metadata Field Types

Metadata Fields

Metadata Labels

Data Files

INFILE=( calfile securty1 < securty2 ...> )

INTERVAL=

DAY

BY Variables

CUSIP

CUSIP Identifier (character)

 

PERMNO

CRSP Permanent Number (numeric)

 

COMPNO

NASDAQ Company Number (numeric)

 

ISSUNO

NASDAQ Issue Number (numeric)

 

HEXCD

Header Exchange Code (numeric)

 

HSICCD

Header SIC Code (numeric)

Sorting Order

BY CUSIP

Series Variables

BIDLO

Bid or Low

 

ASKHI

Ask or High

 

PRC

Closing Price of Bid/Ask Average

 

VOL

Share Volume

 

RET

Holding Period Return

   

missing=( -66.0 = .p -77.0 = .t -88.0 = .r -99.0 = .b )

 

BXRET

Beta Excess Return

   

missing=( -44.0 = . )

 

SXRET

Standard Deviation Excess Return

   

missing=( -44.0 = . )

Events

NAMES

NCUSIP

Name CUSIP

   

TICKER

Exchange Ticker Symbol

   

COMNAM

Company Name

   

SHRCLS

Share Class

   

SHRCD

Share Code

   

EXCHCD

Exchange Code

   

SICCD

Standard Industrial Classification Code

 

DIST

DISTCD

Distribution Code

   

DIVAMT

Dividend Cash Amount

   

FACPR

Factor to Adjust Price

   

FACSHR

Factor to Adjust Shares Outstanding

   

DCLRDT

Declaration Date

   

RCRDDT

Record Date

   

PAYDT

Payment Date

 

SHARES

SHROUT

Number of Shares Outstanding

   

SHRFLG

Share Flag

 

DELIST

DLSTCD

Delisting Code

   

NWPERM

New CRSP Permanent Number

   

NEXTDT

Date of Next Available Information

   

DLBID

Delisting Bid

   

DLASK

Delisting Ask

   

DLPRC

Delisting Price

   

DLVOL

Delisting Volume

     

missing=( -99 = . )

   

DLRET

Delisting Return

     

missing=( -55.0=.s -66.0=.t -88.0=.a -99.0=.p );

 

NASDIN

TRTSCD

Traits Code

   

NMSIND

National Market System Indicator

   

MMCNT

Market Maker Count

   

NSDINX

NASD Index

Default KEEP Lists

All periodic series variables will be output to the OUT= data set and all event variables will be output to the OUTEVENT= data set.

CRSP Monthly Security Files

Table 11.23 CRSP Monthly Security Files Format

Metadata Field Types

Metadata Fields

Metadata Labels

Data Files

INFILE=( calfile security1 < security2 ...> )

INTERVAL=

MONTH

BY Variables

CUSIP

CUSIP Identifier (character)

 

PERMNO

CRSP Permanent Number (numeric)

 

COMPNO

NASDAQ Company Number (numeric)

 

ISSUNO

NASDAQ Issue Number (numeric)

 

HEXCD

Header Exchange Code (numeric)

 

HSICCD

Header SIC Code (numeric)

Sorting Order

BY CUSIP

Series Variables

BIDLO

Bid or Low

 

ASKHI

Ask or High

 

PRC

Closing Price of Bid/Ask average

 

VOL

Share Volume

 

RET

Holding Period Return

   

missing=( -66.0 = .p -77.0 = .t -88.0 = .r -99.0 = .b );

 

RETX

Return Without Dividends

   

missing=( -44.0 = . )

 

PRC2

Secondary Price

   

missing=( -44.0 = . )

Events

NAMES

NCUSIP

Name CUSIP

   

TICKER

Exchange Ticker Symbol

   

COMNAM

Company Name

   

SHRCLS

Share Class

   

SHRCD

Share Code

   

EXCHCD

Exchange Code

   

SICCD

Standard Industrial Classification Code

 

DIST

DISTCD

Distribution Code

   

DIVAMT

Dividend Cash Amount

   

FACPR

Factor to Adjust Price

   

FACSHR

Factor to Adjust Shares Outstanding

   

EXDT

Ex-distribution Date

   

RCRDDT

Record Date

   

PAYDT

Payment Date

 

SHARES

SHROUT

Number of Shares Outstanding

   

SHRFLG

Share Flag

 

DELIST

DLSTCD

Delisting Code

   

NWPERM

New CRSP Permanent Number

   

NEXTDT

Date of Next Available Information

   

DLBID

Delisting Bid

   

DLASK

Delisting Ask

   

DLPRC

Delisting Price

   

DLVOL

Delisting Volume

   

DLRET

Delisting Return

     

missing=( -55.0=.s -66.0=.t -88.0=.a -99.0=.p );

 

NASDIN

TRTSCD

Traits Code

   

NMSIND

National Market System Indicator

   

MMCNT

Market Maker Count

   

NSDINX

NASD Index

Default KEEP Lists

All periodic series variables will be output to the OUT= data set and all event variables will be output to the OUTEVENT= data set.

CRSP Annual Data

Table 11.24 CRSP Annual Data Format

Metadata Field Types

Metadata Fields

Metadata Labels

Data Files

INFILE=( security1 < security2 ...> )

INTERVAL=

YEAR

BY Variables

CUSIP

CUSIP Identifier (character)

 

PERMNO

CRSP Permanent Number (numeric)

 

COMPNO

NASDAQ Company Number (numeric)

 

ISSUNO

NASDAQ Issue Number (numeric)

 

HEXCD

Header Exchange Code (numeric)

 

HSICCD

Header SIC Code (numeric)

Sorting Order

BY CUSIP

Series Variables

CAPV

Year End Capitalization

 

SDEVV

Annual Standard Deviation

   

missing=( -99.0 = . )

 

BETAV

Annual Beta

   

missing=( -99.0 = . )

 

CAPN

Year End Capitalization Portfolio Assignment

 

SDEVN

Standard Deviation Portfolio Assignment

 

BETAN

Beta Portfolio Assignment

Default KEEP Lists

All variables will be kept.

Previous Page | Next Page | Top of Page