ES.grid: Grid search for exponential smoothing

ES.gridR Documentation

Grid search for exponential smoothing

Description

Grid search for exponential smoothing to find optimal parameters that minimizes errors with respect to a certain test set. Only implemented for non-seasonal exponential smoothing

Usage

ES.grid(type, alphrange, betarange, nahead, trainset, testset)

Arguments

type

Type of moving average. Can be "SES" or "DES"

alphrange

A vector of parameters for the level component. Can be created using seq, or by manually specifying a vector.

betarange

A vector of parameters for the trend component. Can be created using seq, or by manually specifying a vector. Not used if type="SES"

nahead

Number of observations to forecast.

trainset

A set of univariate time series data. Can be a vector (type double) or a data.table.

testset

Same as above.

Value

A data.table containing all combinations of alpha and beta with their respective MSE and MAPE values.

Examples

ES.Grid(type="SES", alphrange=seq(0.01,1,0.01), betarange=NA, nahead=12, crudenow$Close, crudetest$Close)
ES.Grid(type="DES", alphrange=seq(0.1,1,0.1), betarange=seq(0.1,1,0.1), nahead=12, crudenow$Close, crudetest$Close)

ammarsahab/smoothCV documentation built on April 18, 2022, 4:39 p.m.