If you are an e-commerce company maybe you have faced lost sales. But, what do we exactly mean with lost sales?
Suppose you are analyzing the last month sales of a product and you notice that you sold much less than expected, then you probably had lost sales. The reasons why you had this unexpected behavior may are that:
- you did not register your sales for some unknown problems;
- there was a very high demand for that product, but you had a stockout;
- you tried a marketing strategy different from the past for that product and it did not work properly.
Those kinds of anomalies (called outliers) could certainly affect also the forecast. How can you automatically detect these outliers in order to get the right forecast?
In previous articles, basic time-series methods for sales forecasting and advanced time-series methods for sales forecasting, we mentioned some forecasting methods. Unfortunately, with a dirty history, they might not propose a reasonable forecast.
Cleaning the history
Then, before forecasting, we have to remove outliers from the sales history.
One reasonable way to automatically do that is by analyzing every single sales point with respect to the entire sales history.
For example, if in months 1, 2, 4, 5 you sold 100, 200, 400, 500 units and in month 3 you sold 50 units, probably something strange happened. There are several strategies to correct this behaviour. One reasonable way to correct this outlier adjusting the value through a correct one. For example, you can do the average between month 2 and month 4 or you can pick the value corresponding to the same month but from the previous year.
Once, the history is cleaned, you can choose the right model to do the forecasting.