Hello all,
I am trying to create multiple event windows (quarterly earnings report announcement dates) for multiple stocks (and their prices). My goal is to see the price change during these windows and to be able to apply the CAPM model to get the beta and the alpha (and the abnormal returns) of each period for each stock.
For each stock, there are different announcement dates.
my data is between the years 2010 - 2020 so I am dealing with a lot of data. Relatively, I guess
currently, I have 2 data files.
The first one contains all the stocks' price (and their returns) on a daily basis, with the dates and an identifying number for each stock (CUSIP)
The second file contains the announcement dates and additional data regarding EPS. My problem with this file is that I have multiple observations for the same announcement date and I don't know how to get rid of them and leave only one (or the average) observation for each announcement date (and again for each stock). only after I do that I can try to merge the datasets together.

In case I confused you with my process:
1. I want to eliminate all the duplicates in the second data file
2. merge the two files based on dates
3. create multiple event studies for each stock, with respect to each announcement date
4. apply the CAPM model for each observation to get abnormal returns
5. finally, calculate the commutative returns over all the windows for each stock.

Thank you all for the help!