Towards a Weather-proactive Supply Chain

 

Insights » Whitepapers

  Read PDF version

Author: Aki Ali-Vehmas, Data Scientist

Weather is a source of significant fluctuations in consumer demand, and because of the bullwhip effect, it can produce unnecessary high fluctuations on the supply side as well. These fluctuations can quickly turn into costs: prepare too extensively and you’ll end up breaching the capacity limitations at every level of your supply chain and increasing your fresh goods spoilage, but failing to prepare sufficiently can lead to significant lost sales. What’s more, the lost sales do not only apply to products that go out of stock – especially during extreme weather conditions when customers are more likely to make their decisions on which store to visit based on the availability of some key product, for example bottled water during hot temperatures.

In this whitepaper, we’ll look at how retailers can optimally prepare for weather-related fluctuations. It’s relatively easy to come up with rules or models when thinking about typical examples of relationships between demand and some weather elements: high temperature and ice cream sales, rainfall and umbrella sales and so on. However, when looking at the entire assortment it becomes more complicated. How can products that react to weather be separated from products that don’t? How to measure which product reacts to which weather element (e.g. temperature, sunshine, cloudiness, rain, snow) and the degree of this reactivity?

It’s inevitable that some automated way is needed to process the data and make recommendations on the degree of weather sensitivity and underlying relationships between demand and weather variables. This is one area in supply chain planning where machine learning provides not only hype, but a substantial benefit – we do not know the actual relationships between a demand of some product and weather variables, and we cannot spend time to analyze those relationships for each product, product category or store separately, so we let the machine learn the relevant patterns and utilize the outcome in demand forecasting. That way we also use only weather variables that really affect demand, leading to more stable and accurate results. More interestingly, the algorithm can find relationships that a person might not notice, for example if the relationship with weather is statistically significant but quite small in magnitude. Utilizing a machine learning algorithm brings two kinds of benefits: demand forecast accuracy is improved, and time savings are significant.

Even though weather can have significant effect on certain products’ demand, it doesn’t make sense to forecast the demand of such products with only weather data. The most promising method is to use “hybrid” methods in modeling the weather impact. In such methods, multiple forecast models are used concurrently, and the subsequent model is trained to the error of the previous model. In other words, the response data into which we are trying to fit the weather data is the error of some other model. In a typical case, first a baseline forecast is calculated with widely used time-series methods for some period in history, then the error of that forecast is calculated and then it is determined which weather variables explain time-series forecast errors the best. This is beneficial, because the weather part of the model doesn’t need to consider effects like normal weekday variation, seasonality, holidays or promotions and it makes models easier to interpret and calculate.

Figures 1-3 illustrate the calculation logic in the hybrid weather-based sales forecasting framework. Figure 1 shows the relation between temperature and time-series forecast error in a group of ice cream items. The correlation is clearly negative because when temperature goes up, the time-series forecast is too low and vice versa. In Figure 2, the weather-corrected forecast decreases the error over the whole time period in both directions. This implies a very strong relationship between the demand for ice cream and temperature, because the variation in temperature both increases and decreases the demand of ice creams. Figure 3 shows the actual sales, time-series forecast and weather-corrected forecast which is obtained by adding the weather model output to the time-series forecast.

Figure 1. Time-series forecast error of ice-creams and temperature

Figure 2. Time-series forecast error and weather-corrected forecast error of ice-creams and temperature

Figure 3. Sales, time-series forecast and weather-corrected forecast of ice-creams

Best Practices in Weather-based Sales Forecasting

It’s most effective to build weather-based sales forecasting on top of stable baseline forecasts, which automatically consider things like weekday variation, seasonality, trends, holidays and promotions; allowing the weather model to concentrate on the weather effects. Additionally, it gives visibility on what part of the forecast is coming from which forecast model. This leads to several benefits in the actual use of weather models: different models and their outputs can be separated to for example quantify whether the weather model really improves forecast accuracy. On the other hand, different models and their outputs can be compared transparently so that e.g. in the case of upcoming large weather-based forecast uplift, the uplift can be put into context to verify if it makes sense or not, and whether the retailer should act on it.

It’s advisable to build a weather-based sales forecasting process that looks iteratively at models at different levels, so that each product in each store get the model that fits its data best. The SKU-store combination is the lowest level and usually most accurate as well. So, in theory each product in each store can get a separate model, because each product and each store can have different responses towards weather. Especially, store location can make a big difference. For example, when comparing the weather reactivity in a store in some central location with lots of tourists to that of a hypermarket in a location only reachable by car, usually the central city location is much more weather reactive than the hypermarket.

In addition to raw weather data, best results are achieved when some of the more sophisticated weather effects are considered. Weekday variation is something worth considering. On top of normal weekday variation, weather reactivity can differ from weekdays to weekends. Another thing to consider is past and future weather conditions. Responsiveness towards weather is usually stronger for example on the first sunny weekend of the spring than a sunny weekend in the middle of the summer when there has already been plenty of sunny weekends. Consumers also tend to plan ahead based on forecasted weather, and thus shift their purchases to earlier in the week in the case of an upcoming nice weekend. It goes without saying that nonlinearities in the weather effects needs to be considered. For example, it’s possible that high temperatures increase demand, but extremely high temperatures start to decrease the demand, because consumers stay home.

Weather reactivity can also vary significantly at different times of the year. Ice cream for example can be weather sensitive during summer, but not during winter. Figure 4 illustrates this phenomenon. The variation in temperature is approximately the same throughout the year, but the variation in sales is very much different during summer and during winter. During winter we clearly see that there’s absolutely no point on adding any weather-based sales forecasting, as there’s very little variation in sales. But during the summer, the variation in sales grows significantly and the need to incorporate weather into sales forecasts becomes apparent. Therefore, it’s valuable that the weather model can be activated only for some period and consider only this period in model estimation as well. In practice, the weather-model estimation shouldn’t consider the periods where there’s no need for it, for example winter in the Figure 4 case. In that way, the weather-model accuracy is increased as unnecessary noise is left out.

Figure 4. Weather reactivity of ice-creams during summer and winter

Weather-based Sales Forecasting in RELEX

RELEX weather-based sales forecasting model utilizes a machine learning algorithm to model the relationship between weather and demand, and automatically find the products that are weather sensitive, the relationships between demand for those products and different weather variables, and the magnitude of those relationships. Weather corrections are obtained as output from the model, and are combined with the time-series forecast to form a weather-corrected forecast for increased forecast accuracy. With RELEX, the whole process from fetching weather data to weather-corrected forecast calculation can be completely automated. RELEX has built-in integration to a global weather data provider where data is fetched based on store coordinates. RELEX can also be easily integrated to any other weather data provider, should it be necessary.

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 726825.

Aki Ali-Vehmas

Aki Ali-Vehmas

Data Scientist

Phone+358 44 2870 254

Aki Ali-Vehmas is a Data Scientist at RELEX Solutions focusing on forecast related topics, such as considering promotions, weather, markdown and cannibalization in forecasting.

Subscribe to similar resources

Get our monthly digest delivered to your inbox.



Your data is stored only for business-to-business communication purposes. See our privacy policy.

Want to know when similar resources are published?

Subscribe to receive a monthly digest of our most valuable resources like blog posts, whitepapers and guides.



Unsubscribe anytime. Your data is stored only for business-to-business communication purposes. See our privacy policy.