/* Eventus Event Study with Size-Book-to-Market Reference Portfolios */ /* */ /* ---------------------------------------------------------------------------------- */ /* */ /* Start with this example file when: */ /* You want to use the return on the matching size and book-to-market-equity port- */ /* folio, as defined by Fama and French, as the normal return benchmark. */ /* */ /* ---------------------------------------------------------------------------------- */ /* */ /* Users with a current entitlement to use Eventus via WRDS are welcome to ask */ /* questions through https://support.eventstudy.com. */ /* */ /* Steps to run an event study with size and book-to-market reference portfolios */ /* */ /* 1. Assemble the request file and upload if needed. The request file can be a text */ /* file, a SAS data set read-in from in-stream text as in the example below, or */ /* a SAS data set created by any of the many other methods in SAS, among them */ /* importing an Excel or Stata file. */ /* */ /* 2. Download the reference portfolio data sets to your PC if you haven't already; */ /* instructions appear below. */ /* */ /* 3. Select one of the four sample programs below; modify as desired. */ /* */ /* 4. Run the program in SAS for Windows to execute in the WRDS Cloud. */ /* First we read the demonstration request file into a SAS data set. Eventus can */ /* accept a SAS data set or text file. This illustration uses dates that look like */ /* MM/DD/YYYY, but SAS can read any style of date. Search SAS documentation for date */ /* informats for more information. */ data request; infile datalines; input cusip:$8. eventdate:mmddyy8.; /* The format statement below affects only how the dates appear when you view */ /* the SAS data set being created. Whether a format statement is used does */ /* not affect how the date is recognized and used by Eventus. */ format eventdate yymmddn8.; datalines; 86667410 4/2/1996 64114K10 8/4/1999 56275110 3/18/1996 88521810 8/7/2001 97186710 2/3/1998 69881310 5/1/1996 46096710 1/26/2000 02358610 12/12/1996 87120610 3/14/2000 45792310 2/13/1997 03638410 2/25/1998 12617210 6/4/1996 86444410 11/20/1996 44966150 4/8/1998 02406110 8/15/2001 00374310 4/30/1999 00207R10 3/29/2000 64107U10 3/23/2000 37191210 5/22/1996 86663B10 11/10/1998 45253H10 11/16/2000 01671410 9/28/1999 42194610 12/18/2001 run; /* The examples use SAS data sets that you can download from https://eventus1.box.com/v/EventusSizeBookSupportFiles . */ /* Unzip and save the contents in your Documents\My SAS Files\9.4 folder (where 9.4 could differ by SAS version). */ /* */ /* Common aspects of the examples in this file */ /* */ /* The MyCompanionIdx= option points to a SAS data set containing companion portfolio returns. You can build your own, but */ /* this sample code file uses the returns of 25 (5x5) portfolios sorted on size and book equity-to-market equity ratio. */ /* These portfolio returns are publicly accessible on Professor Kenneth R. French's website; Cowan Research, L.C., the */ /* producer of Eventus, has put them in the SAS data set format needed by Eventus. The MyCompanionLabel option specif- */ /* ies a label to use in some output files. The Port1DS= option points to a SAS data set that shows which portfolio */ /* each stock on CRSP is matched to in each period. MyCompanionFreq=quarter means that the mapping between stocks and */ /* portfolios is listed by calendar quarter in the Port1DS= data set. The mapping actually can change only once per year*/ /* in the underlying data, but we need quarterly records because the mapping year begins on July 1 instead of January 1,*/ /* following Fama and French. */ /* */ /* The Companion option of the Request statement causes companion portfolio returns to take the place of the broad market */ /* index returns that Eventus would use by default. The option MAR computes abnormal returns by the "market adjusted" */ /* -- in this case meaning companion portfolio adjusted -- method in which the benchmark return is simply subtracted */ /* from the firm return. The option NoMM suppresses the single-factor market model that Eventus runs by default. It is */ /* possible to use the market model abnormal return method with companion portfolios, but this is not common. */ /* */ /* */ /* The SAS data set output (OutWin=) will download automatically to the Work "library" (folder) of PC SAS, from where you */ /* can move it to a permanent library if desired. The CSV and Stata output formats will be saved to your WRDS home dir- */ /* ectory. If you want either or both of these formats to download to your PC, you may want to add proc download code */ /* just before the endrsubmit statement. If you don't want them, delete the corresponding code lines before running, to */ /* avoid cluttering your WRDS space. */ /* The next several lines are common to all examples and set up the remote submit environment. */ options ps=60 ls=126; /* Page and line size on PC side */ options nomautosource noimplmac; run; %let wrds = wrds.wharton.upenn.edu 4016; options comamid=TCP remote=WRDS; signon username=_prompt_; /* (user responds to the user name/password popup here) */ options ps=60 ls=126; /* Page and line size on WRDS side */ /* The following four examples show some of the different ways of using size/book-to-market companion portfolios. */ /* Program 1: Stock-price reactions in short windows using daily data */ /* */ /* This example focuses on short-term abnormal returns around an event date (trading day 0). */ rsubmit inheritlib=(work=pcwork sasuser=pcsasusr); Eventus MyCompanionIdx=pcsasusr.portrtns_daily_size_b_m_25 MyCompanionLabel=Size_Book_to_Market_25 Port1DS=pcsasusr.ports_size_b_m MyCompanionFreq=quarter Page=VWide; title 'Seasoned Equity Offerings: Offer Date'; title2 'A Biased and Haphazard Sample for Demonstration Purposes Only'; Request insas=request Companion; Windows (-30,-3) (-2,+2) (-1,+1) (0,0) (+3,+30); Evtstudy MAR NoMM StdCSect=Adjusted GRANK GenSign /* This line selects test statistics to compute and display. Other choices are possible. */ Tail=L /* Selects lower-tailed inference. Change to Tail=2(U) for two-tailed (upper-tailed.) */ OutWin=pcwork.OfferCARs /* Creates a SAS data set containing CARs. Delete this line if you do not need this format. */ CSVWin='OfferCARs1.csv' /* Creates a CSV file containing CARs. Delete this line if you do not need this format. */ DTAWin='OfferCARs1.dta' /* Creates a Stata file containing CARs. Delete this line if you do not need this format. */ ; endrsubmit; /* Program 2: Monthly cumulative abnormal returns pre- and post-event */ /* */ /* This example uses CRSP monthly returns and estimates and tests cumulative abnormal returns (CARs). */ rsubmit inheritlib=(work=pcwork sasuser=pcsasusr); Eventus Monthly MyCompanionIdx=pcsasusr.portrtns_mnthly_size_b_m_25 MyCompanionLabel=Size_Book_to_Market_25 Port1DS=pcsasusr.ports_size_b_m MyCompanionFreq=quarter Page=VWide; title 'Seasoned Equity Offerings: Offer Date'; title2 'A Biased and Haphazard Sample for Demonstration Purposes Only'; Request insas=pcwork.request Companion; Windows (-12,-1) (+1,+12) (+13,+24) (+1,+24); Evtstudy MAR NoMM StdCSect RankTest GenSign /* This line selects test statistics to compute and display. Other choices are possible. */ Bootstrap /* Selects a bootstrap of parametric test statistics. Delete this line if not needed. */ OutWin=pcwork.OfferCARs /* Creates a SAS data set containing CARs. Delete this line if you do not need this format. */ CSVWin='OfferCARs2.csv' /* Creates a CSV file containing CARs. Delete this line if you do not need this format. */ DTAWin='OfferCARs2.dta' /* Creates a Stata file containing CARs. Delete this line if you do not need this format. */ ; endrsubmit; /* Program 3: Long-horizon buy-and-hold abnormal returns (BHARs) using daily data */ /* */ /* This example focuses on buy-and-hold abnormal returns for three periods of approximately a year or less and two periods */ /* of about three years. By using daily data, we can more finely control the timing of these periods, called "windows", */ /* relative to the event date or "day 0". In the case of a firm that delists before trading day +757, the EvtStudy */ /* statement option Fill=DM causes subsequent missing returns to be filled in using the companion portfolio return ("M" */ /* is for market, the role filled by a companion portfolio when the Companion option is used). If CRSP reports a post- */ /* delisting return for the firm, that return is compounded with the market return to filling the missing return that */ /* day. Return filling is not mechanically necessary to buy-and-hold return computation or the use of companion portfo- */ /* ios; feel free to remove Fill=DM if desired, or see Eventus documentation for alternative Fill= specifications. */ /* */ rsubmit inheritlib=(work=pcwork sasuser=pcsasusr); Eventus MyCompanionIdx=pcsasusr.portrtns_daily_size_b_m_25 MyCompanionLabel=Size_Book_to_Market_25 Port1DS=pcsasusr.ports_size_b_m MyCompanionFreq=quarter Page=VWide; title 'Seasoned Equity Offerings: Offer Date'; title2 'A Biased and Haphazard Sample for Demonstration Purposes Only'; Request insas=pcwork.request Companion; Windows (+25,+252) (+253,+504) (+505,+757) (+25,+757) (0,+757); Evtstudy Fill=DM BuyHold MAR NoMM Tail=2 /* Please see comments above for an explanation of this line. */ NoNames NoPList NoSinglePeriod /* Options on this line suppress some default dispaly output. Remove if desired. */ Stack Transnorm CSectErr Bootstrap /* Stack is a displayed output format choice. Others are statistical inference choices. */ OutWin=pcwork.OfferBHARs /* Creates a SAS data set containing BHARs. Delete this line if you do not need this format. */ CSVWin='OfferBHARs3.csv' /* Creates a CSV file containing BHARs. Delete this line if you do not need this format. */ DTAWin='OfferBHARs3.dta' /* Creates a Stata file containing BHARs. Delete this line if you do not need this format. */ ; endrsubmit; /* Program 4: Long-horizon buy-and-hold abnormal returns (BHARs) using daily data -- no separate estimation period */ /* */ /* This example is mostly identical to the preceding one. The main difference is that no separate estimation period is */ /* used. This means that test statistics based on a separate estimation period will not be valid, and therefore are not */ /* used. The test statistics selected by the Transnorm, CSectErr and WSR tests do not use a separate estimaiton period. */ /* Eventus always looks for an estimation period when computing BHAR even if none is needed. The options Estlen=, */ /* Est= and Overlap that we see below make the estimation period short and contiguous with part of the event period in */ /* which window buy-and=hold returns are reported. */ /* */ rsubmit inheritlib=(work=pcwork sasuser=pcsasusr); Eventus MyCompanionIdx=pcsasusr.portrtns_daily_size_b_m_25 MyCompanionLabel=Size_Book_to_Market_25 Port1DS=pcsasusr.ports_size_b_m MyCompanionFreq=quarter Page=VWide; title 'Seasoned Equity Offerings: Offer Date'; title2 'A Biased and Haphazard Sample for Demonstration Purposes Only'; Request insas=pcwork.request Companion EstLen=10 Est=+1; Windows (+25,+252) (+253,+504) (+505,+757) (+25,+757) (0,+757); Evtstudy Fill=DM BuyHold MAR NoMM Tail=2 /* Please see comments above the preceding example for an explanation of this line. */ NoNames NoPList NoSinglePeriod /* Options on this line suppress some default dispaly output. Remove if desired. */ Transnorm CSectErr WSR /* These options select specific test statistics. */ OutWin=pcwork.OfferBHARs /* Creates a SAS data set containing BHARs. Delete this line if you do not need this format. */ CSVWin='OfferBHARs4.csv' /* Creates a CSV file containing BHARs. Delete this line if you do not need this format. */ DTAWin='OfferBHARs4.dta' /* Creates a Stata file containing BHARs. Delete this line if you do not need this format. */ Overlap /* Overrides protection against estimation period overlapping the event period. */ ; endrsubmit; /* End of Eventus Event Study with Size-Book-to-Market Reference Portfolios Sample Code */