2
Chicago Booth

Location: Documentation » CRSP/Compustat Merged Database

 

ccm_print

ccm_print is a command-line utility providing basic browsing capabilities for new CRSP\Compustat Merged Databases created from data delivered via Compustat’s Xpressfeed product. Company level, index level, and security level data are all available. ccm_print relies on reference data, distributed with the databases, that describe the available items, their relationships and usage.

Click here for a list of ccm_print options. >>

Company, Index, and Security Selection

ccm_print supports company and index data. Company data may include data for one or more securities. Compustat data may be selected by using any of several company, security, and index identifiers. These identifiers include Compustat identifiers, such as GVKEY, and CRSP identifiers that operated through the CRSP link.

An identifier is called a keytype. GVKEY is the default keytype used to access Compustat data. All other keytypes are selected by using the /ky option:

/ky KEYTYPE

Supported keytypes for use with Compustat data follow:

GVKEY

Compustat's permanent identifier for company records only. Securities can be specified by combining GVKEY with IID in the form:

gvkey.iid

For example, 6066.01 represents the GVKEY 6066 for IBM, and its first security, noted by .01.

GVKEYX

Compustat's permanent identifier for indices only. Individual company and security data are ignored.

CCMID

Compustat's permanent identifier, either GVKEY for companies or GVKEYX for indices. Input is in the gvkey.iid format, where the iid is ignored if the specified identifier represents an index.

PERMNO

CRSP's historical permno link for security level data. Any GVKEY found with a PERMNO in its link history can be reported. The data reported are for the GVKEY organized by Compustat with no regard to the time period of the PERMNO in the link. Security data will only be reported for IIDs found in the link.

PERMCO

CRSP's historical permco link for company level data. Any GVKEY found with a PERMCO in its link history can be reported. The data reported are for the GVKEY organized by Compustat with no regard to the time period of the PERMCO in the link.

Ticker

Compustat reported issue-trading ticker, which selects a GVKEY and a specific security of the GVKEY.

SIC

Compustat reported SIC Industry Code. An IID can be specified to get a specific security for a found company. Input is in the form, sic.iid.

CUSIP

Compustat CUSIP will select a GVKEY and a specific security within the GVKEY.

APERMNO

Composite company and security data based on CRSP PERMNO via the link. Provides access to Compustat data in CRSP-Centric mode.

PPERMNO

Composite Compustat company and security data linked to a CRSP PERMNO with data only when the security is marked as primary by Compustat. Provides access to CRSP data in CRSP-Centric mode.

Data items are either company or security-based. Security-based data items require both GVKEY and IID numbers. Keytypes PERMNO, Ticker, and CUSIP do not required IIDs for they are by definition security level identifiers. GVKEYX accesses index data.

CRSP-Centric Mode

Accessing Compustat data through ts_print is CRSP-centric, meaning that the primary access key in this mode is CRSP PERMNO or PERMCO. In CRSP-Centric mode a composite record is built using the CRSP Link reading one or more GVKEYs, creating a seamless one-to-one access with the CRSP database.

BACK TO TOP >>

Using Company and Index Data

Key Identifiers

Company and Index data provided by Compustat share some common data items, however, applicable header data and keysets are different. If data not applicable to the key type is selected, all missing values will be reported. Key options are provided to make it easy to select data of only one type. /ky gvkey accesses company data and /ky gvkeyx accesses index data. /ky ccmid can be used for either company or index data. All other keys will find company data.

Data Groups

Data groups /in and /ih, Index header and S&P Index header respectively, contain data for indices only. Company and security data groups contain no data for indices.

Annual and quarterly groups, including period descriptors, contain items available for both companies and indices. If a keyset 1 is available for an item, it represents company data. If keyset 0 is available, it represents index data.

BACK TO TOP >>

Link Changes

In the legacy versions of Compustat, only a company level identifier was available, and any security data came from the most representative issue of the company. The CRSP CCM database now links CRSP PERMNO to both GVKEY and Compustat's new security identifier, IID. By doing so, additional Compustat issues are identified and a CRSP PERMNO can link to Compustat data even when it is not the primary security.

Consider the following in order to access the new security level link data.

BACK TO TOP >>

Item Selection Options

Item Overview – Itm_names

Each Compustat item in the CCM database has a unique mnemonic text name, itm_name, maintained by CRSP. The CRSP item names match the Compustat mnemonic names wherever possible. In some rare instances, CRSP must provide a different name from Compustat’s in order to maintain uniqueness across the Compustat data groups and all CRSP products supported by CRSPAccess.

The following table is a comprehensive list of cases where the CRSP itm_name used does not match Compustat's mnemonic.

Compustat mnemonic CRSP itm_name Description Definition
BETA XPFBETA Data item Beta
DVPSXM XDVPXSM Data item Index Monthly Dividend
PRC XPFPRC Data item Participation Rights Certificates
PRCCM XPRCCM Data item Index Price – Close Monthly
PRCHM XPRCHM Data item Index Price – High Monthly
PRCLM XPRCLM Data item Index Price – Low Monthly
PRC_DC XPFPRC_DC Data code Participation Rights Certificates Data Code
PRC_FN XPFPRC_FN Footnote Participation Rights Certificates Footnote
RET XPFRET Data item Total RE Property
RET_DC XPFRET_DC Data code Total RE Property Data Code
RET_FN XPFRET_FN Footnote Total RE Property Footnote
YEAR YEARQ Data item Year Quarterly

Keysets

Compustat items can be qualified by a set of secondary keys. This collection of secondary keys and values create a keyset that assigns a numeric code and mnemonic tag to each unique colletion. Each keyset represents different output series. When multiple keysets are available for a particular data item, users can specify both the item and keyset to identify the series of interest or simply use the default preset combination that is most commonly used.

For example, the data item SALE has secondary keys for industry format, data format, population source, and consolidation level. A different value of company sales may be available for any combination of these keys. One keyset may represent originally reported sales. Another may represent the final restated sales from a later filing.

BACK TO TOP >>

Data Item Groups

Compustat itm_names are further organized into groups for ease of selection and presentation. Each group is given a grp_name. Grp_names are unique and do not overlay with itm_name.

A group can be made up of either items or other groups. Items can belong to more than one group. If the group contains items, they must be comparable so that they form a single table. For example, time series items in the same group must share the same calendar so that they properly align.

Groups have a two-letter mnemonic shortcut that may be used to access the data. Group data may also be accessed by using the grp_name.

New Item Group Name

Group Name

CCM Code

Company Header History

COMPHIST

/ch

Company Summary

COMPSUMM

/cs

Company Link Range History

LINKRNG

/lr

Officer Title

OFFTITL

/ot

Company Master

MASTER

/ma

Operating Segment Currency

CCM_SEGCUR

/sr

Operating Segment Customer

CCM_SEGCUST

/sc

Operating Segment Detail

CCM_SEGDTL

/sd

Operating Segment Geographic Area Codes

CCM_SEGGEO

/sg

Operating Segment Item

CCM_SEGITM

/sm

Operating Segment NAICS

CCM_SEGNAICS

/sy

Operating Segment Product

CCM_SEGPROD

/sp

Operating Segment Source

CCM_SEGSRC

/ss

Company Filing Date Data

CCM_FILEDATE

/fd

Company Audit Data - Annual

CCM_AAUDIT

/ua

Company Audit Data – Quarterly

CCM_IAUDIT

/ia

Company Adjustment Factor Event History

ADJFACT

/aj

Company Industry Presentation Code

CCM_IPCD

/ip

Company Fortune 500 Ranking Data

FORTUNE

/fo

Company Market Data - Annual

AMKT

/am

Company Market Data - Quarterly

IMKT

/qm

GICS History

HGIC

/gh

Security Header List

SECLIST

/sl

Security Header

SECURITY

/se

Security Header History

SECHIST

/sn

Security Monthly Stock Split Events

SEC_MTHSPT

/tx

Security Monthly Stock Split Events Footnotes

SEC_MSPTFN

/tf

Security Monthly Stock Dividend Events Footnotes

SEC_MDIVFN

/td

Constituent Mapping

IDXCST_HIS

/im

Security S&P Index Old Format Change Events

SEC_SPIND

/is

S&P Index Constituent Descriptor Change Events

SPIDX_CST

/ix

Index Header

IDX_INDEX

/in

Index Header Pre-GICS

SPIND

/ih

Annual Index Period Descriptor

IDXADES

/xa

Quarterly Index Period Descriptor

IDXQDES

/xq

 

BACK TO TOP >>

ccm_print Syntax

All options are preceded by a forward slash and can be followed by additional qualifiers. If multiple options are called, they must be separated by spaces, each option with a leading slash.

Three methods are used to select data items:

/ml "full_list"
Individual items are specified, enclosed by double quotes. Command line length limits the number of items that can be specified with this option. (Maximum input line is 2047 characters.)
/mf file + list
Utilizes an input file of data items. Appropriate for a large number of items in a request.
/printopt
For items that are in groups that can be selected using a two-letter group code.
Click here for a list of ccm_print options. >>

Command line limitations

When using /ml "full_list" syntax, the list portion (including quotation marks) may not exceed 256 characters. For lengthy requests involving many data items, use /printopts or /mf syntax. A full string of options in a ccm_print request may not exceed 2047 characters.

BACK TO TOP >>

CRSP Item List Notation

CRSP has established a standard notation for specifying a set of data items. The notation includes a high level item descriptor comprised of item elements, global qualifiers, and keyset specifications. If an item/keyset combination is requested more than one time, it is honored in the first request and ignored in all subsequent requests.

Full_list

Full description of items to select, in the form

[global_section:]list_section

Global_section

Optional section modifies all elements in the list_section. The following markers can be included:

f:
Applicable and populated footnote items are added for every item selected. Example:
/ml "f:sale;at;ceq"
Selects sales, total assets, and common equity items with default keysets and available footnotes for the selected items. This is equivalent to:
/ml "sale;sale_fn;at;at_fn;ceq;ceq_fn"
d:
Applicable and populated data codes items are added for every item selected. Example:
/ml "d:sale;at;ceq"
Selects sales, total assets, and common equity items with default keysets and available data codes for the selected items. This is equivalent to:
/ml "sale;sale_dc;at;at_dc;ceq;ceq_dc"
k.keyset_list
The specified keyset _list is applied to all items in the list without a keyset already specified. keyset_list is one of the following:

*

select all available keysets for each item selected.

#-#,#...

select all indicated keysets in a numeric list. Examples include: k.3 or 1-2 or 1,3,7, or 2-4,8 and so on.

empty

use default keysets for all items selected.

For example, the following two usages are equivalent, since keyset 1 is always the default keyset.

/ml "k:sale;at;ceq"
/ml "k.1:sale;at;ceq"

list_section

Semi-colon-delimited string of list elements, enclosed in double quotes, in the form:

"list_element[;list_element…]"
list_element

Describes an element name, elem_name that can be either a CRSP item name (itm_name) or group name (grp_name) and keysets that are applied to it. It is in the form elem_name[.keyset_list]

Examples:

/ml "sale.1;at.1"
/ml "sale;at;ceq"


File + list

Variation of full_list, but allows for use of an input file to manage large data requests. It is specified in the form

[global_section:]file_path

Where file_path is the path of a text file conitaining a list_element on each row.

Examples:

Example 1

/mf itm_file.inp
  

Where itm_file.inp contains three lines:

sale
at
ceq
  

and is equivalent to

/ml "sale;at;ceq"
  

 

Example 2

/mf f:itm_file.inp
  

Finds items and associated footnotes of those items. With the same input file as in Example 1 above, is equivalent to

/ml "f:sale;at;ceq"
  

or

/ml "sale;sale_fn;at;at_fn;ceq;ceq_fn"
  

 


Printopt

2-letter shorthand code for selected groups, specified in the form print_opt[.keyset_list]

Example:

/pa.1 /pq.* /ml "aperdes.1" /ml "qperdes.*"
  

Printopt, /ml, and /mf options may be used within a single request in any combination.

BACK TO TOP >>

Input, Output, and Formatting Options

Ccm_print allows qualifiers that control database selection, input methods, and output formats.

Set Date Ranges

/dt range1 [-range2]

Each range can be in the form YYYY, YYYYMM, or YYYYMMDD. The earliest possible date implied by that range is used for the beginning date and the last possible date implied by that range is used for the end date.

Using YYYY: /dt2007

Annual data range: 2007 - 2007

Quarterly data range: 2007.1 - 2007.4

Using YYYYMM-YYYYMM: /dt200702-200803

Annual data range: 2007 - 2007

Quarterly data range: 2007.1 - 2008.1

Using YYYYMMDD-YYYYMMDD: /dt20070125-20080415

Annual data range: 2007 - 2007

Quarterly data range: 2007.1 - 2008.1

Change Date Display

/dd DATE_DISP

CCM data may be displayed as either fiscal or calendar-based data.. Compustat data are grouped and restricted by Data Year, which is determined by where a company’s fiscal year falls within the calendar year. CRSP’s default displays the Compustat data in the calendar year for which it is reported.

Possible values are:

CAL

Default calendar-based display. All filing data will be dated by the Compustat DATADATE, the ending date of the filing period. All non-filing data will be dated normally by calendar date.

FYR

Fiscal-based display. All filing data will be dated in terms of its fiscal year or quarter using the Compustat concept of a Data Year, where the filing data are reported in the year in which most activity occurs. All non-filing data will be dated normally.

The following table illustrates the difference in output between the CAL and FYR options. Sales reported for a fiscal year ending in May, where most activity occurs in the previous year, reports as follows under each option:

/dd cal (default) /dd fyr
DATADATE SALE
Year
FYRA
SALE
 
1999
5
10130.13
20000531 10130.13
2000
5
10859.67
20010531 10859.67
2001
5
9673
20020531 9673
2002
5
9475
20030530 9475
2003
5
10156
20040528 10156
2004
5
11799
20050531 11799
2005
5
14380
20060531 14380
2006
5
17996

BACK TO TOP >>

Miscellaneous Reporting Options

Convert Currency

/ct CUR

Monetary data may be converted to and extracted using a specified currency code. Values for CUR are:

REP

As reported by Compustat is the default.

USD

US dollars

Keyset Display

/kd DIS

Keyset information is displayed with the output. Possible values for DIS are:

TAG

The default value returns the CRSP-defined mnemonic keyset tag. In the example below the keyset tags are STD and SUMM.

/ml "sale.1,2" /kd tag

Ann_TS_Item
-----------

KEYSET = STD
Year FYRA SALE
2002 5 9475.0000
2003 5 10156.0000
2004 5 11799.0000
2005 5 14380.0000
2006 5 17996.0000


KEYSET = SUMM
Year FYRA SALE
2002 5 9475.0000
2003 5 10156.0000
2004 5 11799.0000
2005 5 14380.0000
2006 5 17996.0000
NUM

Returns the keyset number.

/ml "sale.1,2" /kd num

KEYSET = 1
Year FYRA SALE
2002 5 9475.0000
2003 5 10156.0000
2004 5 11799.0000
2005 5 14380.0000
2006 5 17996.0000

KEYSET = 2
Year FYRA SALE
2002 5 9475.0000
2003 5 10156.0000
2004 5 11799.0000
2005 5 14380.0000
2006 5 17996.0000
EXP

Expands the keyset to return the Compustat items and values used to define the keyset.

/ml "sale.1,2" /kd exp

    
CONSOL = C, DATAFMT = STD, INDFMT = INDL, POPSRC = D
Year FYRA SALE
2002 5 9475.0000
2003 5 10156.0000
2004 5 11799.0000
2005 5 14380.0000
2006 5 17996.0000


CONSOL = C, DATAFMT = SUMM, INDFMT = INDL, POPSRC = D
Year FYRA SALE
2002 5 9475.0000
2003 5 10156.0000
2004 5 11799.0000
2005 5 14380.0000
2006 5 17996.0000

Keysets are never displayed if there are no effective item-qualifying keys, unless they are in a group combined with other keysets having item-qualifying keys.

BACK TO TOP >>