naivpredict {atmi}R Documentation

Time series forecasting using Holt exponential smoothing

Description

Time series forecasting using Holt exponential smoothing. In this model it is assumed that the given time series contains a trend, however, it shows no seasonal variations.

Usage

naivpredict(symbol = FALSE, datamatrix = list(NA, NA), period = c(FALSE, FALSE), nAhead = 5, plot = TRUE, stats = TRUE)

Arguments

symbol a unique series of letters assigned to a security for trading purposes. You can get the symbols by using the function getsymbols or from http://finance.yahoo.com/. If FALSE, a datamatrix is needed.
datamatrix a list of two vectors. The first one is a vector of dates, the second one is a vector of prices.
period is a vector of start and end dates, in "YYYY-MM-DD" format. If the start date is FALSE, all available data until the end date will be used. If the end date is FALSE, all available data from the start date will be used. If both are FALSE, all available data will be used. Prediction starts from the end date.
nAhead forecast horizon
plot logical; if TRUE, the series for the given period as well as prediction will be plotted.
stats if stats=TRUE, statistics like summary in linear models as well as residual diagnostic plots will be shown.

Details

The function naivpredict is based on the function HoltWinters with gamma=FALSE.
For the optimal choice of smoothing factors alpha and beta, the method of minimizing the squared one-step prediction error is used.

Value

pred predicted time series values.

Warning

To run the function, an active internet connection is required.

Author(s)

Waldemar Kemler, Peter Schaffner

References

[1] Charles C. Holt (2007). Forecasting seasonals and trends by exponentially weighted moving averages. International Journal of Forecasting, 20(1), 7
[2] Francis X. Diebold (2007). Elements of forecasting. Thomson Learning, London, 315, 316
[3] Winfried Stier (2001). Methoden der Zeitreihenanalyse. Springer, Berlin [u.a.], 24

See Also

atminaiv, HoltWinters

Examples

#Prediction of Price of "AACC" for the next 5 days.
naivpredict("AACC", nAhead=5)

[Package atmi version 1.0 Index]