The INSET= option enables you to select any companies or issues for which you want data. This example selects two CRSP Index Series from the CRSP Indices data, and four securities from the CRSP US Stock data for data extraction. Note that because each CRSP database might be in a different location and must be opened separately, a total of two different librefs are used, one for each database.
data indices; indno=1000000; output; /* NYSE Value-Weighted Market Index */ indno=1000001; output; /* NYSE Equal-Weighted Market Index */ run; libname _all_ clear; libname ind2 sasecrsp "%sysget(CRSP_MSTK)" setid=420 inset='indices,INDNO,INDNO' range='19990101-19990401'; title2 'Total Returns for NYSE Value- and Equal-Weighted Market Indices'; proc print data=ind2.tret label; run;
Output 46.4.1 shows the result of selecting two CRSP Index Series from the CRSP Indices data.
Output 46.4.1: IND Data Extracted Using INSET= Option
The following statements select three securities from the CRSP US Stock data by using TICKER keys in the INSET= option for data extraction:
data securities; ticker='BAC'; output; /* Bank of America */ ticker='DUK'; output; /* Duke Energy */ ticker='GSK'; output; /* GlaxoSmithKline */ run; libname sec3 sasecrsp "%sysget(CRSP_MSTK)" setid=20 inset='securities,TICKER,TICKER' range='19970820-19970920'; title2 'PERMNOs and General Header Info of Selected TICKERs'; proc print data=sec3.stkhead(keep=permno htick htsymbol) label; run; title3 'Average Price for Bank of America, Duke and GlaxoSmithKline'; proc print data=sec3.prc label; run;
Output 46.4.2 shows the STK header data for the TICKER keys that are specified by using the INSET= option.
Output 46.4.2: STK Header Data Extracted Using INSET= Option
Output 46.4.3 shows the STK price data for the TICKER keys that are specified by using the INSET= option.
Output 46.4.3: STK Price Data Extracted Using INSET= Option