# NOT RUN {
library(dplyr)
library(tidyquant)
library(timetk)
# 30-min interval data
taylor_30_min %>%
future_frame(date, .length_out = "1 week")
# Daily Data (Grouped)
m4_daily %>%
group_by(id) %>%
future_frame(date, .length_out = "6 weeks")
# Specify how many observations to project into the future
m4_daily %>%
group_by(id) %>%
future_frame(date, .length_out = 100)
# Remove Non-Working Days (Weekends & Holidays)
holidays <- tk_make_holiday_sequence(
start_date = "2017-01-01",
end_date = "2017-12-31",
calendar = "NYSE")
FANG %>%
group_by(symbol) %>%
future_frame(.length_out = "1 year",
.inspect_weekdays = TRUE,
.skip_values = holidays)
# }
Run the code above in your browser using DataLab