14

In-sample fits are not a reliable guide to out-of-sample forecasting accuracy. The gold standard in forecasting accuracy measurement is to use a holdout sample. Remove the last 30 days from the training sample, fit your models to the rest of the data, use the fitted models to forecast the holdout sample and simply compare accuracies on the holdout, using ...


13

Combining forecasts is an excellent idea. (I think it is not an exaggeration to say that this is one of the few things academic forecasters agree on.) I happen to have written a paper a while back looking at different ways to weight forecasts in combining them: http://www.sciencedirect.com/science/article/pii/S0169207010001032 Basically, using (Akaike) ...


13

which is the appropriate neuronal network / function for time series prediction? Please consider, that above example is just a simplified data-example. Well, this totally depends on your data. In your example data you have a small univariate time series (only 14 observations) a linear trend no white noise no seasonality no cycle non non-linearity nnetar() ...


11

You can use the following recurrent formula: $\sigma_i^2 = S_i = (1 - \alpha) (S_{i-1} + \alpha (x_i - \mu_{i-1})^2)$ Here $x_i$ is your observation in the $i$-th step, $\mu_{i-1}$ is the estimated EWM, and $S_{i-1}$ is the previous estimate of the variance. See Section 9 here for the proof and pseudo-code.


10

Note that Croston's method does not forecast "likely" periods with nonzero demands. It assumes that all periods are equally likely to exhibit demand. It separately smoothes the inter-demand interval and nonzero demands via Exponential Smoothing, but updates both only when there is nonzero demand. The in-sample fit and the point forecast then essentially is ...


10

As @forecaster has pointed out, this is caused by outliers at the end of the series. You can see the problem clearly if you plot the estimated level component over the top: plot(forecast(fit2)) lines(fit2$states[,1],col='red') Note the increase in the level at the end of the series. One way to make the model more robust to outliers is to reduce the ...


10

If we assume that the derivative and the infinite sum may be interchanged, there is a quick way to arrive at your result. As @whuber pointed out, we require absolute convergence for this to be possible. This holds for the series in question when $|1-\lambda|<1$. We then have $$\sum_{t} t \left( 1-\lambda \right)^{t} = - \left(1-\lambda\right) \sum_{t} \...


10

Because this is a statistics site, let's develop a purely statistical solution. The first formula in the question correctly observes that $$\lambda + \lambda(1-\lambda)^1 + \lambda(1-\lambda)^2 + \lambda(1-\lambda)^3 + \cdots = 1,$$ implicitly assuming $|1-\lambda|\lt 1$. For real numbers $0 \lt \lambda \lt 1$, this exhibits $1$ as the sum of a series ...


9

I don't know what "non-stationary limited data" means. So I will assume you mean "non-stationary data". Exponential smoothing methods including Holt-Winters methods are appropriate for (some kinds of) non-stationary data. In fact, they are only really appropriate if the data are non-stationary. Using an exponential smoothing method on stationary data is not ...


8

There is no normality assumption in fitting an exponential smoothing model. Even if maximum likelihood estimation is used with a Gaussian likelihood, the estimates will still be good under almost all residual distributions. There is also no normality assumption when producing point forecasts from an exponential smoothing model. However, there is often a ...


8

To address the part of your question related to R, the ets function from the forecast package includes a lambda argument -- when true, a Box-Cox transformation is used that will keep the forecasts strictly positive. You may be able to use the same general approach in Java.


8

When your data must be positive, you shouldn't fit a model that can go negative, and if you do, you shouldn't be surprised that it may forecast there. If your values are all strictly $> 0$, one common approach is to take logarithms and fit (and forecast) a model on that scale. There are other ways to approach this sort of problem, but that's probably ...


8

The small values for $\beta$ and $\gamma$ show that the trend and seasonality do not change much over time. They do not tell you that there is no trend or seasonality.


8

Is it true that a (simple) exponential smoothing model with alpha (smoothing constant) = 1 is the same as MA(1), which is in turn the same as a random walk model? (i.e. using only the most recent observation as the forecast for all future periods)? No, it is not. Here are the forecasts by the three models: Simple exponential smoothing (SES; see section 7.1 ...


8

Yes indeed: both exponential smoothing and ARIMA are special cases of state space models. For ARIMA, see this talk by Rob Hyndman, and for Exponential Smoothing, see Forecasting with Exponential Smoothing - the State Space Approach. This underlies the fact that specific Exponential Smoothing methods can be shown to yield MSE-optimal point forecasts for ...


7

This isn't an exact answer to your question, but... you are definitely best off spending a bit of time to do learn some R basics and use something like Rob Hyndman's forecast package to do this. This will let you try a number of robust forecasting procedures and choose appropriate parameters, all within a state of the art computing environment with good ...


7

As Brian says in his answer: there's no simple rule as to which is better. For example, the UK's Office for National Statistics switched from HW to ARIMA and wrote a paper on it and while they chose to switch it was probably because of the power of the X12 (now X13) software package, which is ARIMA-based and very powerful, rather than the technique itself. ...


7

A weighted average of any sequence $x_1, x_2, \ldots, x_n$ with respect to a parallel sequence of weights $w_1, w_2, \ldots, w_n$ is the linear combination $$(w_1 x_1 + w_2 x_2 + \cdots + w_n x_n) / (w_1 + w_2 + \cdots + w_n).\tag{1}$$ An exponentially weighted average (EWS), by definition, uses a geometric sequence of weights $$w_i = \rho^{n-i} w_0$$ ...


6

Values of $\alpha$ and $\beta$ close to one suggest the model is mis-specified. Try using the ets() function in the forecast package instead. It will choose the model for you, and select the best values of the smoothing parameters.


6

Only the smoothing parameters are held fixed, the initial states are re-estimated. See the help file: model It is also possible for the model to be of class "ets", and equal to the output from a previous call to ets. In this case, the same model is fitted to y without re-estimating any smoothing parameters. See also the use.initial.values argument. ...


6

To the best of my knowledge you cannot use exponential smoothing for daily forecasting that involves irregular seasonal effects or causal variables like holidays. The paper you cite is requires well defined seasonal cycle example 24 hours a day X 7 days a week = 168 hours a week, typically you see these type of seasonality in weather forecasting, electricity ...


6

This is textbook case of having outliers at the end of the series and its unintended consequences. The problem with your data is that the last two points are outliers, you might want to identify and treat outliers before you run the forecasting algorithms. I'll update my answer and analysis later today on some strategies to identify outliers. Below is the ...


6

Let $x$ be the original time series and $x_m$ be the result of smoothing with a simple moving average with some window width. Let $f(x, \alpha)$ be a function that returns a smoothed version of $x$ using smoothing parameter $\alpha$. Define a loss function $L$ that measures the dissimilarity between the windowed moving average and the exponential moving ...


5

You can have an exponential smoothing model that involves multiplicative seasonality but no trend. For example, in R: > library(forecast) > x <- ts(rnorm(100,10,1),f=4) > fit <- ets(x,"MNM") > fit ETS(M,N,M) Call: ets(y = x, model = "MNM") Smoothing parameters: alpha = 1e-04 gamma = 0.0449 Initial states: l = 10....


5

In-sample fit such as $R^2$ is even more frowned upon as a measure of model quality in forecasting than in other statistical subdisciplines, for all the well-known reasons (if you make your model more and more complex, you will get better and better in-sample fits... but ever worse out-of-sample forecast accuracy). If at all, people will rather use ...


5

Dampening can be thought of as a special case of shrinkage methods; these methods as a whole tend to reduce uncertainty in estimates (yet another circumstance of trading bias for variance, an ever-recurring theme in statistics, though in some cases, such as many involving variable-selection, shrinkage can reduce both bias and variance). There are many ...


5

I can't say precisely why your loess fit differs from the exponential fit -- that's more less "because it does, because they're different" -- but the reason that your exponential fit looks so linear, and why it looks so different from your plotted function, is that over the range of the data it is very close to linear. The parameter is -0.0037, the range of ...


5

@forecaster you are correct that the last value is an outlier BUT periood 38 (the penultimate value) is not an outlier when you take into account trends and seasonal activity. This is a defining/teaching moment for testing/evaluating alternative robust approaches. If you don't identify and adjust for anomalies then the variance is inflated causing other ...


5

ARIMA models are not stationary, ARMAs are. ARIMA includes the integration terms, e.g. a random walk model is ARIMA(0,1,0) and it's not stationary. There's a couple of different ways to exponentially smooth, here's EWMA and a different version. Neither of them requires stationarity. Here's an example in MATLAB with fitting ARIMA(0,1,1) into S&P 500 ...


5

I assume we're not dealing with the multiplicative form. The reason we use the most recent estimates for the level and trend is because of the way the model is set up -- in effect, it corresponds to an assumption that's part of the model. It's easiest to see if you look at the model in error-correction form (see, for example, Sec 7.5 of Hyndman & ...


Only top voted, non community-wiki answers of a minimum length are eligible