Dear forum members,

I am currently performing event study in M&A setting. I calculated ARs and CARs but I am stuck at calculating AARs and CAARs for each day in my event window.

//set event and estimation windows

sort merger_id date
gen evt_window = 1 if event_time >= -20 & event_time <= 20
gen est_window = 1 if event_time >= -250 & event_time <= -21
drop if evt_window == . & est_window == .

// estimate normal return model

qui reg ret sp_returns if est_window == 1

// estimate square root of MSE

gen rmse = e(rmse)

// compute ARs for each day during the event window

predict phat
gen ar = ret - phat if evt_window == 1
drop phat
drop if evt_window == 0

//set a sub-period over which you want to calculate CARs

keep if event_window >= -20 & event_window <= 20

// compute CARs

egen car = sum(ar)

gen tstat = car/(rnse*sqrt(_N))

sum car tstat



However, I would like to observe AARs at daily level for my event window (-20, 20) and CAARs?

Can anyone please help me out? I am grateful in advance