Question:
"I came accross one problem: The displayed AR value in the ARFile for the eventday 0 does Not match the mean of ARs on eventday 0 in my AARfile. Is there something I did wrong or do these values do not match in general? Unfortunately, I could not find any solution to this in the stata forum… "
Repro of problem using eventstudy2's sample files:
use "earnings_surprises.dta", clear
eventstudy2 Security_id Date using Security_returns if Ea > 0.05, ret(Return) car1LB(0) car1UB(0) mod(FM) marketfile(Factor_returns) mar(MKT) idmar(Market_reference) factor1(SMB) factor2(HML) replace shift(0) nokol
* In the arfile, there are are 38 obs with non-missing AR on the event date (day 0):
use arfile, clear
sum AR if original_event_date == Date
* In the crossfile and the general graphical output, however, there are only 37 observations:
use crossfile, clear
sum CAR1
* Apparently, crossfile and graphical output are consistent, but the two are not consistent with arfile; Q: Which is the observations that is present in the arfile on day 0 but not considered in the crossfile/general output, and why?
Answer/Solution:
* A: Security_id 10 with event date 19jan2010 is missing in the crossfile: why?
use if Security_id == 10 & Date >= mdy(1,1,2010) & Date <= mdy(1,31,2010) using Security_returns, clear
* A: Apparently, while this firm has a trade-to-trade return (tttr) on 19 Jan 2010, the event day, it does not have a tttr on 18 Jan 2010. When looking at the market return file, we see that ....
use if Date >= mdy(1,14,2010) & Date <= mdy(1,21,2010) using Security_returns, clear
keep if Return != .
keep if Date == mdy(1,18,2010)
*... at least for some firms, the 18jan2010 was a trading day. Therefore, eventstudy2 considers the 18jan2010 as a trading day, and the tttr of Security 10 on 19jan2010 as the return across 18 Jan and 19 Jan. Thus, because eventstudy2 thinks in terms of tttr, it considers the 19 Jan return as contaminated by the unobservable 18 Jan return, thus excludes this observation.
* Adding the "fill" option (NOT RECOMMENDED) zeroes-out the missing 18jan2010 return and makes arfile, crossfile, and graphical output consistent:
use "earnings_surprises.dta", clear
eventstudy2 Security_id Date using Security_returns if Ea > 0.05, ret(Return) car1LB(0) car1UB(0) mod(FM) marketfile(Factor_returns) mar(MKT) idmar(Market_reference) factor1(SMB) factor2(HML) replace shift(0) nokol fill
use arfile, clear
sum AR if original_event_date == Date
* In the crossfile and the general graphical output, however, there are only 37 observations:
use crossfile, clear
sum CAR1
"I came accross one problem: The displayed AR value in the ARFile for the eventday 0 does Not match the mean of ARs on eventday 0 in my AARfile. Is there something I did wrong or do these values do not match in general? Unfortunately, I could not find any solution to this in the stata forum… "
Repro of problem using eventstudy2's sample files:
use "earnings_surprises.dta", clear
eventstudy2 Security_id Date using Security_returns if Ea > 0.05, ret(Return) car1LB(0) car1UB(0) mod(FM) marketfile(Factor_returns) mar(MKT) idmar(Market_reference) factor1(SMB) factor2(HML) replace shift(0) nokol
* In the arfile, there are are 38 obs with non-missing AR on the event date (day 0):
use arfile, clear
sum AR if original_event_date == Date
* In the crossfile and the general graphical output, however, there are only 37 observations:
use crossfile, clear
sum CAR1
* Apparently, crossfile and graphical output are consistent, but the two are not consistent with arfile; Q: Which is the observations that is present in the arfile on day 0 but not considered in the crossfile/general output, and why?
Answer/Solution:
* A: Security_id 10 with event date 19jan2010 is missing in the crossfile: why?
use if Security_id == 10 & Date >= mdy(1,1,2010) & Date <= mdy(1,31,2010) using Security_returns, clear
* A: Apparently, while this firm has a trade-to-trade return (tttr) on 19 Jan 2010, the event day, it does not have a tttr on 18 Jan 2010. When looking at the market return file, we see that ....
use if Date >= mdy(1,14,2010) & Date <= mdy(1,21,2010) using Security_returns, clear
keep if Return != .
keep if Date == mdy(1,18,2010)
*... at least for some firms, the 18jan2010 was a trading day. Therefore, eventstudy2 considers the 18jan2010 as a trading day, and the tttr of Security 10 on 19jan2010 as the return across 18 Jan and 19 Jan. Thus, because eventstudy2 thinks in terms of tttr, it considers the 19 Jan return as contaminated by the unobservable 18 Jan return, thus excludes this observation.
* Adding the "fill" option (NOT RECOMMENDED) zeroes-out the missing 18jan2010 return and makes arfile, crossfile, and graphical output consistent:
use "earnings_surprises.dta", clear
eventstudy2 Security_id Date using Security_returns if Ea > 0.05, ret(Return) car1LB(0) car1UB(0) mod(FM) marketfile(Factor_returns) mar(MKT) idmar(Market_reference) factor1(SMB) factor2(HML) replace shift(0) nokol fill
use arfile, clear
sum AR if original_event_date == Date
* In the crossfile and the general graphical output, however, there are only 37 observations:
use crossfile, clear
sum CAR1
