I am a Matlab begginer. I have for several companies dates on quarterly earnings announcements (4 dates per year) and also its daily returns (since 1974 until now).
I need to select for each company a quarterly announcement date (eg: 25/10/2007) and from that date calculate a moving average of daily returns from 120 days before. Should I use the unique function to select each company data? They have unique identifying numbers.
I have in excel a collumn with the quarterly dates (6171 rows) and a collumn with the daily returns (375930 rows).