ENTITY Keywords and Usage

The capitalized words in courier font need to be used as is. Lowercase words and symbols in courier font indicate user-specified information.

a. Primary Identification Options:
1. LIST identifier #

Indicator that for each use, a single key or file containing one supported key will be used to identify an ENTITY.

To access CRSP stock data, the stk_print utility program and search functions dstksearch and mstksearch can be used to identify PERMNO, PERMCO, company name, CUSIP, and ticker by searching the header file.

Possible keys include:

PERMNO #

One CRSP PERMNO, (permanent and unique 5-digit issue identification number assigned by CRSP) of an issue where # is the PERMNO. For example, the PERMNO for International Business Machines Corp. (IBM) is 12490. Syntax is:

LIST|PERMNO 12490

PERMCO #

One CRSP PERMCO, (permanent and unique 5-digit company identification number assigned by CRSP) of an issue where # is the PERMCO. For example, the PERMCO for International Business Machines Corp. (IBM) is 20990. Syntax is:

LIST|PERMCO 20990

CUSIP #

One current header CUSIP where # is the desired CUSIP. For example, the CUSIP for International Business Machines Corp. (IBM) is 45920010. CRSP stores CUSIPs as 8-characters. This means that the electronic check-digit in the 9th position is not included and will not be recognized by the program. Syntax is:

LIST|CUSIP 45920010

HCUSIP #

One historical CUSIP where # is the desired historical CUSIP. For example, the HCUSIP for International Business Machines Corp. (IBM) is 45920010. If a security’s CUSIP has never changed, HCUSIP will always match CUSIP. Syntax is:

LIST|HCUSIP 45920010

TICKER #

One ticker where # is the desired header ticker symbol. For example, the ticker for International Business Machines Corp. (IBM) is IBM. Syntax is:

LIST|TICKER ibm

SICCD #

One SIC Code where # is the desired historical SIC Code. A user can enter a SIC Code to extract all securities with that particular code. Syntax is:

LIST|SICCD 3571

ALL

All PERMNOs in relevant databases are used. Relevant databases are determined by the data items (daily or monthly) selected. When this option is used, issues with no data inside the selected date range are ignored.

FILE filename, format

Indicator that an input file containing a supported key (required), date(s) (optional), and headers (optional) will be used. For example a PERMNO input file for use with relative dates containing a user-defined header would look like the following:

10107 19900101 Microsoft
12490 19700101 IBM
14593 19850101 Apple
43916 19800101 Digital

Format specification of the input file is required. Two types of formats are supported, F1 and F2. F1 is used when the input file is fixed-width. F2 is used when the content of the input file is delimited with a one character delimiter. Each supported key is identified by a two-character code as follows:

PE  PERMNO

PC  PERMCO

CU  Header CUSIP

HC  Historical CUSIP

TI  Header Ticker

SI  Historical SIC Code

Notes:

  • Header data are current or the most recent identifying data on the file.
  • Historical data search the name history file for any occurrence of that identifier over time.
  • Tickers are only included in the header file if the company is active at the time the file was created. Additionally, if a security has a share class, it will be appended to the header ticker; for example, WPO.B is the Washington Post Company, Class B.
  • The date range will restrict your selected output values.
  • The fields in a fixed-width input file can be positioned in any order with the LIST entity option.
  • CRSP stores the 8-character CUSIP. The electronic check digit, or 9th character, is not included and will not be recognized by the program.

If you are using a list of 9-character CUSIPs, you will need to use the F1 formatting option to specify the character positions 1-8 that ts_print should consider.

B. FILE Filename, Format Options:

F1 - Fixed Width

Input file data are in fixed positions. Each code is followed by character positions in the form (begpos, endpos). begpos is the first character position in the input file that contains the data for that specification, endpos the last.

PE  PERMNO of the input security

PC  PERMCO

CU  Header CUSIP

HC  Historical CUSIP

TI  Header Ticker

SI  Historical SIC Code

D1  Beginning date of a date range or a single event date, in YYYYMMDD format. If a relative calendar is used, D1 is the event date for the security. If an absolute calendar range is used, and D1 and D2 are specified, valid data output is the cross-section of the security’s trading history, the DATE component date range, and the range set by D1 and D2.

D2  Ending date of a date range, in YYYYMMDD format.

SD  Short Description to supply header text for the security, up to 20 characters long.

For example, if your input file named permin.txt contains PERMNOs in the first 5 character spaces, followed by the beginning date (D1) starting in the 7th character position and end date (D2) starting in the 16th character position of data desired for each PERMNO, where permin.txt contains:

10107 19900101 19901231 Microsoft
12490 19700101 19701231 IBM
14593 19850101 19851231 Apple
43916 19800101 19801231 DEC

your ENTITY portion of the request file would look like this:

e.g.

ENTITY
LIST|FILE permin.txt,F1PE(1,5)D1(7,14)D2(16,23)SD(25,35)
END

F2 - Delimited Files

Input file data fields are delimited by a single defined character. The delimiting character is set with the DL code.

e.g. The same request file used in the F1 example, with fields delimited by spaces, would look like the following:

ENTITY
LIST|FILE permin.txt,F2DLSPED1D2SD
END

DL  A delimiter character is used with F2.

ts_print supports special delimiters: P for pipe, S for space, C for comma (DLP, DLS, DLC) and any other character can be used by adding a character on after DL (DL; for semicolon delimited input).

PE  PERMNO of the input security

PC  PERMCO

CU  Header CUSIP

HC  Historical CUSIP

TI  Header Ticker

SI  Historical SIC Code

D1  Beginning date of a date range or a single event date, in YYYYMMDD format. If a relative calendar is used, D1 is the event date for the security. If an absolute calendar range is used, and D1 and D2 are specified, valid data output is the cross-section of the security’s trading history, the DATE component date range, and the range set by D1 and D2.

D2  Ending date of a date range, in YYYYMMDD format.

SD  Short Description to supply header text for the security, up to 20 characters long.