IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v027i03.html
   My bibliography  Save this article

Automatic Time Series Forecasting: The forecast Package for R

Author

Listed:
  • Hyndman, Rob J.
  • Khandakar, Yeasmin

Abstract

Automatic forecasts of large numbers of univariate time series are often needed in business and other contexts. We describe two automatic forecasting algorithms that have been implemented in the forecast package for R. The first is based on innovations state space models that underly exponential smoothing methods. The second is a step-wise algorithm for forecasting with ARIMA models. The algorithms are applicable to both seasonal and non-seasonal data, and are compared and illustrated using four real time series. We also briefly describe some of the other functionality available in the forecast package.

Suggested Citation

  • Hyndman, Rob J. & Khandakar, Yeasmin, 2008. "Automatic Time Series Forecasting: The forecast Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i03).
  • Handle: RePEc:jss:jstsof:v:027:i03
    DOI: http://hdl.handle.net/10.18637/jss.v027.i03
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v027i03/v27i03.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v027i03/forecasting_1.11.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v027i03/v27i03.R.zip
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v027.i03?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. Archibald, Blyth C., 1990. "Parameter space of the Holt-winters' model," International Journal of Forecasting, Elsevier, vol. 6(2), pages 199-209, July.
    2. Everette S. Gardner, Jr. & Ed. Mckenzie, 1985. "Forecasting Trends in Time Series," Management Science, INFORMS, vol. 31(10), pages 1237-1246, October.
    3. Hyndman, R.J. & Koehler, A.B. & Ord, J.K. & Snyder, R.D., 2001. "Prediction Intervals for Exponential Smoothing State Space Models," Monash Econometrics and Business Statistics Working Papers 11/01, Monash University, Department of Econometrics and Business Statistics.
    4. Hyndman, Rob J. & Khandakar, Yeasmin, 2008. "Automatic Time Series Forecasting: The forecast Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i03).
    5. Kwiatkowski, Denis & Phillips, Peter C. B. & Schmidt, Peter & Shin, Yongcheol, 1992. "Testing the null hypothesis of stationarity against the alternative of a unit root : How sure are we that economic time series have a unit root?," Journal of Econometrics, Elsevier, vol. 54(1-3), pages 159-178.
    6. Dickey, David A & Fuller, Wayne A, 1981. "Likelihood Ratio Statistics for Autoregressive Time Series with a Unit Root," Econometrica, Econometric Society, vol. 49(4), pages 1057-1072, June.
    7. Hyndman, Rob J. & Koehler, Anne B. & Snyder, Ralph D. & Grose, Simone, 2002. "A state space framework for automatic forecasting using exponential smoothing methods," International Journal of Forecasting, Elsevier, vol. 18(3), pages 439-454.
    8. Hylleberg, S. & Engle, R. F. & Granger, C. W. J. & Yoo, B. S., 1990. "Seasonal integration and cointegration," Journal of Econometrics, Elsevier, vol. 44(1-2), pages 215-238.
    9. Taylor, James W., 2003. "Exponential smoothing with a damped multiplicative trend," International Journal of Forecasting, Elsevier, vol. 19(4), pages 715-725.
    10. Assimakopoulos, V. & Nikolopoulos, K., 2000. "The theta model: a decomposition approach to forecasting," International Journal of Forecasting, Elsevier, vol. 16(4), pages 521-530.
    11. Canova, Fabio & Hansen, Bruce E, 1995. "Are Seasonal Patterns Constant over Time? A Test for Seasonal Stability," Journal of Business & Economic Statistics, American Statistical Association, vol. 13(3), pages 237-252, July.
    12. Durbin, James & Koopman, Siem Jan, 2012. "Time Series Analysis by State Space Methods," OUP Catalogue, Oxford University Press, edition 2, number 9780199641178.
    13. Anne B. Koehler & Rob J. Hyndman & Ralph D. Snyder & J. Keith Ord, 2005. "Prediction intervals for exponential smoothing using two new classes of state space models," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 24(1), pages 17-37.
    14. Rob J Hyndman & Maxwell L. King & Ivet Pitrun & Baki Billah, 2002. "Local Linear Forecasts Using Cubic Smoothing Splines," Monash Econometrics and Business Statistics Working Papers 10/02, Monash University, Department of Econometrics and Business Statistics.
    15. Hyndman, Rob J. & Koehler, Anne B., 2006. "Another look at measures of forecast accuracy," International Journal of Forecasting, Elsevier, vol. 22(4), pages 679-688.
    16. Smith, Jeremy & Yadav, Sanjay, 1994. "Forecasting costs incurred from unit differencing fractionally integrated processes," International Journal of Forecasting, Elsevier, vol. 10(4), pages 507-514, December.
    17. Melard, G. & Pasteels, J. -M., 2000. "Automatic ARIMA modeling including interventions, using time series expert software," International Journal of Forecasting, Elsevier, vol. 16(4), pages 497-508.
    18. Ord, J.K. & Koehler, A. & Snyder, R.D., 1995. "Estimation and Prediction for a Class of Dynamic Nonlinear Statistical Models," Monash Econometrics and Business Statistics Working Papers 4/95, Monash University, Department of Econometrics and Business Statistics.
    19. Makridakis, Spyros & Hibon, Michele, 2000. "The M3-Competition: results, conclusions and implications," International Journal of Forecasting, Elsevier, vol. 16(4), pages 451-476.
    20. repec:sae:niesru:v:167:y::i:1:p:106-112 is not listed on IDEAS
    21. Rob J. Hyndman & Andrey V. Kostenko, 2007. "Minimum Sample Size requirements for Seasonal Forecasting Models," Foresight: The International Journal of Applied Forecasting, International Institute of Forecasters, issue 6, pages 12-15, Spring.
    22. Hyndman, Rob J. & Billah, Baki, 2003. "Unmasking the Theta method," International Journal of Forecasting, Elsevier, vol. 19(2), pages 287-290.
    23. Rob Hyndman & Muhammad Akram & Blyth Archibald, 2008. "The admissible parameter space for exponential smoothing models," Annals of the Institute of Statistical Mathematics, Springer;The Institute of Statistical Mathematics, vol. 60(2), pages 407-426, June.
    24. Goodrich, Robert L., 2000. "The Forecast Pro methodology," International Journal of Forecasting, Elsevier, vol. 16(4), pages 533-535.
    25. Rob J. Hyndman & Lydia Shenstone, 2005. "Stochastic models underlying Croston's method for intermittent demand forecasting," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 24(6), pages 389-402.
    26. Reilly, David, 2000. "The AUTOBOX system," International Journal of Forecasting, Elsevier, vol. 16(4), pages 531-533.
    27. Hendry, David F, 1997. "The Econometrics of Macroeconomic Forecasting," Economic Journal, Royal Economic Society, vol. 107(444), pages 1330-1357, September.
    28. Kenneth F. Wallis, 1999. "Asymmetric density forecasts of inflation and the Bank of England's fan chart," National Institute Economic Review, National Institute of Economic and Social Research, vol. 167(1), pages 106-112, January.
    29. Guy Melard & Jean-Michel Pasteels, 2000. "Automatic ARIMA modeling including interventions, using time series expert software," ULB Institutional Repository 2013/13744, ULB -- Universite Libre de Bruxelles.
    30. Chatfield, Chris & Yar, Mohammed, 1991. "Prediction intervals for multiplicative Holt-Winters," International Journal of Forecasting, Elsevier, vol. 7(1), pages 31-37, May.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. repec:jss:jstsof:27:i03 is not listed on IDEAS
    2. De Gooijer, Jan G. & Hyndman, Rob J., 2006. "25 years of time series forecasting," International Journal of Forecasting, Elsevier, vol. 22(3), pages 443-473.
    3. Athanasopoulos, George & Hyndman, Rob J. & Song, Haiyan & Wu, Doris C., 2011. "The tourism forecasting competition," International Journal of Forecasting, Elsevier, vol. 27(3), pages 822-844.
    4. Jan G. De Gooijer & Rob J. Hyndman, 2005. "25 Years of IIF Time Series Forecasting: A Selective Review," Monash Econometrics and Business Statistics Working Papers 12/05, Monash University, Department of Econometrics and Business Statistics.
    5. Gardner, Everette Jr., 2006. "Exponential smoothing: The state of the art--Part II," International Journal of Forecasting, Elsevier, vol. 22(4), pages 637-666.
    6. Alysha M De Livera, 2010. "Automatic forecasting with a modified exponential smoothing state space framework," Monash Econometrics and Business Statistics Working Papers 10/10, Monash University, Department of Econometrics and Business Statistics.
    7. Sbrana, Giacomo & Silvestrini, Andrea, 2022. "Random coefficient state-space model: Estimation and performance in M3–M4 competitions," International Journal of Forecasting, Elsevier, vol. 38(1), pages 352-366.
    8. E. Vercher & A. Corberán-Vallet & J. Segura & J. Bermúdez, 2012. "Initial conditions estimation for improving forecast accuracy in exponential smoothing," TOP: An Official Journal of the Spanish Society of Statistics and Operations Research, Springer;Sociedad de Estadística e Investigación Operativa, vol. 20(2), pages 517-533, July.
    9. Theodosiou, Marina, 2011. "Forecasting monthly and quarterly time series using STL decomposition," International Journal of Forecasting, Elsevier, vol. 27(4), pages 1178-1195, October.
    10. Petropoulos, Fotios & Apiletti, Daniele & Assimakopoulos, Vassilios & Babai, Mohamed Zied & Barrow, Devon K. & Ben Taieb, Souhaib & Bergmeir, Christoph & Bessa, Ricardo J. & Bijak, Jakub & Boylan, Joh, 2022. "Forecasting: theory and practice," International Journal of Forecasting, Elsevier, vol. 38(3), pages 705-871.
      • Fotios Petropoulos & Daniele Apiletti & Vassilios Assimakopoulos & Mohamed Zied Babai & Devon K. Barrow & Souhaib Ben Taieb & Christoph Bergmeir & Ricardo J. Bessa & Jakub Bijak & John E. Boylan & Jet, 2020. "Forecasting: theory and practice," Papers 2012.03854, arXiv.org, revised Jan 2022.
    11. Hess, Alexander & Spinler, Stefan & Winkenbach, Matthias, 2021. "Real-time demand forecasting for an urban delivery platform," Transportation Research Part E: Logistics and Transportation Review, Elsevier, vol. 145(C).
    12. Sbrana, Giacomo & Silvestrini, Andrea, 2023. "The RWDAR model: A novel state-space approach to forecasting," International Journal of Forecasting, Elsevier, vol. 39(2), pages 922-937.
    13. Lingbing Feng & Yanlin Shi, 2018. "Forecasting mortality rates: multivariate or univariate models?," Journal of Population Research, Springer, vol. 35(3), pages 289-318, September.
    14. Svetunkov, Ivan & Kourentzes, Nikolaos, 2015. "Complex Exponential Smoothing," MPRA Paper 69394, University Library of Munich, Germany.
    15. Fiorucci, Jose A. & Pellegrini, Tiago R. & Louzada, Francisco & Petropoulos, Fotios & Koehler, Anne B., 2016. "Models for optimising the theta method and their relationship to state space models," International Journal of Forecasting, Elsevier, vol. 32(4), pages 1151-1161.
    16. Kourentzes, Nikolaos & Petropoulos, Fotios & Trapero, Juan R., 2014. "Improving forecasting by estimating time series structural components across multiple frequencies," International Journal of Forecasting, Elsevier, vol. 30(2), pages 291-302.
    17. Meira, Erick & Cyrino Oliveira, Fernando Luiz & de Menezes, Lilian M., 2022. "Forecasting natural gas consumption using Bagging and modified regularization techniques," Energy Economics, Elsevier, vol. 106(C).
    18. Fildes, Robert & Petropoulos, Fotios, 2015. "Simple versus complex selection rules for forecasting many time series," Journal of Business Research, Elsevier, vol. 68(8), pages 1692-1701.
    19. Nghia Chu & Binh Dao & Nga Pham & Huy Nguyen & Hien Tran, 2022. "Predicting Mutual Funds' Performance using Deep Learning and Ensemble Techniques," Papers 2209.09649, arXiv.org, revised Jul 2023.
    20. R Fildes & K Nikolopoulos & S F Crone & A A Syntetos, 2008. "Forecasting and operational research: a review," Journal of the Operational Research Society, Palgrave Macmillan;The OR Society, vol. 59(9), pages 1150-1172, September.
    21. Yanlin Shi & Sixian Tang & Jackie Li, 2020. "A Two-Population Extension of the Exponential Smoothing State Space Model with a Smoothing Penalisation Scheme," Risks, MDPI, vol. 8(3), pages 1-18, June.

    More about this item

    JEL classification:

    • C53 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Forecasting and Prediction Models; Simulation Methods
    • C22 - Mathematical and Quantitative Methods - - Single Equation Models; Single Variables - - - Time-Series Models; Dynamic Quantile Regressions; Dynamic Treatment Effect Models; Diffusion Processes
    • C52 - Mathematical and Quantitative Methods - - Econometric Modeling - - - Model Evaluation, Validation, and Selection

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:027:i03. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.