get_forecasts: True Out-of-Sample Time Series Forecasting

Description Usage Arguments Value See Also Examples

Description

get_forecasts() extracts the true out-of-sample forecasts from an object previously fitted with get_models().

Usage

1
2
3
4
5
6
7
8
9
get_forecasts(.tbl, ...)

## Default S3 method:
get_forecasts(.tbl, ...)

## S3 method for class 'tbl'
get_forecasts(.tbl, ...)

get_forecast.tbl_time(.tbl, ...)

Arguments

.tbl

A tidy tibble of the tbl_time class.

...

Additional parameters to be passed to forecast.

Value

A tidy tibble.

See Also

rolling_origin()

Examples

 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(.)

Reckziegel/YahooTickers documentation built on May 28, 2019, noon