Moving average of closing price for securities
I have a dataset with the closing prices every day for several stocks. For each stock for each day, I want to calculate the average closing price of the previous 28 days and also the average closing price of the next 28 days.
Moving average does not seem to give me a way to do this. I would appreciate any suggestions and links to workflows that are similar. Thank you.