library(BatchGetSymbols)

ticker <- '^FTSE'

first_date <- '2010-01-01'
last_date <- '2021-01-01'

df_FTSE_daily <- BatchGetSymbols(tickers = ticker, 
                            first.date = first_date,
                            last.date = last_date)[[2]]

# change from daily to monthly
df_FTSE_monthly <- df_FTSE_daily %>%
  mutate(ref_month = format(ref.date, '%Y-%m-01')) %>%
  group_by(ref_month) %>%
  summarise_all(last)

print(df_FTSE_monthly)
# none
my_answers <- rep(NA, 5)

Question

Use os mesmos dados diários do FTSE e reconstrua os dados na frequência mensal, novamente utilizando a última observação do período.

Solution


Meta-information

extype: string exsolution: r mchoice2string(c(TRUE, FALSE, FALSE, FALSE, FALSE), single = TRUE) exname: "function 01" exshuffle: TRUE



msperlin/adfeR documentation built on March 26, 2021, 3:05 a.m.