52
ts_print IN A FEW EASY STEPS

ts_print IN A FEW EASY STEPS

  • Upload
    koto

  • View
    41

  • Download
    0

Embed Size (px)

DESCRIPTION

ts_print IN A FEW EASY STEPS. ts_print : TIME SERIES REPORT WRITER. 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 - PowerPoint PPT Presentation

Citation preview

Page 1: ts_print IN A FEW EASY STEPS

ts_print IN A FEW EASY STEPS

Page 2: 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_printts_print: TIME SERIES REPORT WRITER: TIME SERIES REPORT WRITER

Page 3: 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 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_printts_print: TIME SERIES REPORT WRITER: TIME SERIES REPORT WRITER

Page 4: 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

The ts_print interface contains four screens:

ts_printts_print INTERFACE INTERFACE

Entities

Data Items

Date

Report Format and Options

Page 5: 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

Display options added for each tab

File-specific function buttons

Each ts_print tab is divided into the following sections:

ts_printts_print INTERFACE INTERFACE

Screen-specific function buttons

Screen options

Page 6: 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

The Entities Tab is used to select the security, index or portfolio for which you wish to extract data.

ts_printts_print INTERFACE - Entities Tab INTERFACE - Entities Tab

Individual securities or indices

An input file of securities or indices

An input portfolio file

A portfolio using all available securities

Page 7: 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

Select items from the Data Item Tab. Use the Find and Add Item buttons to select and add items one at a time.

ts_printts_print INTERFACE - Data Items Tab INTERFACE - Data Items Tab

Select individual or groups of items.

Page 8: 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

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_printts_print INTERFACE - Date Tab INTERFACE - Date Tab

Page 9: 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

Design the layout of your report with the Report Format and Options Tab.

ts_printts_print INTERFACE - Report Format and Options Tab 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.

Page 10: 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

Example 1:

ts_printts_print INTERFACE - Find Entities INTERFACE - Find Entities

How to Extract Prices, Volumes & Returns for a Security for a Date Range

Page 11: 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

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_printts_print INTERFACE - Find Entities INTERFACE - Find Entities

Page 12: 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

We start by finding the PERMNO for Intel Corp. Under the Entities Tab, click on the Find button.

ts_printts_print INTERFACE - Find Entities INTERFACE - Find Entities

Page 13: 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

…and search the Company Name, PERMNO, Ticker Symbols, or CUSIP by clicking on the Locate button.

ts_printts_print INTERFACE - Find Entities INTERFACE - Find Entities

Select desired search criteria.

Page 14: 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

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_printts_print INTERFACE - Find Entities INTERFACE - Find Entities

Page 15: 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

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_printts_print INTERFACE - Find Entities INTERFACE - Find Entities

Page 16: 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

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 SelectionPRICES, VOLUMES & RETURNS - Data Item Selection

Click on Add Item (F1).

Page 17: 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

Select Monthly, Volume, Volume Total, then click the Add Item (F1) button.

PRICES, VOLUMES & RETURNS - Data Item SelectionPRICES, VOLUMES & RETURNS - Data Item Selection

Page 18: 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

Select Monthly, Returns, Returns, then click the Add item (F1) button.

PRICES, VOLUMES & RETURNS - Data Item SelectionPRICES, VOLUMES & RETURNS - Data Item Selection

Page 19: 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

You have selected Prices, Volumes and Returns for Intel.

PRICES, VOLUMES & RETURNS - Data Item SelectionPRICES, VOLUMES & RETURNS - Data Item Selection

Click on the Date tab.

Page 20: 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

In the Date Tab, select an Annual Calendar Name, a MMDDYYY Calendar Format and enter 1994-2004 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 SelectionPRICES, VOLUMES & RETURNS - Date Selection

3

1

2

Page 21: 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

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 FormatPRICES, VOLUMES & RETURNS - Report Format

1

2

3

Page 22: 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

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 - ReportPRICES, VOLUMES & RETURNS - Report

Select PROCESS SCREEN DATA.

Page 23: 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

When Processing is complete, click on the OK button.

PRICES, VOLUMES & RETURNS - ReportPRICES, VOLUMES & RETURNS - Report

Page 24: 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

To view your output file, click on VIEW FILE (F9) at the bottom right of the screen.

PRICES, VOLUMES & RETURNS - ReportPRICES, VOLUMES & RETURNS - Report

Page 25: 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

The results are saved as a text file in C:\crsp\work\prc_vol_ret.txt.

PRICES, VOLUMES & RETURNS - Report OutputPRICES, VOLUMES & RETURNS - Report Output

Page 26: 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_printts_print INTERFACE - Stock Splits 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.

Page 27: 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

splits.inp contains the following PERMNOs and Declaration Dates used in this example.

10107 2003011622592 2003081186356 2003072492655 2003050877605 2003072945241 2002121766325 2003051575828 2003102364565 2003102377768 2003102975607 20031022

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.inpSTOCK SPLITS - Splits.inp

Page 28: 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

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 -STOCK SPLITS - ts_print ts_print Input FileInput 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.

Page 29: 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

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 -STOCK SPLITS - Data ItemsData Items

Click on Add Item (F1).

Page 30: 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

Next use the Find option to select and add Daily Date.

STOCK SPLITS -STOCK SPLITS - Data ItemsData Items

Use the Find option to select Daily -> Others -> Date.

Click on Add Item (F1).

Page 31: 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

Next use the Find option to select and add Daily Adjusted Prices.

STOCK SPLITS -STOCK SPLITS - Data ItemsData Items

Use the Find option to select Daily -> Prices -> Price Adjusted, End of Period.

Click on Add Item (F1).

Page 32: 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

Next use the Find option to select and add Daily Adjusted Shares.

STOCK SPLITS -STOCK SPLITS - Data ItemsData Items

Use the Find option to select Daily -> Shares -> Shares Outstanding Adjusted.

Click on Add Item (F1).

Page 33: 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

Next use the Find option to select and add Daily Total Returns.

STOCK SPLITS -STOCK SPLITS - Data ItemsData Items

Use the Find option to select Daily -> Returns -> Returns.

Click on Add item (F1) and proceed to the Date tab.

Page 34: 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

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 -STOCK SPLITS - Date OptionsDate 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.

Page 35: 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

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 -STOCK SPLITS - Report FormatReport Format

Click on the Add Options (F1) button.

Page 36: 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

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 -STOCK SPLITS - Save & Process FileSave & Process File

Select PROCESS SCREEN DATA.

Page 37: 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

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 -STOCK SPLITS - View FileView File

Page 38: 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

Adjusted Prices, Shares & Returns

STOCK SPLITS -STOCK SPLITS - Output FileOutput File

Page 39: 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

Example 3:

How to Create a Small User-Defined Value-Weighted Portfolio

ts_printts_print INTERFACE - Portfolio INTERFACE - Portfolio

Page 40: 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

This example will show you how to create a user-specified value-weighted portfolio.

Select the Portfolio File option.

ts_printts_print: Portfolio Entity Options: Portfolio Entity Options

Page 41: 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

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_printts_print: Portfolio Entity Options: Portfolio Entity Options

Page 42: 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

For this example, we have created an input file, tsport.txt. Identifier is CUSIP. Portfolio Id’s are 0 -1.

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.

59491810 037044210 145920010 181238710 156584910 049337W10 037044283 146582310 102000210 028566110 077390310 004335310 020714210 125179M10 0

ts_printts_print: Portfolio Entity Options: Portfolio Entity Options

Page 43: 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

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_printts_print: Portfolio Entity Options: Portfolio Entity Options

Page 44: 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

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_printts_print: Portfolio Data Items: 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.

Page 45: 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

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_printts_print: Portfolio Data Items: Portfolio Data Items

Page 46: 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

Change the Calendar Name to monthly, the Calendar Format to MM/DD/YY, and set the fixed date range to 200401-200403 for the first calendar quarter of 2004.

ts_printts_print: Portfolio Date Options: Portfolio Date Options

Click on Add Date Specification.

Proceed to Report Format and Options.

Page 47: 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

3. Add the Output File Name with the full path and click on Add Options (F1).

ts_printts_print: Portfolio Report Format: Portfolio Report Format

zz

1. Use the default axis settings. 2. Set the

NOFILL option to Yes.

Page 48: 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

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_printts_print: Run the Portfolio Report: Run the Portfolio Report

Page 49: 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

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_printts_print: The Portfolio Report: The Portfolio Report

Page 50: 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

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_printts_print: Summary: Summary

Page 51: 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

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_printts_print: Summary: Summary

Page 52: 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

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: www.crsp.chicagogsb.edu/support/documentation/database_guidesUtility Manual: www.crsp.chicagogsb.edu/support/documentation/tutorials

User Support : [email protected] Subscriptions: Subscriptions@crsp. ChicagoGSB.edu

Phone: 312.263.6400

ts_printts_print: Summary: Summary