Simulation Tutorial
Introduction
A simulation model is like a mathematical machine that is running on the computer. It takes various input data from the user, performs calculations on the data, and shows the output to the user.
Simulations are necessary when the future is uncertain, because the computer can perform thousands of simulations very quickly, by using many random input values. This reveals the full range of possible outcomes and their probabilities, whereas a few crude estimates hide most of the details that are necessary to make informed decisions about an uncertain future. The difference between crude estimates and simulations is like night and day.
There are some tools for making simulations in Excel spreadsheets, but they are old and clunky. Our system makes it quick and easy to run simulations. Once you learn how to use the system, you can make a simulation in just a few minutes, and you can also share it with others. This page explains the basics and you should see the other tutorials for specific simulation models.
![Present Value calculation using average input values.](/static/images/docs/why-simulate1.png)
![Present Value simulation using probability distributions.](/static/images/docs/why-simulate2.png)
Input
Some user input is fixed or constant (or const for short), so it will always have the exact same value for all simulations. For example, in finance we often know the exact purchase price of something, such as the price of a stock or a business acquisition, so it is a constant number.
Other user input is uncertain so we use a probability distribution (or dist for short) for its possible values. For example, in finance we usually don't know the future earnings of a company, so we use a probability distribution to estimate a whole range of possible values. The image shows a typical input-form for a probability distribution.
![User input for a probability distribution for use in simulation.](/static/images/docs/tutorials/simulation/User%20Input%20Prob%20Dist.png)
You may select one of the following probability distributions:
- Constant is a fixed number that will be the exact same in all simulations.
- Uniform distributions produce random numbers with equal probability for all numbers between the given lower and upper bounds.
- Normal distributions are the well-known "bell-curves" which produce random numbers that can be ±infinite but are much more likely to be close to the given mean value. The so-called standard deviation (or std.dev. for short) measures the dispersion of the random numbers around the mean. As a rule of thumb, around 68% of the random numbers will be within 1 std.dev. of the mean, and around 95% will be within 2 std.dev., and 99.7% will be within 3 std.dev.
- User Data distributions are given by a list of the possible values for the random numbers and their probabilities. This is used to specify arbitrary shapes for the probability distribution. It can either be discrete or continuous by checking the interpolate box.
- Same is available in multi-year distributions to easily reuse the same probability distribution as the previous year.
The simulation models may clip / limit the user input to ensure it is valid. For example, if the model requires a certain number to be positive, but the user has input a normal probability distribution which can also produce negative values, this might break the simulation model, so it first clips / limits the probability distribution to ensure the random values are always positive.
All probability distributions are sampled independently of each other, so the numbers are drawn randomly from the different probability distributions without any correlation between them. It would sometimes be useful if the user could specify the correlation between certain probability distributions. For example, the valuation ratio of a stock could be positively correlated to the growth of the revenue and profits of the company. Unfortunately this is not always technically possible to implement, and it would also make the user interface far more complicated than it already is.
Guess
You should select probability distributions that are reasonable guesses of what the future values might be.
For example, if you need to select the probability distribution for the Price-To-Sales (P/S) ratio of a stock, you could use the historical P/S ratios for that stock, or for similar stocks in the same industry.
Another example is the tax-rate for dividend payouts. Here you could make three scenarios, one where the tax-rate remains the same, one where it goes lower, and one where it goes higher. The actual tax-rate is decided politically, so you would essentially be making a guess about a future political decision on dividend tax-rates.
You could also make a probability distribution that represents different investor groups. For example, Group A could be 80% of your investors with a dividend tax-rate of 30%, Group B could be 15% of your investors with a dividend tax-rate of 20%, and Group C could be 5% of your investors with a dividend tax-rate of zero. So when the simulations are calculating the shareholder value using random dividend tax-rates, it takes into account that the different investor groups have different tax-rates.
Copy / Paste / Tweak
The user-input can be copy/pasted when editing simulations. Historical data and some simulation results can also be copied. This makes it very easy to reuse data in different simulations. This uses the clipboard on your own computer, so you may be asked to allow this feature in your web-browser, the first time you try to copy/paste some data. There are several ways to copy/paste data:
- You may copy all input-data when editing a simulation, by clicking the top "More" button. When pasting the data to another simulation, it doesn't have to be the same model, as the data will just be pasted to the matching input-fields.
- You may copy/paste an entire tab of input-data by right-clicking on the tab-name. This only copy/pastes between input-fields with matching names.
- Probability distributions can be copy/pasted either by right-clicking the tab-name, or by clicking the "More" button below the distribution.
For tabs that have many related sub-tabs with probability distributions, e.g. for the future 10 years of earnings, these can all be pushed one step left or right by right-clicking on each distribution's tab-name.
Probability distributions can be tweaked by clicking the "More" button below the distribution, or right-clicking on the tab-name. This lets you make simple modifications to the distribution, e.g. multiply, add, limit, smooth, etc.
Output
A simulation produces many thousands of output values for the random input values, which are plotted so you can easily see the entire probability distribution of the output. Different plot-types are used for different kinds of simulations, as explained here.
This example plot shows a so-called histogram with the simulated Net Present Value of a stock. If you had just estimated the mean value by hand, then you would have been oblivious to the entire range of possible outcomes, including a significant risk of loss.
There are sometimes extreme outliers in the simulation results, which can be removed automatically by setting a slider in the basic simulation settings. The system then removes the outliers by calculating the Inter-Quartile Range (IQR), so the simulation outputs that are too far from the quartiles are removed. This method is robust to skewed distribution.
Video Tutorials
It is recommended that you also watch the video tutorials, which show and explain many more details.