get_metrics: Summarise Forecasting Models Errror Metrics

Description Usage Arguments Details Value See Also Examples

Description

Summarise the out-of-sample stocks forecasts by asset and time periods.

Usage

1
get_metrics(.tbl, .group, .truth, .forecast, ...)

Arguments

.tbl

A tibble of the tbl_time class.

.group

The column in which the data should be grouped. This will often be a column with stock tickers or stocks names.

.truth

The truth results of a time series realization.

.forecast

The out-of-sample forecasts from the chosen model.

...

Additional parameters to be passed to group_by(). Read the details.

Details

... wrappers around collapse_by(). It accepts any of the following arguments:

Value

A tibble with the following summary statistics by asset: mse, rmse, mae, mape and mase.

See Also

collapse_by()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(YahooTickers)
library(dplyr)
library(forecast)

get_tickers(dow) %>%
  slice(1:5) %>%
  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(.) %>%
  get_metrics(., tickers, adjusted, mean_forecast)

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