Options are preceded with a forward slash. Multiple options can be placed on a single line. A full request string of options can hold up to 2047 characters.
Following is a list of current stk_print options, grouped by option category. 0, -88.0, and 99.0 indicate missing values.
A. Header Information
/hh
Header file issue identification information
Begdt
COMPNO
CUSIP
Enddt
Latest Company Name
DEL
EX
19251231
0
45920010
20070531
INTERNATIONAL BUSINESS MACHS COR
100
1
SIC
Htick
Issuno
PERMCO
PERMNO
3571
IBM
0
20990
12490
Note that header ticker only contains values for active securities.
/hr
Header file issue identifiers with available data date ranges in YYYYMMDD format
BegHi
EndHi
BegAsk
EndAsk
19251231
20070531
19251231
20070531
Group Types Available
16 - S&P 500 Universe
19570301 - 20070531
Portfolio Types Avail
1 - NYSE/NYSE American/NASDAQ Cap Assignments
1925 - 2008
2 - NYSE/NYSE American Cap Assignment
1925 - 2008
4 - NYSE Cap Assignment
1925 - 2008
6 - NYSE/NYSE American Betas
1926 - 2008
7 - NYSE/NYSE American Standard Deviations
1926 - 2008
BegLo
EndLo
BegBid
EndBid
BegExc
EndExc
Begdt
Compno
19251231
20070531
19251231
20070531
0
0
19251231
0
Enddt
CUSIP
EX
SIC
Issuno
PERMCO
PERMNO
BegTrd
EndTrd
BegOpn
20070531
45920010
1
3571
0
20990
12490
0
0
19251231
EndOpn
BegPrc
EndPrc
BegRtx
EndRtx
BegRet
EndRet
Dists
Dlst
20070531
19251231
20070531
19251231
20070531
19251231
20070531
369
1
Names
Nasdin
Shares
BegVol
EndVol
6
0
303
19251231
20070531
/hl
Header identifiers with ranges in terms of calendar day numbers, starting with Dec 31, 1925 as day 1. The /hl option includes all of the options /hr does, with the corresponding CRSP file calendar indexed in Calendar Trading Date, instead of dates in YYYYMMDD format. With the exception of the date presentation, /hl provides the same data as /hr.
BegHi
EndHi
BegAsk
EndAsk
1
21623
1
21623
Group Types Available
16 - S&P 500 Universe
19570301 - 20070531
Portfolio Types Avail
1 - NYSE/NYSE American/NASDAQ Cap Assignments
1925 - 2008
2 - NYSE/NYSE American Cap Assignment
1925 - 2008
4 - NYSE Cap Assignment
1925 - 2008
6 - NYSE/NYSE American Betas
1926 - 2008
7 - NYSE/NYSE American Standard Deviations
1926 - 2008
BegLo
EndLo
BegBid
EndBid
BegExc
EndExc
Begdt
Compno
1
21623
1
21623
0
0
19251231
0
Enddt
CUSIP
EX
SIC
Issuno
PERMCO
PERMNO
BegTrd
EndTrd
BegOpn
20070531
45920010
1
3571
0
20990
12490
0
0
1
EndOpn
BegPrc
EndPrc
BegRtx
EndRtx
BegRet
EndRet
Dists
Dlst
21623
1
21623
1
21623
1
21623
369
1
Names
Nasdin
Shares
BegVol
EndVol
6
0
303
1
21623
/hn
Supplemental header identification information
Begdt
COMPNO
CUSIP
Enddt
Hcntrycd
19251231
0
45920010
20070531
Latest Company Name
CvC
Den
DEL
ElC
EX
Expdt
InC
IsC
Its
INTERNATIONAL BUSINESS MACHS COR
100
1
0
NameCd
NameDesc
NmF
Ex1
Rating
Sst
SH
ShT
SIC
Naics
Ex2
Htick
Tst
0
N
0.0000
R
11
3571
334111
IBM
A
Symbol
Issuno
PERMCO
PERMNO
IBM
20990
12490
B. Event Information
/ns
Short name event history information. Every time such activities occur that cause a change to one of the fields included in the names array, a new row is added.
Name History - Short
--------------------
Namedt
Enddt
NCUSIP
Ticker
Company Name
CL
SH
EX
SIC
19251231
19620701
INTERNATIONAL BUSINESS MACHS COR
11
1
3570
19620702
19680101
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3573
19680102
19990103
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3573
19990104
20010823
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
20010824
20020101
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
20020102
20090331
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
/nm
Names History – includes all items that are populated by any securities. Reserved items available in the
Names-All category are removed.
Name History
--------------------
Namedt
Enddt
NCUSIP
Ticker
Company Name
CL
SH
EX
SIC
19251231
19620701
INTERNATIONAL BUSINESS MACHS COR
11
1
3570
19620702
19680101
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3573
19680102
19990103
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3573
19990104
20010823
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
20010824
20020101
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
20020102
20090331
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3751
Namedt
Enddt
Symbol
Naics
Ex1
Ex2
Tst
Sst
Sst
19251231
19620701
N
A
R
19620702
19680101
N
A
R
19680102
19990103
N
A
R
19990104
20010823
N
A
R
20010824
20020101
334111
N
A
R
20020102
20090331
IBM
334111
N
A
R
All of the name fields combined constitute a Name History Record. Therefore, a change to any name field adds a row to the Name History Array. For example, the /nm option does not appear to have any changes between 20010824 and 20021231, but there are two name history rows. Notice that under the /nm option, the NAICS code was added on 20010824 and the Trading Ticker Symbol was added on 20020102.
/an
All – complete names history, all fields available
Name History - All
--------------------
Namedt
Enddt
NCUSIP
Ticker
Company Name
CL
SH
EX
SIC
19251231
19620701
INTERNATIONAL BUSINESS MACHS COR
11
1
3570
19620702
19680101
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3573
19680102
19990103
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3573
19990104
20010823
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
20010824
20020101
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
20020102
20090331
45920010
IBM
INTERNATIONAL BUSINESS MACHS COR
11
1
3571
Namedt
Enddt
Symbol
Naics
Ex1
Ex2
Tst
Sst
ShT
IsC
InC
Its
Den
ElC
CvC
19251231
19620701
N
A
R
19620702
19680101
N
A
R
19680102
19990103
N
A
R
19990104
20010823
N
A
R
20010824
20020101
334111
N
A
R
20020102
20090331
IBM
334111
N
A
R
Namedt
Enddt
NmF
Cntrycd
Uot
NameCd
Expdt
Rating
NameDesc
19251231
19620701
0
0
0
0.0000
19620702
19680101
0
0
0
0.0000
19680102
19990103
0
0
0
0.0000
19990104
20010823
0
0
0
0.0000
20010824
20020101
0
0
0
0.0000
20020102
20090331
0
0
0
0.0000
/da
Adjusted distribution events. Returns distribution codes, adjusted dividend amounts, adjustment factors for prices and shares, declaration-, ex- , record-, and pay-dates. Parameters may be set for adjustment dates, types and gaprules.
If no parameters are set, defaults are used.
/da/dt19900101-20080630
Date range: 19900101 - 20080630
Adjusted Distributions
--------------------
Code
Divamt
Facpr
Facshr
Dclrdt
Exdt
Rcrddt
Paydt
Aperm
Acomp
1232
0.30250
0.0000
0.0000
19891031
19891102
19891108
19891209
0
0
1232
0.30250
0.0000
0.0000
19900130
19900205
19900209
19900310
0
0
...
1232
0.40000
0.0000
0.0000
20070731
20070808
20070810
20070910
0
0
1232
0.40000
0.0000
0.0000
20071030
20071107
20071109
20071210
0
0
1232
0.40000
0.0000
0.0000
20080129
20080206
20080208
20080310
0
0
1232
0.50000
0.0000
0.0000
20080429
20080507
20080509
20080610
0
0
/sh
Raw shares observation event histories
Shrout
Shrsdt
Shrsenddt
Shrflg
2858
20071109
20071230
0
2875
20071231
20080210
0
4345
20080211
20080304
0
4345
20080305
20080330
2
4347
20080331
20080511
0
4347
20080512
20080630
0
/sa
Shares event histories adjusted for distributions
Shrout
Shrsdt
Shrsenddt
Shrflg
2858
20071109
20071230
0
2875
20071231
20080204
0
4313
20080205
20080210
1
4345
20080211
20080304
0
4345
20080305
20080330
2
4347
20080331
20080511
0
4347
20080512
20080630
0
/sj
Adjusted shares events. Returns adjusted shares, dates, and shares flag. Parameters may be set for adjustment dates, types and gaprules. If no parameters are set, defaults are used.
Adjusted Shares
--------------------
Shrout
Shrsdt
Shrsenddt
Shrflg
37791
19890929
19891228
0
37791
19891229
19900329
0
37791
19900330
19900628
0
...
26169
20060831
20060928
0
26169
20060929
20061030
0
26169
20061031
20061123
0
26169
20061124
20061129
2
26169
20061130
20061228
0
/de
Delisting event histories
Dlstdt
Dlstcd
Nwperm
Nwcomp
Nextdt
Dlprc
Dlpdt
Dlamt
19951215
231
10569
8477
0
0.00000
19951218
5.44880
Dlstdt
Dlret
Dlretx
19951215
-0.003648
-0.003648
/ej
Adjusted delisting events. Returns delisting amounts, dates, codes, prices, returns with and without dividends. Parameters may be set for adjustment dates, types and gaprules. If no parameters are set, defaults are used.
Adjusted Delistings
--------------------
Dlstdt
Dlstcd
Nwperm
Nwcomp
Nextdt
Dlprc
Dlpdt
Dlamt
20020228
231
11293
9147
0
0.00000
20020301
0.00000
Dlstdt
Dlret
Dlretx
20020228
-0.019565
-0.019565
/qi
NASDAQ event information histories
Trtsdt
Trtsenddt
Trtscd
Nmsind
Mmcnt
Nsdinx
20080424
20080424
1
6
83
55
20080425
20080427
1
6
82
55
20080428
20080527
1
6
83
55
20080528
20080529
1
6
82
55
20080530
20080603
1
6
81
55
20080604
20080616
1
6
82
55
20080617
99999999
1
6
83
55
C. Time-Series Groups
Only one of /dd, /ds, /dr, /dx can be used at a time.
/dd
Trading data including close, ask/high, bid/low, volume, and total return
Date
Prc
Askhi
Bidlo
Vol
Ret
20080620
122.74000
125.02000
122.50000
9624800
-0.018237
20080623
123.46000
124.50000
122.40000
5862900
0.005866
20080624
123.46000
124.25000
121.90000
7553100
0.000000
20080625
124.58000
125.83000
123.20000
7135000
0.009072
20080626
121.13000
123.82000
120.76000
9710500
-0.027693
20080627
120.05000
122.05000
118.26000
11660400
-0.008916
20080630
118.53000
120.22000
118.15000
8444000
-0.012661
/dj
Adjusted time series. Returns adjusted time series for prices, ask hi, bid low, volumes and include returns. Adjustment date, type, and gaprules are available parameters. If no parameters are set, defaults defined in the Parameter Types table are used.
/dj 19980101,1,0
Adjusted Market Summary
--------------------
Caldt
Adjprc
Adjaskhi
Adjbidlo
Adjvol
Ret
20080530
258.85999
259.98001
257.60001
4326450
-0.002159
20080602
254.72000
258.73999
253.39999
3799650
-0.015993
20080603
255.67999
258.00000
254.92000
3619300
0.003769
20080604
255.10001
257.00000
252.89999
3216200
-0.002268
20080605
256.94000
258.07999
254.39999
3076900
0.007213
20080606
249.88000
256.28000
249.48000
3943100
-0.027477
/dr
Calculated returns. Returns price, calculated returns with and without dividends. Calculated returns items allow users control for returns based on specified exchange closing prices as well as control over the size of gap windows. If no parameters are set, defaults of a 10-day gap window and the aggregate of all CRSP- followed exchanges are used. Returns calculated with defaults will match CRSP standard return items.
/dt20080530-20080630 /dr 4,15
Price and Returns
--------------------
Caldt
Prc
Ret
Retx
20080530
28.32000
0.000353
0.000353
20080602
27.80000
-0.018362
-0.018362
20080603
27.31000
-0.017626
-0.017626
20080604
27.54000
0.008422
0.008422
20080605
28.30000
0.027596
0.027596
20080606
27.49000
-0.028622
-0.028622
20080609
27.71000
0.008003
0.008003
20080610
27.89000
0.006496
0.006496
20080611
27.12000
-0.027608
-0.027608
20080612
28.24000
0.041298
0.041298
/dx
Weights. Returns security prices, shares, and returns. A parameter for Rights used to apply share factors from rights distributions may be set. The default uses shares outstanding in the CRSP shares history that includes rights distributions.
Price and Shares
--------------------
Caldt
Prc
Shr
Ret
20080530
129.42999
1373479
-0.002159
20080602
127.36000
1373479
-0.015993
20080603
127.84000
1373479
0.003769
20080604
127.55000
1373479
-0.002268
20080605
128.47000
1373479
0.007213
20080606
124.94000
1373479
-0.027477
20080609
125.86000
1373479
0.007364
20080610
125.94000
1373479
0.000636
20080611
123.25000
1373479
-0.021359
/dw
Adjusted weights. Returns security adjusted prices, adjusted shares, and returns. Parameters may be set for the adjustment date and type, gaprule, and rights for Rights. If no parameters are set, defaults are used.
/dw 19981215
Adjusted Price, Shares
--------------------
Caldt
Adjprc
Adjshr
Ret
20080530
258.85999
686740
-0.002159
20080602
254.72000
686740
-0.015993
20080603
255.67999
686740
0.003769
20080604
255.10001
686740
-0.002268
20080605
256.94000
686740
0.007213
20080606
249.88000
686740
-0.027477
20080609
251.72000
686740
0.007364
/ds
Levels. Returns security prices and associated index levels of returns with and without dividends. Basedate and base amounts can be set for index level items. Setting no parameters will utilize defaults. Example: / dt20061220-20070131 /ds 20080103,100.000
/ds 20080605,100
Price and Index Levels
--------------------
Caldt
Prc
TLv1
ALv1
20080530
129.42999
100.75
100.75
20080602
127.36000
99.14
99.14
20080603
127.84000
99.51
99.51
20080604
127.55000
99.28
99.28
20080605
128.47000
100.00
100.00
20080606
124.94000
97.25
97.25
20080609
125.86000
97.97
97.97
20080610
125.94000
98.03
98.03
20080611
123.25000
95.94
95.94
20080612
123.85000
96.40
96.40
20080613
126.15000
98.19
98.19
D. Portfolio Information For One or More Portfolio Types
/dy.#-#
Portfolio assignments and statistics for portfolio type #. Porttype numbers or keysets are used. Notations can be a single number, a range separated by dashes, or a list separated by commas. Porttypes for a security can be identified by using the /hr option.
Keyset 106 - Portfolio Type 6 - NYSE/NYSE American Beta Deciles, Daily
Date
Port
Stat
2008
7
0.74707
Keyset 107 - Portfolio Type 7 - NYSE/NYSE American Standard Deviation Deciles, Daily
Date
Port
Stat
2008
8
0.01559
E. Group Data
/gp.#
Note: 16 - S&P 500 is the only group currently available.
PERMNO
CUSIP
Htick
PERMCO
COMPNO
Issuno
EX
SIC
Begdt
Enddt
DEL
12490
45920010
IBM
20990
0
0
1
3571
19251231
20080630
100
Latest Company Name
INTERNATIONAL BUSINESS MACHS COR
Keyset 316 - S&P 500 Universe
Grpdt
Grpenddt
Grpflag
Subflag
19570301
20080630
1
0
F. Single Time-Series
Time series items can be accessed in stk_print by two methods:
1.
/ml “<mnemonic1>[;<mnemonic2>...]”
For example:
/ml “prc;ret;retx”
Individual items are specified. If only a single item is called by /ml, no quotes are needed. /ml prc or /ml “prc”
will both work. Command line length limits restrict the number of items that can be specified using this method.
2.
/mf itemfile
An input text file is supplied which contains one row per selection, each in <mnemonic>.<keyset> format.
Keyset is optional and is used with portfolios and groups. If not given, an item’s default keyset is assumed. It can take the form of a list (#[,#[-#]]...) or an asterisk.
Both /ml and /mf methods can be used at the same time. The order in which they appear in a request determines the order in the output.
Item names are case-insensitive.
(m)prc - Prices
e.g. Date Prices
19980130
149.18750
19980227
84.75000
19980331
89.50000
19980430
90.12500
(m)ret - Returns
e.g. Date Returns
19980930
0.140954
19981030
0.155642
19981130
0.113434
19981231
0.116578
(m)retx - Returns without dividends
e.g. Date Ret w/o Div
19980930
0.140954
19981030
0.155642
19981130
0.111953
19981231
0.116578
(m)vol - Volumes
e.g. Date Volumes
19980930
95656205
19981030
124145208
19981130
68837401
19981231
71013201
(m)bidlo - Bidlo
e.g. Date Bidlow
19981001
123.37500
19981002
118.93750
19981005
117.31250
19981006
118.75000
(m)askhi - Askhi
e.g. Date Askhigh
19981001
126.43750
19981002
125.25000
19981005
123.75000
19981006
124.00000
(m)bid - Bid
e.g. Date Bids
19981001
104.062500
19981002
104.062500
19981005
101.187500
19981006
97.562500
(m)ask - Ask
e.g. Date Asks
19981001
104.125000
19981002
104.125000
19981005
101.125000
19981006
97.625000
Numtrd - Number of Trades (daily data only)
For NASDAQ only, or for all securities.
e.g. Date Trades
19981001
19861
19981002
20087
19981005
30079
19981006
21620
/po - Alternate Price data (monthly data only)
e.g. Date ALTPRC
20020328
60.31000
20020430
52.26000
20020531
50.91000
20020628
54.70000
(m)shr - Shares
(Shares outstanding are mapped to the calendar of prices)
e.g. Date Shares
19981001
933063
19981002
933063
19981005
933063
19981006
933063
Spread - Spread (monthly only)
Note that spread data are only available when the security has no market trades. If you compare the spread output with prices (/pp), you can see the relationship between them.
e.g. Date SPREAD
20020328
2.18000
20020430
0.00000
20020531
2.47000
20020628
2.07000
G. Date Range Selection
/dt range1[-range2]
Date Ranges can be YYYY, YYYYMM, or YYYYMMDD, in any combination. If only one range is given, and year only or month only is used, the first period of the year or month is used for the beginning of the range and the last period of the year of month is used for the end of the range. Date ranges will be applied to all data selections except header, names, and delistings. If an issue does not trade the entire range, only the intersection of the issue range and the date range will be printed. Date range1 must precede date range2 if both are supplied. Date ranges relate to the event and timeseries data and do not alter the header information.
The output format options /fr and /fs alter the interpretation of date range:
If the default /fr format option is used, names and delists are not restricted by date range, and the first shares observation or distribution event before and after the range, if any, are displayed.
If the /fs format option is used, only names, delists, and distributions events in the range are displayed.
e.g. /dt 199609-199612 = all data from the beginning of September through December of1996
/dt 1990 = all data in the year 1990
/dt 1994-19940615 = all data from the beginning of 1994 until June 15, 1994
/dt 19961231 = data only on the date December31, 1996
H. Input Method
/sq
Reads all issues in database sequentially. Note that the /sq option will extract data from the last PERMNO you referenced. Therefore, if you have an stk_print window open that you have been using, you will want to either go to the first index in the database with the /f option, or exit and restart the application prior to using the /sq option.
e.g. For example, to display name history for all the issues in the monthly database:
/mn /sq
/if filename.inp
Selects data for all identifiers in filename.inp. Any of the options may be selected to run with the input file. This input file should be a text file containing one column of identifiers, beginning in the first character space.
e.g. For example, to display name history for all PERMNOs in an input file in the default directory named perms.inp:
mstkprint /nm /if perms.inp
I. Output Method
/of filename.out
Write data to filename.out instead of to the terminal.
e.g. For example, to save name history of selected securities to the file filename.out in the current working directory:
dstkprint /mn /of filename.out
J. Output Format
/fr
Toggle for 80-character formatted output with headers. This is the most readable when browsing data and supports multiple data items.
e.g. /hh /fr
PERMNO
CUSIP
PERMCO
Compno
Issuno
EXCH
SIC
Name
Dist
Share
Delist
Nasd
12490
45920010
20990
0
0
1
3573
3
154
146
1
0
BegDate/EndDate
HTick
DEL
Latest Company Name
19620702-19981231
IBM
100
INTERNATIONAL BUSINESS MACHS COR
/fs
Toggle for pipe-delimited output, intended for input to another program. The permno is output on each line with this option. The /fs option is most useful when one data item (or multiple /p* data items) is used with sequential or file input, and file output.
The default is the CRSP_DSTK database and daily data. These options are supported only on the command line at the initial program call, and cannot be switched. These commands can be used only with the stk_print command, since databases are automatically set with the dstkprint or mstkprint commands.
/d1 dbdirectory
(Note: 1 = one) Selects an alternate database with a path of dbdirectory. Note that when you use this option if you are using a monthly database, you must also use the /fm option on the command line, when you specify the database location. (See the /fm option below for usage.)
e.g. stk_print /d1 mydirectory
/fm
Indicates that the alternate database is monthly
e.g. stk_print /fm /d1 mymonthdir
L. Key Selection
The default is PERMNO. All input in the input file or at the terminal will be interpreted as this identifier. Sequential access will be in the order of this key. If a key is not unique such as PERMCO, direct access will always find the first security with the identifier. Other securities can be found with the next id (n) option.
The following codes can be used instead of a specified identifier at the command line or in an input file. These access securities by position relative to the current key set with the /ky option. These are input and not options and therefore do not require the forward slash line.
s - same identifier
n - next identifier
p - previous identifier
f - first identifier
l - last identifier
/ky permno
This option may be used to set input key to PERMNO. This is the default if no /ky option is used.
e.g. dstkprint /ky permno (10107)
PERMNO
CUSIP
PERMCO
Compno
Issuno
EXCH
SIC
Name
Dist
Share
Delist
Nasd
10107
59491810
8048
8048
9942
3
7370
1
7
601
637
BegDate/EndDate
HTick
DEL
Latest Company Name
19860313-19981231
MSFT
100
MICROSOFT CORP
/ky permco
This option can be used to set the input key to PERMCO.
e.g. /ky permco (8048)
PERMNO
CUSIP
PERMCO
Compno
Issuno
EXCH
SIC
Name
Dist
Share
Delist
Nasd
10107
59491810
8048
8048
9942
3
7370
1
7
601
637
BegDate/EndDate
HTick
DEL
Latest Company Name
19860313-19981231
MSFT
100
MICROSOFT CORP
/ky cusip
This option can be used to set the input key to the CRSP header CUSIP. Header CUSIPs are unique for each security
e.g. /ky cusip (59491810)
PERMNO
CUSIP
PERMCO
Compno
Issuno
EXCH
SIC
Name
Dist
Share
Delist
Nasd
10107
59491810
8048
8048
9942
3
7370
1
7
601
637
BegDate/EndDate
HTick
DEL
Latest Company Name
19860313-19981231
MSFT
100
MICROSOFT CORP
/ky hcusip
This option can be used to set the input key to CRSP historical CUSIP. Historical CUSIPs are the list of any CUSIPs in the name history plus the header CUSIP if no names exist in the name history. Each security will have one or more historical CUSIPs, and no historical CUSIP will appear in more than one security.
e.g. /ky hcusip (59491810)
PERMNO
CUSIP
PERMCO
Compno
Issuno
EXCH
SIC
Name
Dist
Share
Delist
Nasd
10107
59491810
8048
8048
9942
3
7370
1
7
601
637
BegDate/EndDate
HTick
DEL
Latest Company Name
19860313-19981231
MSFT
100
MICROSOFT CORP
/ky ticker
This option can be used to set the input key to header ticker. This is the latest ticker and is only set for securities active on the last date covered in the database. NYSE/NYSE American securities with non blank share class have a period and the share class appended to the ticker (TICKER.A). Header ticker is unique, but not all securities can be accessed by it.
e.g. /ky ticker (MSFT) - Cap Specific
PERMNO
CUSIP
PERMCO
Compno
Issuno
EXCH
SIC
Name
Dist
Share
Delist
Nasd
10107
59491810
8048
8048
9942
3
7370
1
7
601
637
BegDate/EndDate
HTick
DEL
Latest Company Name
19860313-19981231
MSFT
100
MICROSOFT CORP
/ky siccd
This option can be used to set the input key to CRSP historical SIC code. A security can be accessed by any SIC classification in its history. More than one siccd can be used to access a security, and multiple securities can share the same siccd.
e.g. /ky siccd (7370)...n (until issue of interest is located)
PERMNO
CUSIP
PERMCO
Compno
Issuno
EXCH
SIC
Name
Dist
Share
Delist
Nasd
10107
59491810
8048
8048
9942
3
7370
1
7
601
637
BegDate/EndDate
HTick
DEL
Latest Company Name
19860313-19981231
MSFT
100
MICROSOFT CORP
y.1 or /dy.101 all will get portfolio type 1 (daily keyset 101) and /dy.* will get all portfolios.
Options are preceded with a forward slash. Multiple options can be placed on a single line. A full request string of options can hold up to 2047 characters.
Following is a list of current stk_print options, grouped by option category. 0, -88.0, and 99.0 indicate missing values.
A. Header Information
/hh
Header file issue identification information
Note that header ticker only contains values for active securities.
/hr
Header file issue identifiers with available data date ranges in YYYYMMDD format
/hl
Header identifiers with ranges in terms of calendar day numbers, starting with Dec 31, 1925 as day 1. The /hl option includes all of the options /hr does, with the corresponding CRSP file calendar indexed in Calendar Trading Date, instead of dates in YYYYMMDD format. With the exception of the date presentation, /hl provides the same data as /hr.
/hn
Supplemental header identification information
B. Event Information
/ns
Short name event history information. Every time such activities occur that cause a change to one of the fields included in the names array, a new row is added.
/nm
Names History – includes all items that are populated by any securities. Reserved items available in the
Names-All category are removed.
All of the name fields combined constitute a Name History Record. Therefore, a change to any name field adds a row to the Name History Array. For example, the /nm option does not appear to have any changes between 20010824 and 20021231, but there are two name history rows. Notice that under the /nm option, the NAICS code was added on 20010824 and the Trading Ticker Symbol was added on 20020102.
/an
All – complete names history, all fields available
/da
Adjusted distribution events. Returns distribution codes, adjusted dividend amounts, adjustment factors for prices and shares, declaration-, ex- , record-, and pay-dates. Parameters may be set for adjustment dates, types and gaprules.
If no parameters are set, defaults are used.
/sh
Raw shares observation event histories
/sa
Shares event histories adjusted for distributions
/sj
Adjusted shares events. Returns adjusted shares, dates, and shares flag. Parameters may be set for adjustment dates, types and gaprules. If no parameters are set, defaults are used.
/de
Delisting event histories
/ej
Adjusted delisting events. Returns delisting amounts, dates, codes, prices, returns with and without dividends. Parameters may be set for adjustment dates, types and gaprules. If no parameters are set, defaults are used.
/qi
C. Time-Series Groups
Only one of /dd, /ds, /dr, /dx can be used at a time.
/dd
Trading data including close, ask/high, bid/low, volume, and total return
/dj
Adjusted time series. Returns adjusted time series for prices, ask hi, bid low, volumes and include returns. Adjustment date, type, and gaprules are available parameters. If no parameters are set, defaults defined in the Parameter Types table are used.
/dr
Calculated returns. Returns price, calculated returns with and without dividends. Calculated returns items allow users control for returns based on specified exchange closing prices as well as control over the size of gap windows. If no parameters are set, defaults of a 10-day gap window and the aggregate of all CRSP- followed exchanges are used. Returns calculated with defaults will match CRSP standard return items.
/dx
Weights. Returns security prices, shares, and returns. A parameter for Rights used to apply share factors from rights distributions may be set. The default uses shares outstanding in the CRSP shares history that includes rights distributions.
/dw
Adjusted weights. Returns security adjusted prices, adjusted shares, and returns. Parameters may be set for the adjustment date and type, gaprule, and rights for Rights. If no parameters are set, defaults are used.
/dw 19981215
/ds
Levels. Returns security prices and associated index levels of returns with and without dividends. Basedate and base amounts can be set for index level items. Setting no parameters will utilize defaults. Example: / dt20061220-20070131 /ds 20080103,100.000
D. Portfolio Information For One or More Portfolio Types
/dy.#-#
Portfolio assignments and statistics for portfolio type #. Porttype numbers or keysets are used. Notations can be a single number, a range separated by dashes, or a list separated by commas. Porttypes for a security can be identified by using the /hr option.
E. Group Data
/gp.#
Note: 16 - S&P 500 is the only group currently available.
F. Single Time-Series
Time series items can be accessed in stk_print by two methods:
1.
For example:
Individual items are specified. If only a single item is called by /ml, no quotes are needed. /ml prc or /ml “prc”
will both work. Command line length limits restrict the number of items that can be specified using this method.
2.
An input text file is supplied which contains one row per selection, each in <mnemonic>.<keyset> format.
Keyset is optional and is used with portfolios and groups. If not given, an item’s default keyset is assumed. It can take the form of a list (#[,#[-#]]...) or an asterisk.
Both /ml and /mf methods can be used at the same time. The order in which they appear in a request determines the order in the output.
Item names are case-insensitive.
(m)prc - Prices
(m)ret - Returns
(m)retx - Returns without dividends
(m)vol - Volumes
(m)bidlo - Bidlo
(m)askhi - Askhi
(m)bid - Bid
(m)ask - Ask
Numtrd - Number of Trades (daily data only)
For NASDAQ only, or for all securities.
/po - Alternate Price data (monthly data only)
(m)shr - Shares
(Shares outstanding are mapped to the calendar of prices)
Spread - Spread (monthly only)
Note that spread data are only available when the security has no market trades. If you compare the spread output with prices (/pp), you can see the relationship between them.
G. Date Range Selection
/dt range1[-range2]
Date Ranges can be YYYY, YYYYMM, or YYYYMMDD, in any combination. If only one range is given, and year only or month only is used, the first period of the year or month is used for the beginning of the range and the last period of the year of month is used for the end of the range. Date ranges will be applied to all data selections except header, names, and delistings. If an issue does not trade the entire range, only the intersection of the issue range and the date range will be printed. Date range1 must precede date range2 if both are supplied. Date ranges relate to the event and timeseries data and do not alter the header information.
The output format options /fr and /fs alter the interpretation of date range:
H. Input Method
/sq
Reads all issues in database sequentially. Note that the /sq option will extract data from the last PERMNO you referenced. Therefore, if you have an stk_print window open that you have been using, you will want to either go to the first index in the database with the /f option, or exit and restart the application prior to using the /sq option.
e.g. For example, to display name history for all the issues in the monthly database:
/if filename.inp
Selects data for all identifiers in filename.inp. Any of the options may be selected to run with the input file. This input file should be a text file containing one column of identifiers, beginning in the first character space.
e.g. For example, to display name history for all PERMNOs in an input file in the default directory named perms.inp:
I. Output Method
/of filename.out
Write data to filename.out instead of to the terminal.
e.g. For example, to save name history of selected securities to the file filename.out in the current working directory:
J. Output Format
/fr
Toggle for 80-character formatted output with headers. This is the most readable when browsing data and supports multiple data items.
/fs
Toggle for pipe-delimited output, intended for input to another program. The permno is output on each line with this option. The /fs option is most useful when one data item (or multiple /p* data items) is used with sequential or file input, and file output.
K. Database Selection
The default is the CRSP_DSTK database and daily data. These options are supported only on the command line at the initial program call, and cannot be switched. These commands can be used only with the stk_print command, since databases are automatically set with the dstkprint or mstkprint commands.
/d1 dbdirectory
(Note: 1 = one) Selects an alternate database with a path of dbdirectory. Note that when you use this option if you are using a monthly database, you must also use the /fm option on the command line, when you specify the database location. (See the /fm option below for usage.)
/fm
Indicates that the alternate database is monthly
L. Key Selection
The default is PERMNO. All input in the input file or at the terminal will be interpreted as this identifier. Sequential access will be in the order of this key. If a key is not unique such as PERMCO, direct access will always find the first security with the identifier. Other securities can be found with the next id (n) option.
The following codes can be used instead of a specified identifier at the command line or in an input file. These access securities by position relative to the current key set with the /ky option. These are input and not options and therefore do not require the forward slash line.
s - same identifier
n - next identifier
p - previous identifier
f - first identifier
l - last identifier
/ky permno
This option may be used to set input key to PERMNO. This is the default if no /ky option is used.
/ky permco
This option can be used to set the input key to PERMCO.
/ky cusip
This option can be used to set the input key to the CRSP header CUSIP. Header CUSIPs are unique for each security
/ky hcusip
This option can be used to set the input key to CRSP historical CUSIP. Historical CUSIPs are the list of any CUSIPs in the name history plus the header CUSIP if no names exist in the name history. Each security will have one or more historical CUSIPs, and no historical CUSIP will appear in more than one security.
/ky ticker
This option can be used to set the input key to header ticker. This is the latest ticker and is only set for securities active on the last date covered in the database. NYSE/NYSE American securities with non blank share class have a period and the share class appended to the ticker (TICKER.A). Header ticker is unique, but not all securities can be accessed by it.
/ky siccd
This option can be used to set the input key to CRSP historical SIC code. A security can be accessed by any SIC classification in its history. More than one siccd can be used to access a security, and multiple securities can share the same siccd.
y.1 or /dy.101 all will get portfolio type 1 (daily keyset 101) and /dy.* will get all portfolios.