2
Chicago Booth

Location: Documentation » US Stock and Index Databases

 

ind_partial

This program creates a new CRSPAccess CRSPDB index database from an existing database or appends indexes from one existing database to another. It can use an INDNO list or a data type restriction to subset the original database. It takes parameters on input and output databases, input and output set identifiers, data wanted in the new database, and optionally a file containing INDNOs to copy to the new database. Standard stock databases contain stock and index sets.

Usage

ind_partial inpath outpath insetid outsetid setwanted datawanted [indnofile]

Parameter Values

inpath
Input CRSPDB directory path. The directory where the database is stored. Standard environment names can be used such as $CRSP_DSTK or $CRSP_MSTK on UNIX, %crsp_dstk% or %crsp_mstk% on Windows.
outpath
Output CRSPDB directory path. The directory where the new database will be stored. This can be an empty directory or an existing directory. If it is an empty directory, a new database will be created. If there is already a CRSPDB in that directory, the selected PERMNOs will be added to that database.
insetid
Input Setid. The input database set type. Use one of:
400
if monthly series
420
if monthly groups
440
if daily series
460
if daily groups
outsetid
Output Setid. The output database set type. Input and output index setids should be the same.
setwanted
Set wanted. A binary flag to determine the modules that will be supported in the new database. Use 8191 to support all current modules. A module that is not loaded at this time cannot be added later to that database.
datawanted
Data wanted. A binary flag to determine which modules will be copied to the new database. Use 8191 to copy all data to the new database. Data wanted must be a subset of set wanted. Individual wanted codes can be summed to load multiple modules. Individual modules codes are:
1
headers
2
rebalancing information for index groups
4
issue lists
8
portfolio used counts
16
portfolio total eligible counts
32
portfolio used weights
64
portfolio eligible weights
128
total returns
256
capital appreciation returns
512
income returns
1024
total return index levels
2048
capital appreciation index
4096
income return index levels
indnofile
(optional) The name of a file with a list of INDNOs, one to a line. This parameter is optional. If it is used, only the INDNOs in the input file will have data copied to the new database. If the parameter is not used, all INDNOs in the input database will be copied.

Example

Windows

To add the S&P 500 Composite index series to a new database to another sample created by stk_partial, create an input file, indnos.txt with the INDNO 1000502 and run the command:

ind_partial %crsp_mstk% c:\masub\ 400 400 8191 8191 indnos.txt