Intermittency and Obsolescence: a Croston Method With Linear Decay

Only two Croston-style forecasting methods are currently known for handling stochastic intermittent demand with possible demand obsolescence: TSB and HES, both shown to be unbiased. When an item becomes obsolescent then TSB's forecasts decay exponentially, while HES's decay hyperbolically. We describe a third variant called Linear-Exponential Smoothing that is also unbiased, decays linearly to zero in a finite time, is asymptotically the best variant for handling obsolescence, and performs well in experiments.


Introduction
Inventory management is of great economic importance to industry, but forecasting demand for spare parts is difficult because it is intermittent : in many time periods the demand is zero. This type of demand occurs in several industries, for example in aerospace and military inventories from which spare parts such as wings or jet engines are infrequently required. Various methods have been proposed for forecasting, some simple and others statistically sophisticated, but relatively little work has been done on intermittent demand. Most work in this area is influenced by that of [2], who first separated the forecasting of demand size and inter-demand interval. A recent review of the literature on intermittent demand can be found in [14].
Another difficult feature of some inventories is obsolescence, in which an item has no demand at all after a certain time period. When many thousands of items are being handled automatically, this may go unnoticed by Crostonstyle methods, which continue to forecast high demand forever though no actual demand has occurred. The authors of this paper know of an inventory company who were obliged to modify Croston's method, artificially forcing its forecasts to zero after a certain number of periods without demand. This is a pragmatic but inelegant solution, and obsolescence has been neglected in the literature. However, two recent Croston variants have been designed to tackle it: TSB [19] and HES [13].
A qualitative difference between TSB and HES is that when obsolescence occurs TSB's forecasts decay exponentially to zero while those of HES decay hyperbolically. Neither generates forecasts that actually reach zero, though they come arbitrarily close as time proceeds. In this paper we describe a new Croston variant whose forecasts decay linearly to zero in a finite time, a feature we believe will appeal to practitioners. We compare it empirically and analytically with other forecasters and show that it is unbiased, handles obsolescence better than other methods, and competitive in experiments with intermittent demand.
The paper is organised as follows. Section 2 surveys existing forecasters and presents the new forecaster, Section 3 analyses the handling of obsolescence by forecasters, Section 4 compares them empirically using synthetic demand data, and Section 5 concludes the paper.

Forecasting for intermittency and obsolescence
In this section we survey the relevant forecasting methods for handling intermittency and obsolescence, and introduce our new forecaster. We denote the observed demand at (discrete) time t by y t , a smoothed estimate of y byŷ t , and a forecast by f t .
Single exponential smoothing (SES) generates estimatesŷ t of the demand by exponentially weighting previous observations using the formulâ where α ∈ (0, 1) is a smoothing parameter . The smaller the value of α the less weight is attached to the most recent observations. There are many variations on SES and they are surveyed in [4]. They perform remarkably well, often beating more sophisticated approaches [3], but SES is known to perform poorly on stochastic intermittent demand . In a standard model of this type of demand, the occurrence of a nonzero demand is a Bernoulli event occurring at each time period with some probability. The magnitude of the demands may follow any of several distributions.
A well-known method for handling intermittency is Croston's method [2] which explicitly separates the aspects of demand size and probability of a demand occurring. It applies SES to the demand size y and inter-demand interval τ independently (possibly with different smoothing factors), where τ = 1 for nonintermittent demand. Given smoothed demandŷ t and smoothed intervalτ t at time t, the forecast is Bothŷ t andτ t are updated at each time t for which y t = 0. According to [4] it is hard to conclude from the various studies that Croston's method is successful, because the results depend on the data used and on how forecast errors are measured. But it is generally regarded as one of the best methods for intermittent series [5], and versions of the method are used in leading statistical forecasting software packages [19]. We refer to it as CR.
CR was shown by [17] to be biased on stochastic intermittent demand, and they corrected the bias by modifying the forecasts: where β is the smoothing factor used for inter-demand intervals, which may be different to the α smoothing factor used for demands. 1 We refer to this variant as SBA. It works well for intermittent demand but is biased for non-intermittent demand, as its forecasts are those of SES multiplied by (1 − β/2). This problem is avoided by [15] who uses a forecast This removes the bias on non-intermittent demand but increases the forecast variance [18]. We refer to this variant as SY.
Another modified Croston method is described by [9], who apply SES to the ratio of demand size and inter-demand period when a nonzero demand occurs: However, this turns out to be biased on stochastic intermittent demand [1]. Though these variants successfully handle intermittency, they do not handle obsolescence well: when obsolescence occurs they continue forever to forecast a fixed nonzero demand. The first Croston variant explicitly designed to handle obsolescence is the TSB method of [19] which updates an estimate of the demand probability instead of the inter-demand interval: instead of a smoothed interval τ t it uses a smoothed probability estimatep t where p t is 1 when demand occurs at time t and 0 otherwise. Different smoothing factors α and β are used forŷ t andp t respectively.p t is updated every period whileŷ t is only updated when demand occurs. The forecast is This method is unbiased and handles intermittency well. It also solves the problem of obsolescence because, like SES but unlike other Croston variants, when an item becomes obsolescent its forecasts decay exponentially to zero.
Another Croston variant designed to handle obsolescence is the Hyperbolic-Exponential Smoothing (HES) method of [13]. Like most Croston variants HES separates demands into demand size y t and inter-demand interval τ t . Its forecasts are Between nonzero demands τ increases linearly, producing a hyperbolic decay in the forecasts. This was justified in [13] by a Bayesian argument.
Our new Croston variant is similar in form to HES but uses forecasts where x + denotes max(0, x). When obsolescence occurs the forecasts decay linearly to zero at a rate controlled by β, and when they reach zero they remain there until further nonzero demands occur. The rate at which they decay can be controlled by adjusting β. This feature distinguishes it from all other Croston variants, which only approach zero asymptotically. We call this forecaster Linear-Exponential Smoothing (LES).
We show in Appendix A that LES is theoretically unbiased on stochastic intermittent demand, under the assumption that 1 − βτ t /2τ t ≥ 0. If this assumption does not hold (which may occur if we set β to a high value) then the term will be replaced by 0, causing a positive bias, but we show empirically in Section 4.1 that this effect is negligible.
Pseudocode for LES is shown in Figure 1 and a graph illustrating its behaviour is shown in Figure 2. At the left of the graph demand is stochastic intermittent (shown as impulses) with probability 0.25 and fixed size, but then sudden obsolescence occurs as the probability drops instantaneously to 0. All forecasters use α = β = 0.1, except that TSB uses β = 0.02 because [19] recommend a smaller value. The graph shows that all four forecasters behave reasonably on stationary demand, but that when obsolescence occurs SBA (like most Croston variants) continues indefinitely with a nonzero forecast while TSB, HES and LES decay in different ways. when obsolescence occurs, respectively decaying exponentially, hyperbolically and linearly. Each is approximately unbiased on stochastic intermittent demand, but which best handles obsolescence? This is a difficult question because the answer clearly depends on many factors: the type of demand data, how long we compare forecasters before and after obsolescence occurs, and which error measures we use for the comparison. In Section 4 we shall perform experiments, but in this section we analyse the asymptotic behaviour of the different forecasters, in an attempt to obtain a definitive answer.
We shall compute error measures for the forecasters, using times starting from just after obsolescence occurs at time 0, up to some large T → ∞. We assume the demand to be highly intermittent, that is τ t is typically large, so the user will choose small β. This represents a worst-case scenario in which an automated inventory control system continues to make forecasts far from zero for an obsolete item for a long time, because it believes demand to be highly intermittent based on previous data. We shall analyse how the forecasters perform under this scenario. We ignore the machine-dependent issue of arithmetic errors causing truncation to 0 as forecasts become small. All the forecasters are unbiased so we assume they have the same forecast f 0 when obsolescence occurs at time 0.
A surprising variety of measures have been used in the literature and in forecasting competitions [10,11,12]. There is no consensus on which is best so it is generally recommended to use several. We shall consider all measures listed in the surveys of [6,7] and the article [20].
The scale-dependent measures are based on the mean error e t = y t −ŷ t or mean square error e 2 t , and include Mean Error, Mean Square Error, Root Mean Square Error, Mean Absolute Error and Median Absolute Error. As T → ∞ all these tend to zero so they cannot be used for an asymptotic comparison.
The percentage errors are based on the quantities p t = 100e t /y t and include Mean Absolute Percentage Error, Median Absolute Percentage Error, Root Mean Square Percentage Error, Root Median Square Percentage Error, Symmetric Mean Absolute Percentage Error, and Symmetric Median Absolute Percentage Error. As y t = 0 for all t > 0 these are undefined for almost all times.
The relative error-based measures are based on the quantities r t = e t /e * t where e * t is the error from a baseline forecaster, and include Mean Relative Absolute Error, Median Relative Absolute Error, and Geometric Mean Relative Absolute Error. The baseline forecaster is usually the random walk (or naive method ) which simply forecasts that the next demand will be identical to the current demand. For almost all times e * t = 0 so these measures are undefined. We could use another baseline but we would still have the problem that the mean and median e t are zero, so these cannot be used for a comparison.
The relative measures are mainly defined as the ratio of (i) an error measure, and (ii) the same measure applied to a baseline forecaster. These include Relative Mean Absolute Error, Relative Mean Squared Error, and Relative Root Mean Squared Error (for example the U2 statistic). The baseline forecaster is again usually the random walk. Both measures tend to zero as T → ∞ so these cannot be used for our comparison. A different form of relative measure is Percent Better, which computes the percentage of times a forecaster has smaller absolute error |e t | than a baseline forecaster, again usually random walk. Random walk has asymptotically perfect performance so Percent Better cannot be used for our comparison. A related measure is Percent Best in which no baseline forecaster is used: instead it computes the percentage of times each forecaster being tested has smaller absolute error than the others. We shall use this measure below.
The scaled errors include MAD/Mean Ratio [8] and Mean Absolute Scaled Error [7]. The former cannot be used for our comparison because the denominator (the mean error) tends to zero, while the latter cannot be used because it is proportional to e t which tends to zero.
There are also three recent measures designed for intermittent demand [20]. (i) Cumulative Forecast Error is defined as the sum of all errors over the time periods under consideration. Not taking averages means that errors do not become vanishingly small, so this measure gives meaningful results. We shall use it and also the related Cumulative Squared Error (which was not mentioned in [20]): a motivation for using squared errors is that they penalise outliers more severely than absolute errors, giving a different perspective. (ii) Number of Shortages at time t is defined as the number of periods in which the Cumulative Forecast Error is strictly positive and demand is nonzero. In our scenario demand is always zero after obsolescence occurs so this is not meaningful. (iii) Periods in Stock at time t is defined as In our scenario y i = 0 for all i > 0 so this reduces to But as t → ∞ the termŷ 1 t → ∞ and all other terms are positive, so this measure is also not meaningful here.
Thus Percent Best (PBt), Cumulative Forecast Error (CFE) and Cumulative Squared Error (CSE) are the only error measures we know of that can be used for our comparison. The results of the comparison are shown in Table 1 and the derivations are given in Appendix B. First we consider the CFE results. HES is worst with infinite error. TSB appears to beat LES but only if they use the same smoothing factor β, and it is recommended by [19] to use a smaller β for TSB. In the absence of an exact known relationship between β andτ t (we know only that they are inversely related in some sense) the two results are incomparable, so neither TSB nor LES can be shown to dominate the other. Next we consider the CSE results. TSB is incomparable with HES and LES, but LES is 3 times better than HES. Finally, we consider the PBt results. Here LES beats both HES and TSB.

Experiments
In this section we test the accuracy of LES using synthetic demand data, to verify that it performs well empirically as well as theoretically. All experiments are based on those of [19].

Stationary demand
First we compare LES with TSB and HES on stationary stochastic intermittent demand (no obsolescence). Teunter et al. compare several forecasters on demand that is nonzero with probability p 0 where p 0 is either 0.2 or 0.5, and whose size is logarithmically distributed. Geometrically distributed intervals are a discrete version of Poisson intervals, and the combination of Poisson intervals and logarithmic demand sizes yields a negative binomial distribution, for which there is theoretical and empirical evidence [16]. The logarithmic distribution is characterised by a parameter ℓ ∈ (0, 1) and is discrete with The results are shown in Tables 3-6. We compare the forecasters by considering best results as α and β are varied. TSB and HES have lowest bias (ME), while HES and LES have lowest deviation (MAE and RMSE). The ME results also show that LES has low bias (though not the lowest) despite the fact that, as noted in Section 2, it will not be unbiased if the term 1 − βτ t /2τ t becomes negative.

Decreasing demand
In this experiment demand sizes again follow the logarithmic distribution, but the probability of a nonzero demand decreases linearly from p 0 in the first period to 0 during the last period. Demand sizes are again logarithmically distributed. As pointed out by Teunter et al., none of the forecasters use trending to model the decreasing demand so all are positively biased. The results are shown in Appendix C, Tables 7-10. Under ME, MAE and RMSE, TSB ranks first, LES second and HES third.

Sudden obsolescence
This experiment is the same as that of Section 4.2 except that the demand probability is reduced instantly to 0 after half the time periods. Demand sizes are again logarithmically distributed. The results are shown in Tables 11-14. LES wins under ME and MAE, and TSB under RMSE.

Conclusion
We described a new Croston variant called LES for handling obsolescence, shown to be unbiased on stochastic intermittent demand. LES has a feature that we consider to be an advantage over the two other variants TSB and HES designed to handle obsolescence: when obsolescence occurs its forecasts decay to zero in a finite time. This also occurs when a non-intermittent item becomes obsolescent, so LES may be a useful alternative to SES for non-intermittent as well as intermittent demand.
We proposed a form of asymptotic analysis to compare how well forecasters handle obsolescence, based on a worst-case scenario in which a highly-intermittent item becomes obsolescent and forecasts continue forever. Our analysis ranks LES as the best variant, followed by TSB then HES.
Finally, we performed experiments using synthetic demand data, and found LES to be highly competitive compared to TSB and HES. TSB has previously been shown to have lower bias and deviation than other Croston variants [19] so LES will also compare well against these forecasters.

A Derivation of the forecaster
This derivation follows a similar pattern to that of HES [13]. The LES forecaster uses a forecast of the form for some fixed value k, and we choose k to make LES unbiased on stochastic intermittent demand. First we derive the expectation E[f t ]. Consider the demand sequence as a sequence of substrings, each starting with a nonzero demand: for example the sequence (5, 0, 0, 1, 0, 0, 0, 3, 0) has substrings (5, 0, 0), (1, 0, 0, 0) and (3,0). Within a substringŷ t andτ t remain constant, and if an item has not become obsolescent and k is sufficiently small then 1 − kτ t > 0, so LES has expected forecast For stochastic intermittent demand the inter-demand interval is a random variable with geometric distribution and mean 1/p. We estimate p ≈ 1/τ t so E [τ t ] ≈ τ t and the expected forecast over the string is This coincides with SES on non-intermittent demand, so LES is unbiased on nonintermittent demand whatever the value of k. To make it unbiased on stochastic intermittent demand we choose k so that it has the same expected forecast as SBA's fixed forecast over each string, which is So k = β/2τ t and the forecast when y t = 0 is Moreover, LES updatesŷ t andτ t in exactly the same way as SBA at the start of each substring, therefore it has the same expected forecast as SBA over the entire demand sequence. Thus by [17] it is unbiased on stochastic intermittent demand.

B Derivation of asymptotic errors
In this Appendix we derive asymptotic obsolescence errors for the three forecasters.

B.1 Cumulative forecast error
The CFE is the sum of all errors for t ≥ 0, used for example in [20]. In our scenario all forecasts are positive and all demands are zero, so the CFE coincides with the Cumulative Absolute Error. TSB's CFE is This is a special case of the general harmonic series which diverges to ∞. LES's CFE is Under the simplifying assumption that 2τ 0 /β is an integer ℓ the series contains ℓ terms so the CFE is

B.2 Cumulative squared error
The CSE is the sum of all squared errors. TSB's CSE is To evaluate this summation we use the digamma function. It is known that where ψ (1) is the first derivative of the digamma function. Replacing z by 1/x: Using an asymptotic expansion for large z: where the B i are Bernoulli numbers. Taking a first term approximation we get Recall that ℓ = 2τ /β, which for highly intermittent demand is a large number, so we ignore the ℓ 2 and ℓ terms to get 2f 2 0τ0 /3β.

B.3 Percent best
To compute Percent Best (PBt) we take a collection of forecasting methods and count the percentage of times at which each gives the smallest error. PBt is popular because it is scale-free and easy to understand. Furthermore, in practice only one forecaster will be chosen so PBt resembles a real-world choice [17].
Comparing the three forecasters in this way, LES has a PBt of 100% while the others have a PBt of 0%. This is because for almost all times both the demand and the LES forecast are zero while the TSB and HES forecasts are nonzero.

C Experimental results
In this Appendix we present tables of results for the three forecasters using synthetic demand data.     Table 11. Sudden obsolescence with ℓ = 0.9, p 0 = 0.5  Table 14. Sudden obsolescence with ℓ = 0.001, p 0 = 0.2