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.
> crsp_ind_subset inpath outpath insetid outsetid setwanted datawanted begdate enddate [indnofile]
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.
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.
Input Setid. The input database set type. Use one of:
- monthly series
- monthly groups
- daily series
- daily groups
Output Setid. The output database set type. Input and output index setids should be the same.
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.
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:
- rebalancing information for index groups
- issue lists
- portfolio used counts
- portfolio total eligible counts
- portfolio used weights
- portfolio eligible weights
- total returns
- capital appreciation returns
- income returns
- total return index levels
- capital appreciation index levels
- income return index levels
The beginning date, in YYYYMMDD format, of index data to load to the new database.
The ending date, in YYYYMMDD format, of index data to load to the new database.
(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.