Event Study using the Eventstudy2 command in Stata

As pointed out in the previous article, some limitations are associated with the estudy command.  The command estudy does not capture the effect of two events on the same stock.  Such as, if Apple announced the stock split twice on two different dates, then it is impossible to measure the influence of these two events on the same stock using estudy.

Download Code and Data

Another command, eventstudy2, can be used to overcome the limitation.  In eventstudy2, the security data, factors, and event dates are stored in a separate dta file.  The security_return.dta file contains the data for the different stock returns. Factors. dta file contains the data for the market return, SML and HML or any other factors, and lastly, event_data.dta file includes the data of event dates on which we will perform the analysis.

For the estudy command, we needed the data to be in a wide format.  Whereas for the eventstudy2 command, the data will be in a long format

The data for the market model will be in a wide format, i.e., each factor should have its column, and the name of the date variable should be identical in all three files.

The event dates are also presented in the figure below.  This event file contains the company’s symbol and the date on which the event was incurred. The variable symbol and date should have the exact spelling as in other files, i.e. factors. dta and security_return.dta

First, we have to install the eventstudy2 command.  The command is given below to install the command package.

ssc install eventstudy2

Before starting the analysis, opening the file containing event dates is a must. All the commands will be executed in the event_data.dta file. The command is shown below:

 use "event_data.dta”, clear

The command of the eventstudy2 is given below:

Related Article: The Basics of Event Study
eventstudy2 symbol date using security_return,returns(ri) model(FM) marketfile(factors) marketreturn(MKT) evwlb(0) evwub(3) eswlb(-120) eswub(-10)

On running this command, an error will appear, as shown in the figure below:

This is because we first need to install some packages for eventstudy2 to work. Errors will appear if any one of the packages remains uninstalled.  The below commands can be used to install all five packages required for the eventstudy2 command.

ssc install moremata 
ssc install distinct
ssc install _gprod
ssc install rmse
ssc install parallel

After installing all the above packages, execute the eventstudy2 command again, and it will work. This process of installation only needs to be performed once.

eventstudy2 symbol date using security_return,returns(ri) model(FM) marketfile(factors) marketreturn(MKT) evwlb(0) evwub(3) eswlb(-120) eswub(-10)

Firstly, we will write the eventstudy2 command and then the name of the two variables in the event data file.  We will then tell Stata to use the security_return.dta file. After this, we will put a comma and write the name of the variable we want to use from the security_return.dta file. The second step will be writing the model (FM) we want to use within the parentheses of the function model ().

After this, we need the data from the factor.dta file. This can be done by using the option marketfile and stating the name of the dta file within its parentheses.  The next step will be specifying the name of the variables we want to use from the factors.dta file using the option marketreturn and write the name of the variable (MKT) within its parentheses. Lastly, we will specify the event window and estimation window. 

  • evwlb specifies the lower boundary of the event window which by default is -20.
  • evwub specifies the upper boundary of the event window, which by default is 20.
  • eswlb specifies the lower boundary of the estimation window which by default is -270.
  • eswub specifies the upper boundary of the estimation window which by default is -20.

The event window used in the above command starts on the day of the event and ends after three days.  The estimation window starts 10 days before the event and continues till 120 days before the event.  On running the above command, the following files will automatically generate.

The eventstudy2 command stores each result in different dta files shown above. First, we will explore the crossfile.dta.

You will notice that this file calculated 10 different Cumulative Abnormal Returns (CAR), and all these Cumulative Abnormal Returns (CAR) are the same.  The reason is that the eventstudy2 command allows us to use up to 10 event windows.  Because we only used one event window, it calculated the same Cumulative Abnormal Return (CAR) 10 times.  In that case, only consider the first Cumulative Abnormal Return (CAR) and ignore the other because all of them are the same. The value of Cumulative Abnormal Return (CAR) for the Apple firm is -0.0127, which indicates that the event negatively impacted Apple’s stock return as it decreased by 1.27%. Similarly, the Cumulative Abnormal Return (CAR) of the other four firms is also negative, indicating the event negatively affected the returns of FORD, GE, GM, and IBM. The FORD return was reduced by 10.4%, GE by 1.37%, GM by 4.89%, and IBM by 0.29%, respectively.

The second file is the carfile.dta, you will find the CAAR and all the t-tests that can be used while conducting the event study. According to the values of the t-test, the results are significant at a 10% significance level.

Related Book: Introductory Econometrics for Finance by Chris Brooks

The third file aarfile.dta. This file contains average abnormal returns for each event date and all the t-tests. 

The fourth file is arfile. dta.

 It contains the date, company symbol, actual return, MKT, event, Betas, and abnormal return. This is calculated for all the firms in the sample.

Normally, log returns are used in the event study. The above command we ran uses the simple return. Therefore, to use the log return, it is required to specify it at the end of the command, as shown below:

eventstudy2 symbol date using security_return,returns(ri) model(FM) marketfile(factors) marketreturn(MKT) evwlb(0) evwub(3) eswlb(-120) eswub(-10) log replace

The replace option is added because if we rerun the command, it will give an error because the output and files are already generated and stored. So, the replace option will replace the previous output and generate a new one. The results obtained from the estudy or eventstudy2 command will be the same.

Multiple Event Window

The eventstudy2 command also allows using the multiple event windows. The command will remain the same

eventstudy2 symbol date using security_return,returns(ri) model(FM) marketfile(factors) marketreturn(MKT)  eswlb(-120) eswub(-10) log replace car1LB(-1) car1UB(2) car2LB(0) car2UB(3)

In this command evwlb(0) evwub(3) are replaced with the car1LB(), car1UB(), car2LB(), and car2UB().

As discussed before, while using the eventstudy2 command, we can estimate the Cumulative Abnormal Return (CAR) at 10 different event windows, so this can be up to 10, as shown below figure.

On running the above command, we will get the below results in the crossfile.dta file.

In the above results, CAR 1 is for the event window (-1, 2), and CAR 2 is for the event window (0,3). The results of the CAR from 3 to 10 are coming from the evwlb() and evwub() options that, by default, are (-20,20).

Related Article: How to Create and use Business Calender in Stata

Model Type

Like estudy, we can also use multiple models when using eventstudy2 commands. The models are explained below:

The first model is the raw return.

eventstudy2 symbol date using security_return,returns(ri) model(RAW)  evwlb(0) evwub(3) eswlb(-120) eswub(-10) log replace

This is related to the calculation of the expected return. When we use the model “RAW.” We don’t need to specify the marketfile, marketreturn, or any other factor. This is because we are not using any factor except for the raw return.

The second model is the constant mean. In this, we will specify the model “COMEAN,” and the rest will remain the same. This model is similar to the model “HMM” used in the estudy command. In this model, the expected return equals the average return of the estimation window.  For instance, if we get the expected return of 1.25%, then we will say that on the event date, it is likely that the return will be 1.25%. In this model, we don’t need to specify the marketfile, marketreturn, or any other factor.

eventstudy2 symbol date using security_return,returns(ri) model(COMEAN)  evwlb(0) evwub(3) eswlb(-120) eswub(-10) log replace

The third model is MA which is like the “MAM” model of the estudy command. In the market-adjusted model, the market’s return on a specific date will be used as the expected return.  In this model, we need to specify the marketfile, and marketreturn.

eventstudy2 symbol date using security_return,returns(ri) model(MA) marketfile(factors) marketreturn(MKT) evwlb(0) evwub(3) eswlb(-120) eswub(-10) log replace

The fourth model is the FM model, like the “SIM and MFM” model of the estudy command. This model uses when we have CAPM or FAMA French Model. In the case of having only one market factor, we will only specify the marketreturn, while in the case of the FAMA French model, we will use multiple factors (factor1, and factor2) as shown in the below command. We can add up to 16 different factors using this command.

eventstudy2 symbol date using security_return,returns(ri) model(FM) marketfile(factors) marketreturn(MKT) factor1(SMB) factor2(HML) evwlb(0) evwub(3) eswlb(-120) eswub(-10) log replace

Multiple events for the same firm

For example, companies announce the stock dividend if we assume an event. Companies declare dividends multiple times. Such as Apple firm announced the dividend two times, as shown in the figure below:

As we studied, that estudy command can’t handle multiple events related to one company. However, the event study, in that case, can be concluded using the eventstudy2 command. We will run the same command, only the date has been changed.

We will see that Cumulative Abnormal Return (CAR) has been calculated twice for two different event dates of Apple firm.

Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Laurien
Laurien
8 months ago

How would you apply this to a multi-country event study with country specific market returns and country specific risk-free rates?

TheDataHall
Admin
5 months ago
Reply to  Laurien

Please get in contact at info.com

2
0
Would love your thoughts, please comment.x
()
x
Tweet
Share
Share
Pin