Using the SASECRSP Interface Engine - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Using the SASECRSP Interface Engine

Description:

Title: Using the SASECRSP Interface Engine Author: Nicole Szymanski Last modified by: CRSP Created Date: 9/22/2004 9:58:08 PM Document presentation format – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 34
Provided by: Nicole254
Category:

less

Transcript and Presenter's Notes

Title: Using the SASECRSP Interface Engine


1
Using the SASECRSP Interface Engine
2
ABOUT CRSP
CRSP was founded in 1960 by the Graduate School
of Business at the University of Chicago with the
mission to accurately measure NYSE common stock
returns between 1926 and 1960. Utilizing PERMNO
and PERMCO, unique and permanent identifiers for
securities, CRSP creates, updates and maintains
premier databases of historical US stock,
treasury, REIT and mutual fund data. CRSP
subscribers include academic institutions,
corporations, government and regulatory bodies
and exchanges.
3
The SASECRSP Interface Engine
ABOUT CRSP
CRSP Standard Subscription Databases Use
SASECRSP Engine for access CRSP US Stock
Indices daily and monthly databases
CRSP/Compustat Merged Database Available as
ASCII and native SAS data files CRSP
Survivor-Bias-Free US Mutual Fund Database
CRSP US Treasury Databases CRSP/Ziman Real
Estate Data Series
4
The SASECRSP Interface Engine
GETTING STARTED
  • Use of the SASECRSP engine requires the
    following
  • CRSPAccess 2.85 or higher. Version 2.91 or
    higher is highly recommended in order to take
    full advantage of all available features.
  • CRSP US Stock, Stock Indices databases or
    CRSP/Compustat Merged Database
  • SAS Version 9.1.3 (Service Pack 3)
  • Examples assume a Windows environment. Common
    functionality also exists in Linux and Sun
    Solaris environments.

5
The SASECRSP Interface Engine
GETTING STARTED
The environment variable CRSPDB_SASCAL must be
set in order to use the SASECRSP engine. In
version 2.91 and higher, this is done
automatically when installing CRSP databases or
by changing database locations using the CRSP
Client Environment utility that is listed as an
option on the CRSPAccess Menu.
6
The SASECRSP Interface Engine
GETTING STARTED
To insure that CRSPDB_SASCAL is set, check in
one of two ways
1.
From a command prompt, type gtC\ set
crsp ltentergt CRSPDB_SASCALc\crs
pdata\diz200503\ CRSP_BINc\cmgs290\accbin\ CRSP_
CSTc\crspdata\cpz200503\ CRSP_DSTKc\crspdata\d
iz200503\ CRSP_ENV_ELOGc\CRSP\work\ CRSP_ENV_ROO
Tc\crspdata\diz200503\
7
The SASECRSP Interface Engine
GETTING STARTED
From the Start Menu, type
Control Panel System Advanced
Environment Variables
8
The SASECRSP Interface Engine
Data Access
Consistent with typical SAS access, a libname
statement is used to identify the engine and the
location of the data libname mstk sasecrsp
c\crspdata\miz200503\ where sasecrsp is the
engine name. Note that the physical location
of the data is followed by a \ which does
differ from standard SAS access. In the next
version of the engine, this trailing \ will no
longer be required.
9
The SASECRSP Interface Engine
DATA ACCESS SETID
setid statements identify what type of CRSP data
is being accessed libname mstk sasecrsp
c\crspdata\miz200503\ setid20 setid options
include 10 CRSP Daily Stock data 20 CRSP
Monthly Stock data 200 CRSP/Compustat Merged
data 400 CRSP Monthly Index groups 420 CRSP
Monthly Index series 440 CRSP Daily Index
groups 460 CRSP Daily Index series
10
The SASECRSP Interface Engine
DATA ACCESS KEYS Users may choose to use the
SASECRSP engine for the flexibility it offers in
accessing data. Choices include the following
keys PERMNO CRSPs unique permanent issue
identification number and the primary key for
CRSP Stock databases PERMCO CRSPs unique
permanent company identification number CUSIP
Current CUSIP number HCUSIP Historical
CUSIPs SICCD Historical Standard Industrial
Classification (SIC) Code TICKER Ticker symbol
for active companies only GVKEY Compustats
unique identifier and primary key available to
CCM subscribers
11
The SASECRSP Interface Engine
DATA ACCESS KEYS
Multiple access keys may be used in a single
statement libname mstk sasecrsp
c\crspdata\miz200503\ setid20 tickerIBM
hcusip20417110
12
The SASECRSP Interface Engine
DATA ACCESS KEYS
Example 1 Access CRSP by Ticker and by
Historical CUSIP
libname mstk sasecrsp c\crspdata\miz200503\ s
etid20 tickerIBM hcusip20417110 range2
0040101-20041231
NOTE Ticker IBM has permno 12490. HCUSIP
20417110 has permno 25989.
13
The SASECRSP Interface Engine
DATA ACCESS KEYS
Users may create inset datasets and access data
with any of the multiple key options within the
inset. The following table utilizes CUSIPs and
date ranges unique to each CUSIP represented.
cusip'45920010'date119950304date219950704out
put cusip'15102010'date119981105date219990
305output cusip'90969M10'date120010522date2
20010922output cusip'95810210'date11999121
5date220000415output cusip'00282410'date1
20020611date220021011output
cusip'62474G10'date120000209date220000609out
put Note that CUSIPs are character fields so
require the quotation marks around them.
14
DATA ACCESS KEYS
Example 2 Access CRSP by CUSIP and Inset
  • data in
  • cusip'45920010'date119950304date219950704o
    utput
  • cusip'15102010'date119981105date219990305o
    utput
  • cusip'90969M10'date120010522date220010922ou
    tput
  • cusip'95810210'date119991215date220000415o
    utput
  • cusip'00282410'date120020611date220021011o
    utput
  • cusip'62474G10'date120000209date220000609o
    utput
  • run
  • libname mstk sasecrsp c\crspdata\miz200503\
  • setid20
  • inset'in,cusip,cusip,date1,date2'
  • run

Access data using insets containing multiple key
options Example 2 Access CRSP by CUSIP and
Inset
15
CCM CRSP/COMPUSTAT MERGED DATABASE
  • CRSP subscribers who also subscribe to the
    CRSP/Compustat Merged database (CCM) may access
    Compustat data through the SASECRSP engine. This
    enables users to combine CRSP market data with
    Compustat fundamental data to provide a complete
    uninterrupted series of data for use in quality
    research, testing and production.

16
CCM CRSP/COMPUSTAT MERGED DATABASE
Elements of the CRSP/Compustat Merged database
include the following
  • Fundamental Annual and Quarterly Data
  • Combined with CRSP market data for over 1,000
    raw and derived items
  • Universe
  • Utilizing the CRSPLink, roughly 22,000
    companies match Compustat GVKEYs with CRSP
    PERMNOs to create complete data series
  • Provides access to Compustat data through CRSPs
    PERMNO, PERMCO
  • Provides access to CRSP stock data through
    Compustats GVKEY

17
ACCESS VIA CRSPLINK

Accessing data in a CRSP database using GVKEY
with a crsplinkpath statement will return the
same data as if it were accessed in the CRSP
database using PERMNO, ticker, cusip or siccd.
18
ACCESS VIA CRSPLINK
Example 3 Access same CRSP data by different keys
libname mstkgv sasecrsp c\crspdata\miz200503\
setid20 crsplinkpathc\crspdata\ccz200503\ g
vkey5073 range19950101-20041231
libname mstkperm sasecrsp c\crspdata\miz200503\
setid20 permno12079 range19950101-20041231


19
ACCESS VIA CRSPLINK
Likewise, accessing data in the CRSP/Compustat
Merged database using PERMNO, ticker, cusip or
siccd will return the same data as if it were
accessed using GVKEY. To access the
CRSP/Compustat Merged database, change
setid200 Note that when accessing data in the
CRSP/Compustat Merged database, the crsplinkpath
statement is not necessary for it is implicit
within the database itself.

20
ACCESS VIA CRSPLINK
Example 4 Access same CCM data by different keys
libname ccmgv sasecrsp c\crspdata\ccz200503\ s
etid200 gvkey5074 range19950101-20041231
libname ccmperm sasecrsp c\crspdata\ccz200503\
setid200 permno66931 range19950101-20041231


21
INDEX DATA
The SASECRSP engine allows users to access CRSP
indices data using INDNO, which is CRSPs unique
identifier for indices. Index data available
includes Daily and monthly index data
series Daily and monthly index group data
22
INDEX DATA ACCESS
Index data may be accessed in the same manner as
individual security data. Modifications to the
libname statement include a different range of
setids and key access is limited to INDNO only.
  • Setid options include
  • CRSP Daily Stock data
  • CRSP Monthly Stock data
  • CRSP/Compustat Merged data
  • CRSP Monthly Index groups
  • CRSP Monthly Index series
  • CRSP Daily Index groups
  • 460 CRSP Daily Index series

23
INDEX DATA ACCESS
Example 5 Access index data series using
setid420
libname indlib sasecrsp c\crspdata\miz200503\'
setid420 indno1000000 indno1000001 ra
nge'20041231-20050228'
24
INDEX DATA ACCESS
Example 6 Access index groups using setid400
libname indgrp sasecrsp c\crspdata\miz200502\'
setid400 indno1000012 range'20041231-20
050228'
25
Putting it all together by Example
In the following program, we look at the
performance of both Value and Growth stocks in
reaction to split announcements. This program
serves as a comprehensive example combining SAS,
CRSP stock and index data, and Compustat
fundamental data to demonstrate the power and
flexibility that such a combination presents to
our subscribers. We make a basic assumption
that users have a working knowledge of SAS
basics, so explanations of SAS commands and
functions are not included.
26
Example 7 Value and growth stocks reaction to
split announcements
1. Identify the Events and Extract Returns
/Create a libname pointing to the daily CRSP
database/ libname dstk sasecrsp
c\crspdata\diz200502\' setid10 range'2000010
1-20041001' /Select any security that
announced a stock split in the period between
12/01/2000 and 9/15/2004 -- the last
event per security/ data split(dropdistcd) set
dstk.dists(keeppermno distcd dclrdt) by
permno if last.permno where distcd5523
and '01Dec2000'dltdclrdtlt'15Sep2004'd

datecrspdscd(dclrdt,1) /create date
in crspdate format/ /Partition into estimated
and event period and add daily returns/ data
splitest splitevtmerge split(ingood)
dstk.ret by permno if good1 if
date-200ltcaldtltdate-11 then output
splitest if caldtdate then output
splitevt run
27
Example 7 Value and growth stocks reaction to
split announcements
2. Merge the market returns to be used in
regression
/keep only stocks trading 190 trading days
before event/ proc sqlcreate table x as select
permno,count(permno) from splitest group by
permno having count(permno)190 create table
splitest as select a. from splitest a, x b
where a.permnob.permno create table
splitevt as select a. from splitevt a, x b
where a.permnob.permno quit /
Create a libname pointing to the daily CRSP
indices database restrict to one index/
libname dind SASECRSP c\crspdata\diz200502\'
setid460 indno1000080
range'20000101-20041001' /Extract the market
returns and merge with the rest of the data/
proc sql create table splitest as select a.,
b.tret from splitest a, dind.tret b where
a.caldtb.caldt create table splitevt as select
a., b.tret from splitevt a, dind.tret
b where a.caldtb.caldt quit
28
Example 7 Value and growth stocks reaction to
split announcements
3. Compute abnormal returns
/Compute alpha and beta in estimation
period/ proc sort datasplitestby permno
caldt proc reg datasplitest
outestestparam (rename(interceptalpha
tretbeta) keeppermno intercept tret) noprint
by permno model rettret run /Comp
ute abnormal returns of individual stocks/ proc
sort datasplitevtby permno caldt data
splitevtmerge splitevt estparam by
permno abnretret-alpha-betatret run
/Compute abnormal returns of portfolio and test
the statistical significance of the
results/ proc means datasplitevt n mean
t var abnret run / n724 mean0.008243
t5.53 /
29
Example 7 Value and growth stocks reaction to
split announcements
4. Retrieve the book value by using CCM and the
CRSPlink
/Create a libname pointing to CCM/ libname
ccmsplit sasecrsp c\crspdata\ccz200503\' setid
200 inset'splitevt,permno,permno' /Relate
Permno and GVKEY/ proc sql create table
splitevt as select a.permno,a.dclrdt,a.date,a.abnr
et,b.gvkey from splitevt a, ccmsplit.link
b where a.permnob.npermno and
b.linkdtlta.dclrdtltb.linkendt quit /Retrie
ve the book value/ proc sort dataccmsplit.iaitem
s outia60(keepgvkey caldt ia60) by gvkey
caldt proc sort datasplitevt by
gvkey data evtbook(dropcaldt)merge splitevt
ia60 by gvkey if year(dclrdt)year(crspdcs
a(caldt))1 run
30
Example 7 Value and growth stocks reaction to
split announcements
5. Create book/market portfolios and test the
results.
  • /Calculate book to market ratio for each stock/
  • proc sqlcreate table gv
  • as select a., a.ia60/(abs(b.prc)c.shrou
    t) as gv
  • from evtbook a, dstk.prc b,
    dstk.shares c
  • where a.permnob.permno and
  • a.permnoc.permno and
  • a.dateb.caldt and
  • c.shrsdtlta.dclrdtltc.shrenddt
  • quit
  • /Identify the growth and value stocks/
  • proc rank datagv outgvrank groups3
  • ranks rank var gv
  • data gvrank set gvrank
  • if rank0 then style'Growth' else
    style'Value'
  • proc sort datagvrank by style
  • / Test abnormal portfolio returns/
  • proc means datagvrank

31
PERFORMANCE METRICS
Growth in time to process versus the number of
observations processed is linear rather than
exponential, meaning that using the SASECRSP
engine is an efficient method of accessing a wide
range of data.
32
FUTURE DIRECTIONS
SAS and CRSP continue to work together to promote
increased functionality, ease and efficiency of
use. Not yet available and not limited to this
list, are the following works in progress
Time series calendar mappings Report data at
different frequencies Map event data to time
series Align data relative to event dates
Report data by either calendar or fiscal
frequency Derived data items Associated
index and portfolio results Excess
returns Portfolio statistics
33
CONTACT INFORMATION
Phone 312.263.6400 Website www.crsp.chicagogsb.
edu Email Subscriptions_at_crsp.ChicagoGSB.edu Suppo
rt_at_crsp.ChicagoGSB.edu Address CRSP Center
for Research in Security Prices University of
Chicago, Graduate School of Business 105 West
Adams Street, Suite 1700 Chicago, Illinois 60603
Write a Comment
User Comments (0)
About PowerShow.com