I have weekly series on financial risk index data as follows:
DATE NFCIRISK
1/8/1971 0.58
1/15/1971 0.61
......through
10/6/2017 -0.88
10/13/2017 -0.89
10/20/2017 -0.89
10/27/2017 -0.89
I want to convert them into a monthly(average of four weeks) series and I tried to use following in r but didnt work.
library(xlsx)
library(xts)
month.end <- endpoints(MyData, on = "months")
monthly <- period.apply(MyData, INDEX = month.end, FUN = mean)
head(monthly)
Could anyone please help me if any other ways I can try either in r or in Julia. Thanks and appreciating your response.