I am conducting an event study for my study, the effect of football transfers on stock prices. The problem is that there are a lot of events happening at the same time at the clubs. For this reason, I want between every event per club that there is no other event in the dataset three days before and after a transfer[-3,3], the transfer with the highest transfer fee is kept. Does anyone have a good code for this? I was thinking of a loop, but I can't get it into stata yet.