Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The DATASOURCE Procedure

CRSP Stock Files

The Center for Research in Security Prices provides comprehensive security price data via two primary stock files, the NYSE/AMEX file and the NASDAQ file. These files are composed of 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 come either in binary or character tape format, or in CRSP Access97 CDROM format.

CRSP stock data 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. If security data do not fit on one tape, they are split into two or more files, each one of which resides on a different self-contained tape. The calendar/indices file is on the first tape only.

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 tape 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 tapes use 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 can not do the conversion on one host and transfer and read the file on another host.

If you are using the CRSP Access97 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. See the example on Example 10.11 later in this chapter.

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 securty1 < securty2 ... > are the filerefs given to the security files, in the order in which they should be read.

CRSP Calendar/Indices Files

   
Data FilesDatabase is stored in a single file.
INTERVAL=DAYfor products DA, DR, DX, EX, NX and RA
 MONTHfor products MA, MX and MZ
BY variablesNone
Series VariablesVWRETDValue-Weighted Return (including all distributions)
 VWRETXValue-Weighted Return (excluding dividends)
 EWRETDEqual-Weighted Return (including all distributions)
 EWRETXEqual-Weighted Return (excluding dividends)
 TOTVALTotal Market Value
 TOTCNTTotal Market Count
 USDVALMarket Value of Securities Used
 USDCNTCount of Securities Used
 SPINDXLevel of the Standard & Poor's Composite Index
 SPRTRNReturn on the Standard & Poor's Composite Index
 NCINDXNASDAQ Composite Index
 NCRTRNNASDAQ Composite Return
Default KEEP ListAll variables will be kept.

CRSP Daily Security Files

    
Data FilesINFILE=( calfile securty1 < securty2 ... > )
INTERVAL=DAY
BY variablesCUSIPCUSIP Identifier (character)
 PERMNOCRSP Permanent Number (numeric)
 COMPNONASDAQ Company Number (numeric)
 ISSUNONASDAQ Issue Number (numeric)
 HEXCDHeader Exchange Code (numeric)
 HSICCDHeader SIC Code (numeric)
Sorting OrderBY CUSIP
Series VariablesBIDLOBid or Low
 ASKHIAsk or High
 PRCClosing Price of Bid/Ask Average
 VOLShare Volume
 RETHolding Period Return
  missing=( -66.0 = .p -77.0 = .t -88.0 = .r -99.0 = .b )
 BXRETBeta Excess Return
  missing=( -44.0 = . )
 SXRETStandard Deviation Excess Return
  missing=( -44.0 = . )
EventsNAMESNCUSIPName CUSIP
  TICKERExchange Ticker Symbol
  COMNAMCompany Name
  SHRCLSShare Class
  SHRCDShare Code
  EXCHCDExchange Code
  SICCDStandard Industrial Classification Code
 DISTDISTCDDistribution Code
  DIVAMTDividend Cash Amount
  FACPRFactor to Adjust Price
  FACSHRFactor to Adjust Shares Outstanding
  DCLRDTDeclaration Date
  RCRDDTRecord Date
  PAYDTPayment Date
 SHARESSHROUTNumber of Shares Outstanding
  SHRFLGShare Flag
 DELISTDLSTCDDelisting Code
  NWPERMNew CRSP Permanent Number
  NEXTDTDate of Next Available Information
  DLBIDDelisting Bid
  DLASKDelisting Ask
  DLPRCDelisting Price
  DLVOLDelisting Volume
   missing=( -99 = . )
  DLRETDelisting Return
   missing=( -55.0=.s -66.0=.t -88.0=.a -99.0=.p );
 NASDINTRTSCDTraits Code
  NMSINDNational Market System Indicator
  MMCNTMarket Maker Count
  NSDINXNASD Index
Default KEEP ListsAll 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

    
Data FilesINFILE=( calfile securty1 < securty2 ... > )
INTERVAL=MONTH
BY variablesCUSIPCUSIP Identifier (character)
 PERMNOCRSP Permanent Number (numeric)
 COMPNONASDAQ Company Number (numeric)
 ISSUNONASDAQ Issue Number (numeric)
 HEXCDHeader Exchange Code (numeric)
 HSICCDHeader SIC Code (numeric)
Sorting OrderBY CUSIP
Series VariablesBIDLOBid or Low
 ASKHIAsk or High
 PRCClosing Price of Bid/Ask average
 VOLShare Volume
 RETHolding Period Return
  missing=( -66.0 = .p -77.0 = .t -88.0 = .r -99.0 = .b );
 RETXReturn Without Dividends
  missing=( -44.0 = . )
 PRC2Secondary Price
  missing=( -44.0 = . )
EventsNAMESNCUSIPName CUSIP
  TICKERExchange Ticker Symbol
  COMNAMCompany Name
  SHRCLSShare Class
  SHRCDShare Code
  EXCHCDExchange Code
  SICCDStandard Industrial Classification Code
 DISTDISTCDDistribution Code
  DIVAMTDividend Cash Amount
  FACPRFactor to Adjust Price
  FACSHRFactor to Adjust Shares Outstanding
  EXDTEx-distribution Date
  RCRDDTRecord Date
  PAYDTPayment Date
 SHARESSHROUTNumber of Shares Outstanding
  SHRFLGShare Flag
 DELISTDLSTCDDelisting Code
  NWPERMNew CRSP Permanent Number
  NEXTDTDate of Next Available Information
  DLBIDDelisting Bid
  DLASKDelisting Ask
  DLPRCDelisting Price
  DLVOLDelisting Volume
  DLRETDelisting Return
   missing=( -55.0=.s -66.0=.t -88.0=.a -99.0=.p );
 NASDINTRTSCDTraits Code
  NMSINDNational Market System Indicator
  MMCNTMarket Maker Count
  NSDINXNASD Index
Default KEEP ListsAll 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

   
Data FilesINFILE=( securty1 < securty2 ... > )
INTERVAL=YEAR
BY variablesCUSIPCUSIP Identifier (character)
 PERMNOCRSP Permanent Number (numeric)
 COMPNONASDAQ Company Number (numeric)
 ISSUNONASDAQ Issue Number (numeric)
 HEXCDHeader Exchange Code (numeric)
 HSICCDHeader SIC Code (numeric)
Sorting OrderBY CUSIP
Series VariablesCAPVYear End Capitalization
 SDEVVAnnual Standard Deviation
  missing=( -99.0 = . )
 BETAVAnnual Beta
  missing=( -99.0 = . )
 CAPNYear End Capitalization Portfolio Assignment
 SDEVNStandard Deviation Portfolio Assignment
 BETANBeta Portfolio Assignment
Default KEEP ListsAll variables will be kept.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.