2

I want to calculate a weekly (end of every week) rolling mean of the last month. Exactly: Assume that the time series don't include any weekand. So what I mean is that I would start every Friday and calculate the mean of the last month.

  • Friday 2018-07-06: mean of 2018-07-06 - 2018-06-06
  • Friday 2018-07-13: mean of 2018-07-13 - 2018-06-13
  • Friday 2018-07-20: mean of 2018-07-20 - 2018-06-20

Two important things:

  1. I have to define really the starting day (e.g. Friday). What I mean is that I couldn't say n=7 because sometimes it could occur that in the time series one week is missing.
  2. I couldn't say change the number of the month 07to 06because it also occur that 2018-06-20itn't included in the time series.

Thank you in advance!

zx8754
  • 52,746
  • 12
  • 114
  • 209
Christian
  • 401
  • 1
  • 5
  • 14

0 Answers0