This post looks at how to use a Monte Carlo simulation for sales forecasting. It also discusses how to practically interpret the results in a useful way.

Sales forecasting models can be broadly categorised into two categories.

**Deterministic models**

where you know the exact path a forecast will take. No matter how many times you run the model you get the same result.

Some deterministic models used for sales forecasting have been discussed in a previous post.

**Stochastic models**

A stochastic model adds randomness to the prediction. This means, every time you run the model you get a different outcome. the outcome will be within the probability of what happened in the past. This is great for modelling actual world events, because it captures their inherent randomness of events. If a system is complex enough, starting off at the same point and doing the same things can yield different results.

It is great for sales forecasting. No matter how many variables you know about, you can never accurately predict what the next year is going to look like. The randomness is accepted and built into the process.

### Let’s go!

Like the previous post on forecasting, we will use our favourite sales data set. It shows daily sales data between 2014 and 2018 for a global superstore.

For our purposes we will make some changes to the raw data to better fit the problem a little better.

### Volatility

Volatility is a measure of how much a value changes over time. The more volatile the more drastic individual changes can be.

Models based on high volatility tend to be less reliable.

There are big swings in daily sales between 0 and $25K. For modelling purposes start off by looking at weekly sales.

The weekly sales still have quite a bit of volatility. it can be dealt with by smoothing. The red line shows smoothing on a 6 week moving average.

Looking at the individual week’s smoothed sales, we can plot it on a standard distribution to get more insight into what they look like.

### The Monte Carlo Simulation

Much has been written about Monte Carlo forecasting in the past. The name has a catchy ring to it.

It is a method of running random scenarios based on how data behaved in the past. All the scenarios are grouped up and then statistical analysis is run on them.

For instance when we look at the data set, the majority of the sales happen between $5K and $15K. There are sales that happen outside these ranges but not as many.

It means we can assume that this is likely to be the case in the forecasting year as well.

### A Random Walk

Based on how sales are likely to change over the year, we can simulate what could happen over the forecast year. Each of the weekly sales will be drawn from a probability distribution like the **Distribution of Weekly Sales** above.

Numbers in the middle of the distribution (around the 10K mark) will be drawn more frequently than numbers on the sides. Plotted on a graph, it gives you a unique path every time a simulation is run.

In the Monte Carlo simulation we run this process many times in order to capture predictable randomness.

Each path is not predictable but all paths are.

-Me

Each of the simulations are tallied and plotted in it’s own normal distribution curve.

The curve can then be married up with the risk profile of the company to prepare for the year ahead.

### Practical Applications

```
It's highly likely that you sales will be between $530,931 and $678,475.
There's a 25% chance that sales will be less than 579,824.
```

For instance, there is a 25% chance that sales will be below a particular amount. If the chance of this happening is too high, then it needs to be looked at.

Monte Carlo simulations can be applied to any set of problems that deal with predictable randomness. It is a great tool to have in the CFOs toolkit because it promotes thinking along the lines of probability rather than absolutes.

All the code of the analysis and the graphs are available as a Github Repository.

If you made it to the end of this post, thanks for reading. Please let me know what you think. It would be great if we could start a discussion on this topic.

[…] One type of stochastic modelling known as Monte Carlo simulation is discussed in another post. […]

[…] modelling was covered in a previous post that went through a Monte Carlo forecasting […]

[…] Forecasting with probabilistic models. […]

[…] For a more detailed analysis go here. […]