ts_print Request File

It is necessary to create the request file, a text input file, to run ts_print. The request file contains specifications for the data and for the report format. Every request file must contain four components: ENTITY, ITEM, DATE, and OPTIONS.

Section Description
ENTITY One or more selected securities, a precalculated CRSP supported index, or a user-defined portfolio.
ITEM One or more ts_print supported CRSP data items.
DATE Dates can be a set of absolute date ranges or relative dates.
OPTIONS Controls the format and location of the output file.
Request File Rules

Descriptions in ts_print documentation use the request file rules below.

  • ‚ Comment lines have a pound (#) sign in the beginning of the line, and are ignored by the application.
  • ‚ Blank lines are ignored by the application.
  • ‚ Names in uppercase COURIER in the documentation are keywords and must be typed as shown. ts_print is case sensitive.
  • ‚ # in the documentation (excepting comment lines) represents an integer to be supplied by the user.
  • ‚ Z represents an alphanumeric character to be supplied by the user.
  • ‚ Names in lowercase courier are replaced by the user. For example, filename is replaced by the name of a user’s file.
  • ‚ Anything in brackets is optional. If names in brackets are used, the punctuation in the bracket is required. Brackets do not appear in the request file.
  • ‚ Two or more keywords on a line must be separated with the pipe (|) character. Information specifying a keyword must be on the same line as the keyword. Additional keywords can also be placed on multiple lines; in this case the first line does not end in a pipe character.

While a request file can be run on more than one system, CRSP recommends creating and editing the specifications file on the same system you intend to run it. PC text editors insert carriage return characters at the end of lines which may not be readable on UNIX or OpenVMS systems. If using a request file between systems, the crsp_crlf2lf and crsp_lf2crlf utilities (see the Database Tools chapter) or an ASCII format FTP transfer of the files between systems will eliminate the carriage feed and/or line return differences.

Each component entry, numbered below, consists of three parts:

  • ‚ A header row which identifies the component: ENTITY, ITEM, DATE, or OPTIONS.
  • ‚ Center rows describing the desired functions of the component.
  • ‚ The END row, which closes the component input information.

A basic example follows:

# Sample request file for price, volume, total return,
# shares outstanding for a security
ENTITY
LIST|PERMNO 12490|ENTFORMAT 3
END
ITEM
ITEMID prc
ITEMID vol
ITEMID ret
ITEMID shr
END
DATE
CALNAME weekly|RANGE
19950101-19950201|CALFORMAT 4
END
OPTIONS
X ITEM,YES|Y DATE,YES|Z ENTITY,YES,1|OUTNAME finsamp.out|REPNAME Sample One
END

In ts_print, ENTITY, ITEM, and DATE identify what your report will contain, and OPTIONS determines how your report will appear. Comment lines in a request file begin with “#” and can be anywhere within a request file. They may be used for notes or for disabling an input line. Comment lines and blank lines are ignored by ts_print.

Explanation of Example Request File
  1. Comment lines identifying the request file, and its functionality.
  2. In the sample layout above, the ENTITY contains one issue, PERMNO 12490, with ticker selected as the optional output header (ENTFORMAT 3).
  3. Under ITEM, price (prc), volume (vol), return (ret), and shares outstanding (shr) information from the daily stock file for the ENTITY (PERMNO 12490) will be included in the output report. Since no SUBNO is specified, each ITEMID uses the default, SUBNO 0.
  4. In this sample, DATE specifies that for each ENTITY and ITEM the report will contain one value each week (CALNAME). The source of the ITEMs selected above is the daily stock file. Thus, the weekly value for daily ITEMs is a weekly summary of the selected daily data items. In this case, prc and shr are prices and shares at the end of period, vol is the sum of volumes during the week, and ret is the compounded daily return during the week (dividends reinvested on the ex-date), reported between January 1, 1995 and February 1, 1995. Each date in the output will be in a MM|DD|YYYY calendar format (CALFORMAT 4).
  5. The OPTIONS selected assign data to X, Y, and Z axes. ITEM options will be displayed on the X-axis, the DATE options on the Y-axis, and the entities will append themselves to the date or Y-axis. (This is indicated by the number 1 at the end of the Z options.) The YES in each of the axis groups indicates that the report will contain headers on each axis. finsamp.out is the name of the output file (OUTNAME) and Sample One is the report title in the output file (REPNAME).

1. Entity Specification

There are three ways to describe entities in the ts_print request file:

LIST Selects one or more issues. These can be specified by individual PERMNOs, PERMCOs, Header CUSIP, Historical CUSIP, Header Ticker, and Historical SIC Code, on one or more rows, with a predefined input file, or by ALL, which selects all issues available in the CRSP database.
INDEX Selects precalculated index series supported by CRSP, identified by INDNO.
PORT Describes a user-defined portfolio specified in a predefined input file assigned one of the following keys: PERMNO, PERMCO, Header CUSIP, Historical CUSIP, Header Ticker, GVKEY, or Historical SIC Codes. PORT can also be used with the ALL option, to include all issues in the portfolio. Each user-defined Portfolio may contain an unlimited number of issues.

The ENTITY component entry consists of three parts:

  • ‚ The ENTITY heading row which identifies the component,
  • ‚ The center row(s) which details the desired entities and options related to the entities, and
  • ‚ The END row, which closes the ENTITY information.
Heading Row:

ENTITY

Center Row(s):

Primary identification options contain additional and possible ENTITY qualifiers:

LIST|PERMNO # or |PERMCO # or|GVKEY # or |CUSIP # or |HCUSIP # or |TICKER # or |SICCD #|EVDATE #|USERHEAD text|ENTFORMAT #|ISSUERANGE #-#

or

LIST|FILE filename, format F1**(#,#)[D1(#,#),D2(#,#)SD (text)] or F2DLZ**[D1D2SD]|EVDATE #|ISSUERANGE #-#|USERHEAD text|ENTFORMAT # |EXCHANGE #[,#]

or

|SHARETYPE #,#[,#]or |NMSIND #[,#] or |SIC #[-#][,#[-#]
(** is the two character code for the key used in the input file. PE=PERMNO, PC=PERMCO, GV=GVKEY, CU=CUSIP, HC=Historical CUSIP, TI=Header Ticker, and SI=Historical SIC Code.)

or

LIST|ALL|ENTFORMAT #|EXCHANGE #[,#] and/or |SHARETYPE #,#[,#] and/or |NMSIND #[,#]and/or |SIC #[-#][,#[-#]

or

INDEX|INDNO #|ISSUERANGE #-#|ENTFORMAT #|USERHEAD text |EXCHANGE #[,#] and/or |SHARETYPE #,#[#] and/or |NMSIND #[,#]

or

PORT|FILE filename F1**(#,#) [D1(#,#),D2(#,#),WT#,ID#] or F2DLZ**[D1D2WTID]|WEIGHT weighttype|EXCHANGE #[,#] and/or |SHARETYPE #,#[,#] and/or |SIC #[-#][,#[-#]
(** is the two character code for the key used in the portfolio input file. PE=PERMNO, GV=GVKEY, PC=PERMCO, CU=CUSIP, HC=Historical CUSIP, TI=Header Ticker, and SI=Historical SIC Code.)

or

PORT|ALL|WEIGHT weighttype|EXCHANGE #[,#] and/or |SHARETYPE #,#[,#]and/or |NMSIND #[,#] and/or |SIC #[-#][,#[-#]

End Row:

END

Following are examples which demonstrate the two primary ways to set up the ENTITY component of your request file. The first pulls data for each of the supported keys. The second uses a semicolon-delimited input file which is keyed on CUSIPs and specifies event dates.

e.g.

ENTITY
LIST|PERMNO 43916
LIST|PERMCO 20583
LIST|GVKEY 6066.01
LIST|CUSIP 25384910
LIST|HCUSIP 25384910
LIST|TICKER DEC
LIST|SICCD 3573
INDEX|INDNO 1000080
END

e.g.

ENTITY
LIST|FILE ts_list.txt,F2DL;CUD1
END

input file ts_list.txt contains:

59491810;19900101 
45920010;19700101
03783310;19850101
25384910;19800101

A. 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.

1. Primary Identification Options:
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

GVKEY #
The GVKEY key for selecting entities based on Compustat’s company level identifiers allows also for an issue level identifier, or IID, suffix. GVKEY and IID are separate by a period. For example:

LIST|GVKEY 6066.01

will return the PERMNO for the issue specified by the IID .01 for GVKEY 6066.

LIST|GVKEY 6066

will return any PERMNO linked to GVKEY 6066.

All links to CRSP can produce security level links to Compustat records. A Compustat GVKEY and IID are indicated for each period. Any security level items will be selected directly from the indicated IID.

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
GV  GVKEY
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.

2. 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.

B. INDEX - INDNO

Indicates that one of CRSP’s precalculated indexes will be used to identify an ENTITY.

Each CRSPAccess index is assigned a unique 7-digit identifier, or an INDNO. There are several standard indexes included with the Stock databases: the CRSP equal- and value-weighted indexes, with and without dividends on the NYSE/NYSE MKT/NASDAQ universe, the S&P 500 Composite, and the NASDAQ Composite. Additional indexes are available to subscribers of the CRSP US Stock and Index Database, the Index stand-alone files, and the Cap-based Portfolio reports. Note that only the indexes in the CRSP US Stock or the CRSP US Stock and Index Databases have ts_print access. The INDEX entity option is used as follows:

ENTITY
INDEX|1000080
END

There are a couple of ways to identify desired INDNOs:

  • ‚ The complete list of all indexes and their INDNOs, which includes a column identifying product availability, in the Data Descriptions Guide, Index Methodologies chapter.
  • ‚ The index search programs, dindsearch and mindsearch (see the Search chapter), may be used to find available daily or monthly indexes and their INDNOs.

Only a subset of CRSP data items may be used with an index ENTITY type. Please refer to the entity type columns in the ts_print Daily and Monthly Data Item Tables at the end of this document to identify available data items.

C. PORT

Indicates that the entity is a portfolio. This option allows for user-created portfolios. There are two methods of selecting issues for your portfolio, and four weight type options. Securities may be selected either by choosing all securities in the database (with or without filters), or individual issues may be included in a user-created portfolio input file. Weight type options include: equal-weight, value-weight, user-specified constant weights and user-specified constant shares. The portfolio id field is optional for all types of portfolios. Only select CRSP data items may be used with an PORT ENTITY type.

ALL
Includes all eligible issues in the stock file for the date range specified. (The date range is specified in the DATE section of the request file.) The equal-weighting and value-weighting options are available when ALL is used. PERMNO is the identifier that must be used with the ALL option.

FILE filename, format
Name and specifications of a user-defined input file used to define one or more portfolios. Filename is replaced with the actual name of your input file. The layout of the input file is specified with one of the format options, F1 fixed-width file, or F2 delimited file.

If you are using an input file with a key that does not have a constant number of spaces, such as Ticker Symbol, PERMCO, or SIC Code, we recommend that you use the F2 delimited formatting option.

Guidelines for creating portfolio input files follow:
  • ‚ Multiple portfolios of the same type can be defined within one input file.
  • ‚ One type of key identifier is used within a file. Key options include PERMNO, PERMCO, CUSIP, Historical CUSIP, Header Ticker, and Historical SIC Code.
  • ‚ /span>Portfolio id numbers are needed only if there is more than one portfolio defined within the input file.
  • ‚ Up to 30 portfolio ids—numbered 0-29—can be defined and assigned within an input file for equal- and value-weighted options.
  • ‚ Up to 200 portfolio ids—numbered 0-199—can be defined and assigned within an input file for user-defined-share or weight options.
  • ‚ User-defined-share and weight portfolios require a beginning and ending date range for each security in the input file. Conversely, a single event date and a relative date range will not run with user-defined portfolios.

The following is a sample of an input file for an equal-weight or value-weight portfolio. PERMCO is the assigned key, and there are 3 portfolios, 0, 1, and 2.

20990 0
20583 0
8048 2
22426 1
22426 2
25707 2
22506 2
22506 0

Each input line for user-weight or user-share portfolios must contain the key, the beginning and ending date ranges or event date for each security, the assigned weight or number of shares, and portfolio id (optional). Following is a sample of an input file for a user-weight or user-share portfolio input file, in the default file format with PERMNO as the assigned key.

12490 19970101 19971231 100 0
43916 19961002 19971126 150 0
10107 19950204 19970910 200 2
13311 19970301 19971225 200 1
14218 19930101 19971231 260 2
14593 19960611 19970610 170 1
63255 19970201 19971121 130 2
76597 19950101 19971110 190 2
81191 19970201 19970517 500 1

Format codes are assigned to each portfolio input file. The first two characters of the format specification determine whether input fields are in fixed positions (F1) or are separated by a one-character delimiter (F2). Additional characters are used to identify the position of the information in the portfolio input file.

F1

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 of the input security
CU  CUSIP of the input security
HC  Historical CUSIP of the input security
TI  Header Ticker
SI  Historical SIC Code
D1  Beginning date or 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. The range set by D1 and D2 must fall within the absolute range set in the DATE component, or it is ignored.
D2  Ending date in YYYYMMDD format.
WT  Security weight: the number of shares held of the security, or the weight of the security.
ID  Portfolio Identification Number, one input file can be used to define up to 200 portfolios. Portfolios are identified with an integer between 0 and 199.

For example, if your input file was a user-weight file named permin.txt containing 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, three-digit weight (WT) starting in the 25th character position, followed by a one-digit portfolio id field (ID) starting in the 29th position, your ENTITY entry would be as follows:

e.g.

ENTITY
PORT
|FILE permin.txt,F1PE(1,5)D1(7,14)D2(16,23) WT(25-27)ID(29,29)
|WEIGHT user_weight
END
F2

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

DL  delimiter character used with F2. ts_print supports delimiters: P for pipe, S for space, C for comma, (DLP, DLS, and DLC respectively), and any other character can be used by adding a character on after DL.
PE  PERMNO of the input security
D1  Beginning date or 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 D1and 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. The range set by D1 and D2 must fall within the absolute range set in the DATE component, or it is ignored.
D2  Ending date
WT  Security weight
ID  Portfolio Identification Number, one input file can be used to define up to thirty portfolios. Portfolios are identified with an integer between 1 and 30.

For example, using the same portfolio request file in the above example, with fields delimited by spaces would have an ENTITY entry as follows:

e.g.
ENTITY
LIST|FILE permin.txt,F2DLSPED1D2WTID|WEIGHT
user_weight
END

WEIGHT weighttype
Weighting for use with portfolios. Four weights are available: equal_weight, value_weight, user_share, and user_weight.

WEIGHT equal_weight
Specifies equal-weighted results for the selected portfolio. The same value is invested in each eligible security each holding period. The portfolio is reweighted each input period.

WEIGHT value_weight
Specifies valued-weighted results for the selected portfolio. Eligible securities in the portfolio are weighted each input period by their market capitalization at the end of the previous period.

WEIGHT user_share
The user defines the portfolio by weighting issues based on the number of shares specified in the portfolio file. The number of shares specified remains constant throughout the date range unless they are adjusted by stock splits, stock dividends, or other events with price factors. The weights remain constant for each security once established at the beginning of the range. The weights are set each period to the value of shares held at the end of the previous period. To indicate that a portfolio component is sold short, a negative symbol precedes the shares value.

WEIGHT user_weight
The user defines the portfolio by defining the weight for each security specified in the portfolio input file. The portfolio is reweighted each input calendar period to maintain the weighting of eligible securities. User weights are normalized. The weights are based on the sum of the values given and do not need to equal 1. For example, if a two-security portfolio held 40% of one Security A and 60% of Security B, the weights could be expressed as 2 and 3, 4 and 6, .40 and .60, and so on. To indicate that a portfolio component is sold short, you should put a negative symbol before the weight value.

2. Additional Entity Qualifiers

A. Data Filters

1. EXCHANGE #[,#]

EXCHANGE allows the user to filter the trading history of issues on the basis of stock exchange. This option is available when using variations of LIST or PORT as the ENTITY type. Exchange code restriction options are specified in the first #, using the codes below:

1  NYSE
NYSE MKT
3  NYSE/NYSE MKT
4  NASDAQ
5  NYSE/NASDAQ
6  NYSE MKT/NASDAQ
7  NYSE/NYSE MKT/NASDAQ

The second # symbol further refines the selection using 3 flags. These are:

0  keep only during time period when valid
1  keep none if ever invalid
2  keep all if ever valid

For example,

PORT|ALL|WEIGHT equal_weight|EXCHANGE 1,0

will result in output for an equal-weighted portfolio with all stocks that traded on the NYSE during the time period specified in the DATE option.

2. SHARETYPE #,#[,#]

SHARETYPE allows the user to restrict the output on the basis of share type for individual securities. This option is available when using variations of LIST and PORT as the ENTITY type. The selection is based on the two-digit CRSP Share Type Code variable. The first two comma-separated number symbols above contain 10 digits each. If the value of a digit is 1, that type of issue is valid and if the value of a digit is 0, that type of issue is ineligible.

Columns for the first two codes can be added to the ts_print format to get the desired share code combination. For example, the share type restriction where only ordinary common shares and ADRs representing closed-end funds and closed-end funds incorporated outside the US are included is represented in ts_print format is 0101000000,0000110000.

The first # contains 10 digits relating to the security. These options are:

Code Definition ts_print format
1 Ordinary common shares 0100000000
2 Certificates 0010000000
3 ADRs (American Depository Receipts) 0001000000
4 SBIs (Shares of Beneficial Interest) 0000100000
7 Units (Depository Units, Units of Beneficial Interest, Depository Receipts, etc.) 0000000100

The second # contains 10 digits relating to the security type. These options are:

Code Definition ts_print format
0 Securities which have not been further defined 1000000000
1 Securities which need not be further defined 0100000000
2 Companies incorporated outside the US 0010000000
3 Americus Trust Components (Primes and Scores), HOLDR Trusts, and Index Fund Trusts 0001000000
4 Closed-end funds 0000100000
5 Closed-end fund companies incorporated outside the US 0000010000
8 REITs (Real Estate Investment Trusts) 0000000010

The third # symbol further refines the selection criteria using 3 flags. These are:

keep only during time period when valid
keep none if ever invalid
keep all if ever valid

For example,

LIST|ALL|SHARETYPE 0001000000,0010000000,0

will restrict the output to securities that have share codes identifying them as American Depository Receipts (ADRs) and companies incorporated outside the US.

3. NMSIND #[,#]

NASDAQ National Market Indicator. NASDAQ issue range restriction is applicable to variations of LIST and PORT as the ENTITY type. Each # represents a single integer. When the NMSIND option is used, only NASDAQ issue ranges are restricted. It has no effect on ranges that match NYSE and NYSE MKT name structures. The first # symbol ranges from 1 to 7. Each number has the following meaning:

1  keep NASDAQ National Market and Global Markets
2  keep NASDAQ SmallCap and Capital Market
3  keep all NASDAQ markets with price reporting
4  keep NASDAQ SmallCap before June 15, 1992
5  keep National Market and Global Select Market only
6  keep National Market and Global Market only
7  keep Global Select Market only

The second # symbol further refines the selection using 3 flags. These are:

0  keep only during time period when valid
1  keep none if ever invalid
keep all if ever valid

For example, LIST|ALL|NMSIND 2,0 will restrict the output to NASDAQ SmallCap and Capital Market securities.

4. SICCD#-#[,#-#...],#

SIC issue range restriction is applicable to LIST and PORT as the ENTITY type. Each # represents a single SIC Code. You can filter the data to output a range of SIC values or individual SIC values with the following syntax: SIC #[-#][,#[-#].

For example, LIST|ALL|SIC 1000-2000,3725 would extract all securities with SIC Codes between 1000 and 2000, and all with and SIC code of 3725.

B. ENTITY Subsetting

CRSP provides functionality supporting the subsetting of a larger universe based on a pre-defined constituency. Two supported options require CRSP Stock and Index databases: Grouping by the S&P 500 constituency, and subsetting a portfolio based on portfolio assignment.

1. Pre-Defined Group Membership
|GROUP group_subflag;grouptype;grouplist

Where group_subflag is one of:

Restrict time periods based on selected list
Erase if not always valid based on selected list
Keep if ever valid based on selected list

grouptype is the group type used as the basis for restrictions. Note: 16 is currently the only valid grouptype value, representing S&P 500 constituency.
grouplist provides the group list to keep in the subset.
2. Portfolio Assignment
|PORTASSIGN port_subflag;porttype;portlist

Where port_flag is one of:

Restrict time periods based on selected list
Erase if not always valid based on selected list
2  Keep if ever valid based on selected list

porttype is the portfolio type used as the basis for restrictions.

portlist provides the portfolio assignments to keep in the subset.

C. ENTITY Level Date Options

1. EVDATE #

The event date in YYYYMMDD format for a PERMNO. EVDATE is required for all securities identified with LIST|PERMNO if the calendar type in the DATE component is RELATIVE, and is ignored otherwise. EVDATE does not work with indexes or portfolios.

For example, LIST|PERMNO 12490|EVDATE 19991231 used in the body of the ENTITY section would apply relative dates, such as two days before 19991231 and 3 days after, as selected in the DATE component.

If you use a relative date option, each ENTITY must be assigned a single EVDATE.

2. ISSUERANGE #-#

Issue date range is optional and must be followed by beginning and ending dates, connected with a dash when included. Dates may be in YYYYMMDD, YYYYMM, or YYYY format. For formats that do not specify months or days, the beginning date in the range will start with the first period within the specified range. The ending date will be the last period in the range.

When ISSUERANGE is included for an issue, the valid data output is the cross-section of the security’s trading history, the DATE component date range, and the ISSUERANGE date range. ISSUERANGE must fall within the date range set in the DATE component of the request file. Note that ISSUERANGE must also exceed the duration of the calendar. For example, if your calendar is set to report annually, ISSUERANGE must be greater than 12 months.

For example, LIST|PERMNO 77702 | ISSUERANGE 200605 - 200703 will cover daily data from May 1, 2006 through March 31, 2007 or monthly data from May 31, 2006 through March 31, 2007.

D. ENTITY Header Options

1. USERHEAD text

Used to specify alternate output headers (short descriptions) for the ENTITY. The default headers, are PERMNO in LIST, INDNO in INDEX, or the portfolio identification number prefixed with the word “PORT”, in PORT. The USERHEAD string can be up to 20 characters including spaces and must be specified manually.

For example, LIST|PERMNO 12490|USERHEAD IBM - 45920010 used in the body of the ENTITY section would use the Ticker and CUSIP as the header for security in the output file.

2. ENTFORMAT #

Provides standard issue identification options for the output report file’s header for security entities. Options include:

1  PERMNO, the default
CUSIP
Ticker symbol, header
4  Company Name, header. These may be up to 20 characters long.

ENTFORMAT is superseded by SD option with a formatted, predefined input file. This option is only available for securities. A user-defined header option is also available. See the description for USERHEAD text above.

For example, LIST|PERMNO 12490|ENTFORMAT 1 used in the body of the ENTITY section would print 12490 (the PERMNO) as the header in the output report.

Note that USERHEAD overrides short description (SD) from an input file for supplying headers and will label all entities identically.

3. Item Specification

Data items are selected using a mnemonic name called ITEMID. Optional qualifiers, SUBNOs, can be used to further define the data item. See here for a complete list of supported ts_print daily and monthly data items. Items are organized alphabetically by item name, and contain the following information for CRSP stock and index data:

  • ‚ Item identifier (ITEMID)
  • ‚ SUBNOs, to further define a data item, where SUBNO 0 is the default.
  • ‚ Default header for each ITEM as it appears in the output file
  • ‚ Default data item formatting
  • ‚ Compatible ENTITY types

There are daily and monthly sets of CRSP data items. Monthly CRSP ITEMIDs are the same as daily, but are prefixed with an “m”. CRSP stock and index items can be included in the same report. A given stock report generally should contain either daily or monthly data items.

Each ITEMID selected will generate one output for each ENTITY per DATE. The ITEM specification consists of three parts:

  1. The ITEM header row which identifies the component
  2. The center row(s) which detail(s) the desired data items
  3. The END row, which closes the item input information

A summary of the ITEM component specifications follows:

Heading Row:

ITEM

Center Row:

ITEMID mnemonic | SUBNO # | ITEMLAG # | SDESC text | FORMAT m.n | DATALEN #

End Row:

END

Each data item is assigned an ITEMID with an associated SUBNO. For CRSP stock and index data, the ITEMID identifies a data item and the SUBNO can indicate a variation of an item. Not all ITEMIDs have more than one SUBNO. Following is an example of a sample ITEM section. SUBNO 0 is the default for all data items and may be omitted in the request file.

Compustat data items use a keyset in place of a SUBNO.

Your product mix determines which of these are available. Additional indexes and portfolio types are available when using the CRSPAccess stock data in conjunction with the CRSP US Index Database and Security Portfolio Assignment Module. In this case it is chosen to select the NYSE/NYSE MKT/NASDAQ Capitalization Portfolio assignment.

An item section may appear as follows:

ITEM
ITEMID caldt
ITEMID prc
ITEMID prc | SUBNO 1
ITEMID indtret | SUBNO 1000081
ITEMID indtret | SUBNO 1000080
ITEMID porttret | keyset 101
ITEMID saleq | keyset 1
ITEMID sales
END
A. Data Item Keywords and Usage

The keywords used to identify items are described below. Details for each of the data items can be found in the ts_print Daily and Monthly Data Item Tables. Please refer to these tables when creating your input file.

1. ITEM Identifiers

CRSP ITEMIDs are mapped to all raw and derived data items and serve as the primary item identification code for the specific data item requested. CRSP item definitions can be found found in the Data Definitions section.

ITEMIDs may be defined by secondary identifiers:

1. SUBNO

Represents a variation of the item. For example, the data item Price (ITEMID prc) has 2 SUBNOs. SUBNO 0 = last price and SUBNO 1 = last non-missing price. For all data items, SUBNO 0 is the default and may be left off of the item specification row in a request file.

ITEMID prc
ITEMID prc | SUBNO 1
2. INDNO

Represents an associated index series used with the specified item. Items associated with an index are identified in the ts_print Daily and Monthly Data Item Tables with “indno” in the column labeled “Subno”. A full list of indexes is provided here.

ITEMID indtret | SUBNO 1000081
Keyset Usage for Stock

The portype and grouptype values for Portfolios and Groups may be accessed as either porttype and grouptype values or keyset offsets.

Daily porttype values 1-9 equate to keyset values 101- 109

Monthly porttype values 1-8 equate to keyset values 201-208

Grouptype values 1-50 equate to keyset value 301-350. Note that S&P 500 Constituents is the only valid group, represented by grouptype 16 or keyset 316.

The advantage to using keyset offsets is that they provide unique values across all frequencies of databases.

3. PORTTYPE

Represents an associated portfolio type used with the specified item. Each portfolio type represents a portfolio based on market capitalization within a market segment index. Items associated with a portfolio are identified in the ts_print Daily and Monthly Data Item Tables with “porttype” in the column labeled “Subno”.

Data may be accessed with either SUBNO or with keyset offsets as described above.

ITEMID porttret|SUBNO 1

is equivalent to the following (for daily data):

ITEMID portret|keyset 101
4. KEYSET (for Compustat data items)

Qualifies ITEMID by specifying secondary keys. KEYSET must be followed by a numeric value. If no KEYSET is provided, the default is used.

ITEMID saleq|keyset 2
5. KEYHDR

Qualifies ITEMID by defining how the default item header is modified by the keyset that is used. Options include:

TAG

Returns the item header followed by an underscore and the keyset’s TAG.

Example: for the Standard keyset for Sales:

KEYHDR TAG will result in the header SALE_STD

NUM

Returns the item header followed by an underscore and the keyset’s NUM.

Example: for the Standard keyset for Sales:

KEYHDR NUM will result in the header SALE_1

NONE

Returns no keyset information with the item header.

Example: for the Standard keyset for Sales:

KEYHDR NONE will result in the header SALE

6. CURRENCY

Forces all monetary output for the selected item into a given currency. It is followed by codes:

USD  US dollars
CAD  Canadian dollars

Example:

ITEMID sale 2 | KEYHDR NONE | CURRENCY USD

The Compustat default is to present data in the native currency of the filing. Ts_print follows this same rule. Currency translation is applied to the data in their original time series periods and then mapped to the output calendar selected by the user. If no currency translation rate is available and the CURRENCY selected is different from the reported currency, all missing values are reported.

2. Item Usage for Compustat Data

Two pieces of information are needed for accessing Compustat data items:

Itm_name
The CRSP-assigned name attached to a Compustat mnemonic. For most items, the CRSP itm_name is identical to the Compustat mnemonic name. In rare situations, CRSP has assigned a new name to preserve unique items acrpss Compustat and CRSP products. In ts_print request files, itm_names are specified with ITEMID, just as CRSP stock items.

Keyset
The CRSP-assigned numeric representation of Compustat secondary keys needed to uniquely identify an itm_name’s series. Secondary keys can distinguish series of the same items by such criteria as data format, industry format, consolidation level, and population source. CRSP assigns a default keyset to each item that will be used if keysets are not specified.

3. Finding Item Names and Keysets

CRSP directs subscribers to S&P’s Compustat's website for item names, definitions, and methodology. Compustat has created Excel worksheets that cross-reference the old FTP item numbers and the new Xpressfeed data items. Not all items have one-to-one mappings.

4. Unpopulated Data Items

Many items are defined by Compustat but contain no data for any date range. ts_print excludes these items. If they are included in a request file, ts_print will report them as unknown items.

Not all items defined by Compustat are populated for all possible keysets. If an item is selected with an unpopulated keyset, it will be reported as unavailable.

5. ITEM Qualifiers
1. SDESC

Short text description allows you to override the default header text. The default item headers are listed in the Daily and Monthly data item tables.

For example, to use the default header for the PERMNO data item (“PERMNO”), there is no need to include the SDESC qualifier.

ITEM
ITEMID permno|SUBNO 0
END

This produces output like the following:

    PERMNO
90319 20080501 90319
90319 20080502 90319
90319 20080505 90319
90319 20080506 90319
90319 20080507 90319

To change PERMNO’s header from “PERMNO” to “Unique Security ID”, use the following SDESC qualifier:

ITEM
ITEMID permno|SUBNO 0 |SDESC Unique Security ID
END

The change produces the following output:

    Unique Security ID
90319 20080501 90319
90319 20080502 90319
90319 20080505 90319
90319 20080506 90319
90319 20080507 90319

The short description may contain up to 20 characters.

2. FORMAT

Allows you to modify the output formatting assigned to a data item. There are two ways to specify the format. The first is in the form m.n, where m is the number of digits allocated to the left of the decimal point in the output, and n is the number of digits to the right of the decimal. The n is optional. It is ignored for integer fields. If n is not specified in the floating point fields, no decimal is printed. The second method of data item formatting uses output specifiers from the C programming language. The default C format for each ITEMID is listed in the Format column of the Daily and Monthly data item tables.

3. DATALEN

The number of characters needed to store the output data to override the default. This should be at least as large as any field width specified in the format. This field should be modified when you wish to assign the field a header which does not fit within the default FORMAT for the ITEMID.

The data length has been set to produce an output file that is easily readable. If you are importing the data into another program for additional data manipulation, you may need to change the DATALEN (data length) field. This is particularly true with the character fields. The non-character fields may add spaces to the total allocated. If this occurs, use the FORMAT field to correct the total spaces for importing. When manipulating the format this way, you are not able to justify the fields. Character fields default to left justification.

4. Date Specification

The DATE component sets the calendar used in your output. It is the periodicity with which an output value will be included for each data item. This is independent of the reporting frequency of the data. Either a date range or a relative date may be selected. The calendar may be one of six calendars in the database: daily, weekly, monthly, quarterly, semi-annual, or annual. The ranges can be either the same for all input entities, or based on an event date for each entity.

A. CCM Semi-annual Calendar

A semi-annual output calendar is provided that can be used in any request. The CALNAME used is semiann.

Compustat includes semi-annual data items and CRSP provides these items as semi-annual time series. One value per year at the midpoint between fiscal year-ends. Annual or quarterly items must be used to fill in the second half of the fiscal year.

CRSP software first looks for the daily stock calendar, then the monthly stock calendar, then the CCM calendar Because the semi-annual calendar resides only in the CCM database, its use requires an override of the CRSP daily and monthly calendars.

To invoke ts_print and override the calendar, use the following:

ts_print_itm.exe filename.rqt output.out
“CRSP_CAL=CRSP_CCM”

Data may be presented in using date ranges or relative dates. Date ranges have fixed beginning and end dates and apply globally. Relative dates require and return data around a specified event date. Event dates are provided when Entities are added or included in Entity input files.

The DATE component consists of three parts:

  1. The DATE heading row which identifies the component
  2. The DATE center row(s) which detail(s) the desired calendar information
  3. The END row, which closes the DATE input information

A summary of the DATE component specifications follows.

Heading Row:

DATE

Center Row:

CALNAME text or CALFILE filename | RANGE (or ABSOLUTE) or
RELATIVE dates | FISCAL | CALFORMAT # | DISPLAY # [-#] [,# [-#]…

End Row:

END

The calendar name or a user-specified calendar file and either an absolute date, relative range must be chosen. The default calendar format is YYYYMMDD, but other calendar output formats are available, including YYMMDD, MM/DD/YY, MM/DD/YYYY, and DD-MMM-YYYY.

Following are examples. The first example will produce quarterly output for each of the data items in the date range between January 1, 1980 and December 31, 2007. The calendar indicates the frequency of the data items selected for the report. The second example will report on a daily basis a total of 5 days, from 5 days before the event date, the event date (EVDATE), and 5 days after the event date. The event date for each entity is specified in the ENTITY specification section of your input file.

e.g.

DATE

CALNAME quarterly|RANGE 198001-200712
END

e.g.

DATE
CALNAME daily|RELATIVE -5,5
END

Compustat Fiscal usage (see the FISCAL option below for details):

DATE
CALNAME annual | range 2000-2007 | FISCAL | CALFORMAT 6
END

B. DATE Keywords and Usage

The keywords used to identify the report date are described below.

1. CALNAME

The name of an existing calendar to set the frequency of reporting in the output file. ts_print supports reporting for Daily, Weekly, Monthly, Quarterly, Semi-Annual (for Compustat data), and Annual Calendars. Data items can be used with any of the supported calendars. Input data frequency is determined by the data item specified in the ITEM section. The supported calendars must be chosen from the following table:

CALNAME Calendar Description
Daily CRSP Daily Stock Calendar
Weekly CRSP Weekly Stock Calendar
Monthly CRSP Monthly Stock Calendar
Quarterly CRSP Quarterly Stock Calendar
Semi-Annual Compustat Semi-Annual Calendar
Annual CRSP Annual Stock Calendar
2. CALFILE Filename

The calendar used in ts_print to a user-specified input calendar file. CALFILE allows user to supply an output calendar from a file in place of standard CRSP calendars selected with the CALNAME option. file.path must refer to a file containing calendar dates, one per row, in date order, in YYYYMMDD format. Data items are converted to the user’s calendar for output. Fiscal year conversions of stock data are not supported with user calendars.

3. RANGE Daterange

The fixed date range from which ts_print reports data. Ranges can be expressed as YYYY, YYYY-YYYY, YYYYMM, YYYYMM-YYYYMM, YYYYMMDD, or YYYYMMDD-YYYYMMDD. If only a month or year is specified, all dates in the calendar belonging to that month or year are included. If the chosen dates are not in the selected calendar, the beginning range uses the next following date in the calendar and the ending range uses the last previous date in the calendar. Output will be produced for all entities for all items for each period in the range. If the entity does not have data during the range or is restricted by the date range selected in the ENTITY description section, missing values will be included in the output report.

4. RELATIVE Daterange

The event time range of a report used to select data for entities based on an entity-specific event date. Ranges are expressed as the first period relative to the event date followed by a comma and the last period relative to the event date. A range before the event date is indicated as a negative number. For example, -5,10 would report 5 periods before the event date set in the ENTITY component and 10 period after. The period is the CALNAMEyou choose. A range on the event date is indicated as 0.

The RELATIVE date is dependent on the EVDATE or the D1 value in an input ENTITY component. This option is typically used for event studies, when the data range sought for each security is different. Using this option, RELATIVE -5,6, for example, would return results for the five reporting dates before the event date, the event date period, and the six reporting periods after the event date. Only an event date can be specified with entities if using this option. An entity date range cannot be used because the output data header for a RELATIVE calendar is in terms of event time, not calendar time. Therefore, this option does not work with both beginning and ending dates.

It is useful to include the ITEMID caldt (mcaldt), or altdt (maltdt) for partial period data in the output file, to see the actual dates for each entity when using relative dates.

5. CALFORMAT

A numeric code for the formatting of the dates appearing in the output when date headers are chosen. Options include:

Code Format Example
1 YYYYMMDD (default) 20071231
2 YYMMDD 071231
3 MM/DD/YY 12/31/07
4 MM/DD/YYYY 12/31/2007
5 DD-mmm-YYYY 31-Dec-2007
6 Cal-Based 2007.4
6. DISPLAY #[-#][,#[-#]]...

Enables the user to control exactly which output periods appear in the output.

This does not affect calculations, just which dates are displayed. It can be used with RANGE or RELATIVE dates. The display range must be a subset of the full selected range. For example, if RELATIVE -100,100|DISPLAY -100,-1-1,100 is used, data will be calculated for the range 100 days before event date to 100 days after event date, but only days -100, -1, 0, 1, and 100 will appear in the output. If RANGE 20030102-20030630|DISPLAY 20030102,20030415-20030418,20030615 is used, data will be calculated for the first half of 2003, but only days 20030102, 20030415, 20030415, 20030416, 20030417, and 20030615 will appear in the output.

7. FISCAL

It is often desirable to output the CRSP/Compustat Merged fundamental data items based on the company’s fiscal year. A fiscal calendar option is available to do so. Compustat fundamental data are grouped and restricted by Data Year, which is determined by where a company’s fiscal year falls within the calendar year ending December. The default in ts_print for presenting Compustat data is the Calendar year though users may switch to a Fiscal Year option.

The Fiscal Year output option is available when using Compustat data alone or in combination with CRSP stock data. The Compustat data are displayed in the year where most activity occurs.

Note: When CRSP and Compustat data are extracted together and using the fiscal calendar, the CRSP data will align with the fiscal Compustat data items. As an example, for a company with a March 2007 fiscal year end using an annual output fiscal calendar:

CALDT Sales Prc
2006 25000 15.50

The March Sales data wll align with the 2006 calendar, for most activity occurred within that year. The price associated with the 2006 year is the March 2007 month-end price.

If a monthly output fiscal calendar is used:

CALDT Sales Prc
200606 25000 14.00
200607 25000 14.38
...
200612 25000 15.50

200606 represents the 6th month in the 2006 fiscal year, which equates to the September month-end 2006 price The 200612 price represents the 12th month in the 2006 fiscal year, which is the March 2007 month-end price.

5. Options and Output Specification

Each data point represents the data ITEM value for one ENTITY on a given DATE. These three points are plotted in a table to produce the report or output file. The OPTIONS component specifies the appearance of the output file.

  1. A heading row which identifies the component.
  2. Center rows describing the desired output options.
  3. The END row, which closes the OPTIONS component input information.

Full syntax for an OPTIONS component is:

OPTIONS
X type[,headers]|Y type[,headers]|Z type[,headers],zflag#
|OUTNAME filename|REPNAME text|FIELDDELIM text|BUFSIZE #|NOFILL
CHARDELIM text|ROWDELIM #,#|DEFAULT #|COMPACT|PARTIAL 1|DLRET DEFAULT
|DLRET [filename]|PRIMARY|CURRENCY USD
END

The following example contains the required X, Y, and Z axes specifications. Output will include columns with data for each ENTITY and rows with ITEMs and DATEs, sorted by ITEM, then DATE. ts_print will generate an output file named ts_samp3.dat (OUTNAME) into the working directory. The report will have a heading called Sample 6.

e.g.

OPTIONS
X ENTITY|Y DATE|Z ITEM,3|OUTNAME ts_samp3.dat|REPNAME Sample6
END

A. Report OPTIONS Keywords and Usage

1. Row and Column Assignment

X-axis, Y-axis, and Z-axis assignments are mandatory, and must allocate ENTITY, ITEM, and DATE to the graphical axes.

A. Type

Used to assign the data components to the axes with one of the keywords ENTITY, DATE, or ITEM. Each component must be assigned to exactly one axis.

B. Headers

Determines whether headers are written to the output file for the axis. If included they must be set to YES, to show column and row header, or NO, to hide them. Header specification is included with each axis specification. The default is YES. The default header for an ENTITY is the PERMNO for a security and INDNO for an index. The default header for a data ITEM is the item header listed in the stock and indexes Data Item Tables. The default header for DATE is the YYYYMMDD date for absolute calendar ranges and relative period numbers for relative dates.

C. Z Flag #

Z flag # controls how three-dimensional data is printed as two-dimensional output. It is a number, 1, 2, or 3, as described below.

Each dimension, ITEM, ENTITY, and DATE, is user-assigned to an X-, Y-, and Z-axis. Other options control the output file’s data spacing and delimiters. For the same axis-data allocation, the Z-axis can be printed in two dimensional output in three ways (below). The X-axis represents ITEMs (for example, Prices, Returns, and Volume). The Y-axis represents the date (January - April, 1998). The Z-axis represents the ENTITY (PERMNOs/securities 12490 (IBM) and 43916 (DEC)).

Z Flag 1:
X and Y table is repeated for each Z item, where Z is placed on the Y-axis effectively as a header for the DATE and ITEM information.

Z Flag 2:
Z (ENTITY) data is placed on the X-axis and repeated for each X item, where Z functions as an ENTITY header for each ITEM, with one ENTITY following the next.

Z Flag 3:
Z (ENTITY) data is placed on the Y-Axis and repeated for each Y item as the first column in the table for each DATE and ITEM.

B. OPTIONS Output

1. OUTNAME

The name of the file where the output will be stored. If OUTNAME is not specified, the data will dump to the screen.

2. REPNAME

A text description that will be placed at the top of the report.

3. DLRET DEFAULT

Outputs the default value, -88.0 for missing delisting returns for ENTITIES that have delisted during the selected dates. You must have return selected as an ITEM option to include Delisting Returns in your output.

4. DLRET filename

Outputs user-specified missing delisting return codes. The user may assign missing values for a range of delisting codes for select beginning and ending exchanges. To do this, a text input file must be created containing the following fields in the following order: begin delist code, end delist code, begin exchange code, end exchange code, alternate delisting return value, alternate delisting return without dividends value.

For example:

200 299 1 3 -0.50 -0.55
500 570 3 3 -0.40 -0.45
571 600 3 3 -0.30 -0.35

Note that in this example, the first row would assign a -0.50 value to missing delisting returns for securities with delisting codes 200-299 that initially traded on NYSE and ended up trading on NASDAQ, and -0.55 for missing delisting returns without dividends. If your request file included a security with a missing delisting return that was not included in your input file, the default missing delisting return, -55.0, would be used instead.

5. PARTIAL 1

Includes partial-period data in the output. If Partial 1 is not used, ts_print will not include the last month of data for a company that stopped trading mid-month, because only months with end-of-month data are normally included. This option applies to monthly data.

6. CURRENCY

Forces all output for any monetary item to a given currency. It is followed by one of the following codes:

USD  US Dollars

REP  (default) As reported by Compustat

OPTIONS
X ITEM,NO|Y DATE,YES|Z ENTITY,YES,3|OUTNAME ts_ccm_all.out|NOFILL
FIELDDELIM p|COMPACT|CURRENCY USD|PRIMARY
END
7. PRIMARY

The PRIMARY option determines the links that will be used when linking Compustat data to CRSP PERMNOs. If PRIMARY is present, then only primary links based on the LINKPRIM qualifier of the link history are included. All other links are discarded. This will ensure that a company with multiple issues is only included once in the output.

OPTIONS
X ITEM,NO|Y DATE,YES|Z ENTITY,YES,3|OUTNAME ts_ccm_all.out|NOFILL
FIELDDELIM p|COMPACT|CURRENCY USD|PRIMARY
END
8. NOFILL

Using the NOFILL default, rows outside an issue’s date range or the user’s date specification will not print to the output file. NOFILL is only applicable if ITEM is chosen for the X-axis, DATE for the Y-axis, ENTITY for the Z-axis, zflag # is 1 or 3, and the DATE specification is RANGE. NOFILL does not work with RELATIVE dates.

9. FIELDDELIM String

A specified character string that will be placed as a delimiter between fields in output file rows. The default is a space delimiter. Special predefined characters P (|) pipe, S ( ) space, and C(,) comma, can be used. P, S, and C can only be used as predefined characters. For example, using the default space delimiter, output appears like this:

  Company Name
Askhi Ret Shr
12060 20080602 GENERAL ELECTRIC CO
30.89000 -0.010091 9967400
12060 20080603 GENERAL ELECTRIC CO
30.80000 0.001644 9967400
12060 20080604 GENERAL ELECTRIC CO
30.73000 -0.000328 9967400
12060 20080605 GENERAL ELECTRIC CO
31.14000 0.020033 9967400
12060 20080606 GENERAL ELECTRIC CO
30.86000 -0.033484 9967400

While

FIELDDELIM p

changes the field delimiter to the pipe (|) character:

  |   | Company Name  |
Askhi Ret Shr |
12060|20080602|GENERAL ELECTRIC CO       |
30.89000| -0.010091| 9967400  
12060|20080603|GENERAL ELECTRIC CO       |
30.80000| 0.001644| 9967400  
12060|20080604|GENERAL ELECTRIC CO       |
30.73000| -0.000328| 9967400  
12060|20080605|GENERAL ELECTRIC CO       |
31.14000| 0.020033| 9967400  
12060|20080606|GENERAL ELECTRIC CO       |
30.86000| -0.033484| 9967400  
12060|20080609|GENERAL ELECTRIC CO       |
30.35000| 0.001332| 9967400  
10. BUFSIZE #

The size of memory that will be allocated by the program. In a large study, the program will save intermediate data in a temporary file. This can degrade performance . If memory is available on your system, you can use the BUFSIZE option to increase the size of the internal buffer. The program will report the necessary buffer size needed if the BUFSIZE option can improve performance. Switching axes can also be used to improve performance for large datasets. Performance for large datasets is greatly improved if ITEM is chosen for the X-axis, DATE is chosen for the Y-axis, ENTITY for the Z-axis, and zflag#is set to 1or 3.

11. CHARDELIM string

A character string placed before and after all character string fields in output file rows. The default is no character string delimiter. For example, CHARDELIM * causes the character string field Company Name below to be surrounded by asterisks.

  Company Name   
Askhi Ret Shr  
12060 20080602 *GENERAL ELECTRIC CO *
30.89000| -0.010091| 9967400  
12060 20080603 *GENERAL ELECTRIC CO *
30.80000| 0.001644| 9967400  
12060 20080604 *GENERAL ELECTRIC CO *
30.73000| -0.000328| 9967400  
12060 20080605 *GENERAL ELECTRIC CO *
31.14000| 0.020033| 9967400  
12060 20080606 *GENERAL ELECTRIC CO *
30.86000| -0.033484| 9967400  
12060 20080609 *GENERAL ELECTRIC CO *
30.35000| 0.001332| 9967400  
12. ROWDELIM #,#

Controls the number of rows between output lines. The first integer is the number of blank lines between rows when the Z-axis value changes when the Z-axis data is printed in rows. The second integer is the number of blank lines between all data rows. The default is 0,0.

13. DEFAULT

A value of 1 sets output header options to YES and FIELDDELIM to a space.

14. COMPACT

Compresses output by removing all spaces and trailing decimal zeros in numbers. The field delimiter is automatically set to 1 if not set with FIELDDELIM, and the row delimiters are set to produce no blank lines if not already set with ROWDELIM. COMPACT is ideal for producing output to be loaded into another program.

  1. The row detailing the functionality of a single option must wrap. Different keywords can be on separate lines, but the last keyword on a line cannot end with a pipe character, and the beginning of a line must be a keyword.
  2. Extra spaces are allowed between options, but not within the description of an option.