Hi,
I have high frequency data and I want to convert a five-minute interval in the data to run the Fama-MacBeth regressions. The example of data is as follows:

and this

I want to create a five minute interval on the data i.e. the command that I would able to get the average between the last five minutes in the next cell. More precisely, the average between 09:00:00 to 09:05:00 and then from latter point to 09:10:00 and so on.
I have tried egen but unable to figure out specific command and therefore seeking your guidance.
Thank you very much for your time.
Best regards,
I have high frequency data and I want to convert a five-minute interval in the data to run the Fama-MacBeth regressions. The example of data is as follows:
and this
I want to create a five minute interval on the data i.e. the command that I would able to get the average between the last five minutes in the next cell. More precisely, the average between 09:00:00 to 09:05:00 and then from latter point to 09:10:00 and so on.
I have tried egen but unable to figure out specific command and therefore seeking your guidance.
Thank you very much for your time.
Best regards,
Comment