Description Usage Arguments Value See Also Examples
View source: R/get_forecasts.R
get_forecasts()
extracts the true out-of-sample forecasts from an object previously fitted with get_models()
.
1 2 3 4 5 6 7 | get_forecasts(.tbl, ...)
## Default S3 method:
get_forecasts(.tbl, ...)
## S3 method for class 'tbl_df'
get_forecasts(.tbl, ...)
|
.tbl |
A tidy |
... |
Additional parameters to be passed to |
A tidy tibble
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(YahooTickers)
library(dplyr)
library(forecast)
# Download and forecast time series using the "auto.arima"
# function from the forecast package
get_tickers(dow) %>%
slice(1:2) %>%
get_stocks(., periodicity = "monthly") %>%
get_returns(., tickers, log, TRUE, adjusted) %>%
get_models(., tickers, adjusted, 100, 1, FALSE, auto.arima,
seasonal = FALSE, stationary = TRUE) %>%
get_forecasts(.) # h = 1 because .assess = 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.