crsp_ind_subset
crsp_ind_subset creates a new CRSPAccess database from an existing database by subsetting index data using date range. The program can also be used to add index data to an existing CRSPAccess database.
Usage
> crsp_ind_subset inpath outpath insetid outsetid setwanted datawanted begdate
enddate [indnofile]
Parameters
- 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 INDNOs will be added to that database.
- insetid
Input Setid. The input database set type. Use one of:
- 400
- monthly series
- 420
- monthly groups
- 440
- daily series
- 460
- 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 index 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 levels
- 4096
- income return index levels
- begdate
-
The beginning date, in YYYYMMDD format, of index data to load to the new database.
- enddate
-
The ending date, in YYYYMMDD format, of index data to load to the new database.
- 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.