ts_print IN A FEW EASY STEPS
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H ts_print is CRSP’s flexible report writer. With ts_print you can: Research securities, indexes and portfolios Customize data requests for all securities, indices and for your own portfolios View reports or Save output to a file Apply flexible date options around ranges or specific event dates Control the format of your output ts_print: TIME SERIES REPORT WRITER
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H ts_print works with the CRSPAccess databases: CRSP US Daily Stock Data CRSP US Monthly Stock Data CRSP US Indices Data The CRSP/Compustat Merged Database (CCM) ts_print: TIME SERIES REPORT WRITER
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H The ts_print interface contains four screens: ts_print INTERFACE Entities Data Items Date Report Format and Options
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Display options added for each tab File-specific function buttons Each ts_print tab is divided into the following sections: ts_print INTERFACE Screen-specific function buttons Screen options
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H The Entities Tab is used to select the security, index or portfolio for which you wish to extract data. ts_print INTERFACE - Entities Tab Individual securities or indices An input file of securities or indices An input portfolio file A portfolio using all available securities
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Select items from the Data Item Tab. Use the Find and Add Item buttons to select and add items one at a time. ts_print INTERFACE - Data Items Tab Select individual or groups of items.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Report on a daily, weekly, monthly, quarterly or annual frequency, with either fixed date ranges or a date range relative to an event date, if entered, under the Entities tab. ts_print INTERFACE - Date Tab
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Design the layout of your report with the Report Format and Options Tab. ts_print INTERFACE - Report Format and Options Tab Add report format specifications using the Add Options (F1) button. Assign Entities, Data Items and Date options to axes. You can choose to include headers, and add field and row delimiters. Output File Name is a required field.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Example 1: ts_print INTERFACE - Find Entities How to Extract Prices, Volumes & Returns for a Security for a Date Range
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H In this example, we extract Prices, Volumes and Returns for Intel, between 1994 and 2004, reported on an annual basis. Prices, Volumes & Returns Entity Selection ts_print INTERFACE - Find Entities
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H We start by finding the PERMNO for Intel Corp. Under the Entities Tab, click on the Find button. ts_print INTERFACE - Find Entities
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H …and search the Company Name, PERMNO, Ticker Symbols, or CUSIP by clicking on the Locate button. ts_print INTERFACE - Find Entities Select desired search criteria.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Search results return to the Locate PERMNO window. Double click on the row that contains the issue or index you are interested in to return to the Entities window. ts_print INTERFACE - Find Entities
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Back in the Entities window, see that the PERMNO for Intel has populated the text box next to the Find button. Click on the Add Entity (F1) button to enter. ts_print INTERFACE - Find Entities
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Click on the Data Items tab. Begin adding items by clicking on Find to bring up the item list tree. Select Daily, Prices, End of Period. PRICES, VOLUMES & RETURNS - Data Item Selection Click on Add Item (F1).
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Select Monthly, Volume, Volume Total, then click the Add Item (F1) button. PRICES, VOLUMES & RETURNS - Data Item Selection
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Select Monthly, Returns, Returns, then click the Add item (F1) button. PRICES, VOLUMES & RETURNS - Data Item Selection
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H You have selected Prices, Volumes and Returns for Intel. PRICES, VOLUMES & RETURNS - Data Item Selection Click on the Date tab.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H In the Date Tab, select an Annual Calendar Name, a MMDDYYY Calendar Format and enter as the Fixed Date Range [1]. Click the Add Date Specification (F1) button [2]. Click on the Report Format & Options tab [3]. PRICES, VOLUMES & RETURNS - Date Selection 3 1 2
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Use the default axis assignments, with headers [1]. Save the output file as C:\crsp\work\prc_vol_ret.out [2]. Click the Add Options (F1) button [3]. PRICES, VOLUMES & RETURNS - Report Format 1 2 3
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Once all four tabs are completed, the request file can be saved and processed. If you wish to save the request file, Click on the SAVE FILE (F5) button at the bottom left of the window. Save the file to c:\crsp\work\filename.rqt. Click on the PROCESS FILE (F7) button. PRICES, VOLUMES & RETURNS - Report Select PROCESS SCREEN DATA.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H When Processing is complete, click on the OK button. PRICES, VOLUMES & RETURNS - Report
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H To view your output file, click on VIEW FILE (F9) at the bottom right of the screen. PRICES, VOLUMES & RETURNS - Report
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H The results are saved as a text file in C:\crsp\work\prc_vol_ret.txt. PRICES, VOLUMES & RETURNS - Report Output
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H ts_print INTERFACE - Stock Splits Example 2: How to Extract Adjusted Prices, Adjusted Shares and Total Returns using a Relative Date Range for Known Stock Splits in 2003 In this section you will also learn how to use an Entity input file with a relative date, and how to add a field delimiter in your output file.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H splits.inp contains the following PERMNOs and Declaration Dates used in this example Data Input File Create your own sample file using a text editor, or you may copy the splts.inp file from the tutorial folder on your CD into your c:\crsp\work folder. STOCK SPLITS - Splits.inp
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H We start this example by selecting the entity settings. In this example, we want to setup the Entity screen as follows: 3. Under the Select Input Field click on PERMNO first, followed by Date 1. This will add PERMNO next to Field#1 under the Input Field Order section, on the right side of the screen and Date 1 next to Field #2. STOCK SPLITS - ts_print Input File 1. Select List – File. 2. Use Browse to select the input file. As the input file is space delimited, select Delimited and put an s (space) in the text box next to it. 4. Click on the Add Entity (F1) button and proceed to the Data Items tab.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H In the Data Items tab, use the Find option to select and add Daily PERMNO. Use the Find option to select Daily -> Identification -> PERMNO/INDNO. STOCK SPLITS - Data Items Click on Add Item (F1).
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Next use the Find option to select and add Daily Date. STOCK SPLITS - Data Items Use the Find option to select Daily -> Others -> Date. Click on Add Item (F1).
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Next use the Find option to select and add Daily Adjusted Prices. STOCK SPLITS - Data Items Use the Find option to select Daily -> Prices -> Price Adjusted, End of Period. Click on Add Item (F1).
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Next use the Find option to select and add Daily Adjusted Shares. STOCK SPLITS - Data Items Use the Find option to select Daily -> Shares -> Shares Outstanding Adjusted. Click on Add Item (F1).
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Next use the Find option to select and add Daily Total Returns. STOCK SPLITS - Data Items Use the Find option to select Daily -> Returns -> Returns. Click on Add item (F1) and proceed to the Date tab.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H In the Date Tab window, you will select the relative date range option. This option corresponds to the declaration dates included in the splits.inp Entity input file. STOCK SPLITS - Date Options We will use the default Calendar Name and the default Calendar Format, but change the default Relative Date Range to –3,2, which will output data three trading days prior to the event date through two days after. Click on the Add Date Specifications (F1) button, and proceed to the Report Format and Options tab.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H In this report, we will use the default axis assignments of X-Item, Y-Date and Z-Entity flag 1, but we will say No to headers. Enter the full path and file name, with no spaces, in the text box under Output File Name. Insert a pipe (|) character in the Field Delimiter box. STOCK SPLITS - Report Format Click on the Add Options (F1) button.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Save your ts_print request file, and then process it. The request file contains all of the output specifications you selected. If you wish to save the request file, click on the SAVE FILE (F5) button at the bottom left of the window. Save the file to c:\crsp\work\ filename.rqt. Click on the PROCESS FILE (F7) button. STOCK SPLITS - Save & Process File Select PROCESS SCREEN DATA.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Click on VIEW FILE (F9) to view your results. Note that View is Read Only, and only relatively small datasets can be read. STOCK SPLITS - View File
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Adjusted Prices, Shares & Returns STOCK SPLITS - Output File
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Example 3: How to Create a Small User-Defined Value-Weighted Portfolio ts_print INTERFACE - Portfolio
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H This example will show you how to create a user-specified value-weighted portfolio. Select the Portfolio File option. ts_print: Portfolio Entity Options
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H A portfolio input file is a user-specified value-weighted portfolio. File format is: Identifier[space]Portfolio Id The identifier can be a PERMNO, PERMCO, CUSIP, Historical CUSIP, Ticker Symbol, or SIC Code. Portfolio Ids are numbered 0-29 for a maximum of 30. ts_print: Portfolio Entity Options
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H For this example, we have created an input file, tsport.txt. Identifier is CUSIP. Portfolio Id’s are Refer to the tutorial and tutorial folder on the sample CD-ROM for a copy of the input files. Or create your own using Notepad. Copy the tsport.txt into c:\crsp\work W M10 0 ts_print: Portfolio Entity Options
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Use the Input Fields to specify the key, CUSIP followed by the Portfolio Id. Under the BegPos EndPos section, enter 1,8 next to CUSIP and 10,10 next to Portfolio ID. This points to the positions of CUSIP and ID in the input file. Options are available for weighting portfolios. Select Value Weight. Click on Add Entity (F1) and proceed to the Data Items tab. Use the Browse button in the Portfolio Data File section to select the portfolio input file, tsport.txt. Select the Formatted radio button below the Portfolio Data File selection. ts_print: Portfolio Entity Options
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Portfolio Items: Index count total (cnt/mcnt) Index count used (cntprev/mcntprev) Total returns (ret/mret) Weight (weight/mweight) Note : Refer to the ts_print data item tables, section 2.4 of the Utilities Guide, to identify which data items can be used with which entity type. ts_print: Portfolio Data Items There are three entity types, list, index and port. List items are available for use with securities. Index items are available with indices. Port items can be used with portfolios.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Enter the itemid of the data item you wish to add in the Select Data Item text box. Press Find. In the pop-up window, double click on your selection, then click on Add Item (F1). Repeat this process for each data item you enter. For this example enter mcnt and select Index Count Total ( mcnt ), mret and mweight. ts_print: Portfolio Data Items
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Change the Calendar Name to monthly, the Calendar Format to MM/DD/YY, and set the fixed date range to for the first calendar quarter of ts_print: Portfolio Date Options Click on Add Date Specification. Proceed to Report Format and Options.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H 3. Add the Output File Name with the full path and click on Add Options (F1). ts_print: Portfolio Report Format z 1. Use the default axis settings. 2. Set the NOFILL option to Yes.
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H If you wish to save your request file, click on SAVE FILE (F5). We recommend saving the file, tsport.rqt in the request file directory, c:\crsp\work. To run your report, click on PROCESS FILE (F7) and select the Process Screen Data option. You will not be able to use the ts_print interface until the report is generated. Click on the OK button once process is complete. ts_print : Run the Portfolio Report
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H To view your report, click on VIEW REPORT (F9). The report is saved as a text file and can be used in any applications that read text files. ts_print: The Portfolio Report
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H In this presentation, you have learned how the ts_print interface is used. You have developed the following skills: How to navigate ts_print How to create, run, and save request files How to view your output files We examined each of the 4 ts_print tabs: Entities Data Items Date Report Format and Options ts_print: Summary
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Working through three examples, we employed options in each of the 4 tabs to generate output for: Various entities – single securities, input files and portfolios Different data items- daily and monthly, individual and aggregated for portfolios Different date ranges – specific and relative ranges ts_print: Summary
C L E A N, Q U A L I T Y D A T A F O R E X C E L L E N C E I N R E S E A R C H Congratulations! You have successfully completed the ts_print interface presentation! Please refer to our tutorials and Utility Guide or contact User Support for additional information on accessing CRSP data. Tutorials: Utility Manual: User Support : Subscriptions: ChicagoGSB.edu Phone: ts_print: Summary