Hi,

I want to look at market reaction in response to earnings announcements, and I have a dataset in the following format:
Code:
ticker   company_id   date_id   date   event_date   rm   ret   ar   surp
company_id identifies the company (numerical representation of ticker), date_id ranges from -5 to 5 (-5 -4 -3 -2 -1 0 1 2 3 4 5) and it is the numerical representation of days in the event window, date are the corresponding dates, event_date is the date of the event (corresponds to date_id = 0), rm is the market return, ret is the stock return, ar is the stock abnormal return, the surp is earnings surprise.
I have looked at the Princeton page already (https://dss.princeton.edu/online_hel...ventstudy.html), tried to follow it but got a little lost because my data is not entirely the same format as that one.

I want something like this in the end: ar = x1*day_m5 + x2*day_m4 + ... so I can see how the returns react in the days leading up to, on the day of, and after the announcement.

Thank you!