check_backtesting_opt: Check backtesting options

Description Usage Arguments Value

View source: R/arg_checks.R

Description

This function ensures that the selected backtesting options are valid. If not, the function throws an error. If the options are NULL, then default values will be applied.

Usage

1
check_backtesting_opt(backtesting_opt)

Arguments

backtesting_opt

A list, options which define the backtesting approach:

use_bt - A boolean, to determine whether forecasts should be generated on future dates (default) or on past values. Generating forecasts on past dates allows to measure past forecast accuracy and to monitor a statistical model's ability to learn signals from the data.

nb_iters - An integer, to determine the number of forecasting operations to apply (When no backtesting is selected, then only one forecasting exercise is performed)

method - A string, to determine whether to apply a 'rolling' (default) or a 'moving' forecasting window. When 'rolling' is selected, after each forecasting exercise, the forecasting interval increments by one period and drops the last period to include it in the new training sample. When 'moving' is selected, the forecasting interval increments by its size rather than one period.

sample_size - A string, to determine whether the training set size should be 'expanding' (default) or 'fixed'. When 'expanding' is selected, then after each forecasting operation, the periods dropped from the forecasting interval will be added to the training set. When 'fixed' is selected, then adding new periods to the training set will require dropping as many last periods to keep the set's size constant.

Value

A list of backtesting options


xavierkamp/tsForecastR documentation built on Feb. 1, 2020, 10:16 a.m.