**Open Review**. I want your feedback to make the book better for you and other readers. To add your annotation, select some text and then click the on the pop-up menu. To see the annotations of others, click the button in the upper right hand corner of the page

# Forecasting and Analytics with ADAM

*2021-07-26*

# Preface

What is ADAM?

ADAM stands for “Augmented Dynamic Adaptive Model.” It is “Augmented,” because it is not just ETS or ARIMA, it is a combination of the two with additional features. It is “Dynamic,” because it includes ETS and ARIMA components (dynamic models). It is “Adaptive,” because it has mechanism of update of parameters of explanatory variables. It is one framework for constructing ETS / ARIMA / Regression, based on more advanced statistical instruments. For example, classical ARIMA is built on the assumption of normality of the error term, but ADAM lifts this assumption and allows using other distributions as well (e.g. Generalised Normal, Inverse Gaussian etc). Another example, the conventional models are estimated either via the maximisation of the likelihood function or using basic losses like MSE or MAE, but ADAM has a wider spectrum of losses and allows using custom ones. There is much more, and different aspects of ADAM will be discussed in detail later in this textbook. For now, here is a brief list of features available in ADAM:

- ETS;
- ARIMA;
- Regression;
- TVP regression;
- Combination of (1), (2) and either (3), or (4);
- Automatic selection / combination of states for ETS;
- Automatic orders selection for ARIMA;
- Variables selection for regression part;
- Normal and non-normal distributions;
- Automatic selection of most suitable distributions;
- Advanced and custom loss functions;
- Multiple seasonality;
- Occurrence part of the model to handle zeroes in data (intermittent demand);
- Model diagnostics using plot() and other methods;
- Confidence intervals for parameters of models;
- Automatic outliers detection;
- Handling missing data;
- Fine tuning of persistence vector (smoothing parameters);
- Fine tuning of initial values of the state vector (e.g. level / trend / seasonality);
- Two initialisation options (optimal / backcasting);
- Provided ARMA parameters;
- Fine tuning of optimiser (select algorithm and convergence criteria);

All these extensions are needed in order to solve specific real life problems, so we will have examples and case studies later in the book, in order to see how all of this can be used.

This textbook uses two packages from R, namely `greybox`

, which focuses on forecasting using regression models, and `smooth`

, which implements Single Source of Error (SSOE) state space models for purposes of time series analysis and forecasting. The textbook focuses on explaining how ADAM (“ADAM is Dynamic Adaptive Model” - recursive acronym), one of the `smooth`

functions (introduced in v3.0.0) works, also showing how it can be used in practice with examples from R.

If you want to run examples from the textbook, two packages are needed (Svetunkov, 2021a, 2021b):

```
install.packages("greybox")
install.packages("smooth")
```

Some explanations of functions from the packages are given in my blog: Package greybox for R, Package smooth for R.

A very important thing to note is that this textbook **does not use tidyverse packages**. I like base R, and, to be honest, I am sure that

`tidyverse`

packages are great, but I have never needed them in my research. So, I will not use pipeline operators, `tibble`

or `tsibble`

objects and `ggplot2`

. It is assumed throughout the textbook that you can do all those nice tricks on your own if you want to.If you want to get in touch with me, there are lots of ways to do that: comments section on any page of my website, my Russian website, vk.com, Facebook, Linkedin, Twitter.

You can also find me on ResearchGate, StackExchange and StackOverflow, although I’m not really active there. Finally, I also have GitHub account.

You can use the following to cite the online version of this book:

- Svetunkov, I. (2021) Forecasting and Analytics with ADAM: Lancaster, UK. openforecast.org/adam. Accessed on [current date].

If you use LaTeX, the following can be used instead:

```
@MISC{SvetunkovAdam,
= {Forecasting and Analytics with ADAM},
title = {Ivan Svetunkov},
author = {OpenForecast},
howpublished = {(version: [current date])},
note = {https://openforecast.org/adam/},
url = {2021}
year }
```

### License

This textbook is licensed under Creative Common License by-nc-sa 4.0, which means that you can share, copy, redistribute and remix the content of the textbook for non-commercial purposes as long as you give appropriate credit to the author and provide the link to the original license. If you remix, transform, or build upon the material, you must distribute your contributions under the same CC-BY-NC-SA 4.0 license. See the explanation on the Creative Commons website.

### Acknowledgments

I would like to thank Tobias Schmidt for his help in refining earlier parts of the textbook and correcting grammatical mistakes.