Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Financial Modelling

HANDBOOK

How to perform a
MONTE CARLO
SIMULATION

financialmodellinghandbook.com
ABOUT THE FINANCIAL
MODELLING HANDBOOK
Financial modelling should be collaborative. Collaboration reduces
error, speeds up development time and lowers cost. The Financial
Modelling Handbook is a collaborative, crowd-sourced guide to
building better financial models using the FAST Standard.

www.financialmodellinghandbook.com/contribute
Financial Modelling
HANDBOOK

GERALD
Gerald Strever is a leading expert on financial
modelling and spreadsheet techniques.

He is the Senior Managing Partner at Finance


Training Solutions, specialising in Financial
Strategy, Business Modelling and Company
Valuation.

financialmodellinghandbook.com
Financial Modelling
HANDBOOK

How to perform a
MONTE CARLO
SIMULATION
To simulate is to try to duplicate the features, appearance and characteristics of a real
system.

The idea behind simulation is to imitate a real-world situation mathematically, to study


its properties and operating characteristics, to draw conclusions and make action
decisions based on the results of the simulation.

The real-life system is not touched until the advantages and disadvantages of what
may be a major policy decision are first measured on the system's model.

DOWNLOAD THIS GUIDE AND THE


ACCOMPANYING EXCEL EXAMPLE
Financial Modelling
HANDBOOK

How to perform a
MONTE CARLO
SIMULATION
For performing a simulation, we shall:-

1) Define a problem
2) Introduce the variables associated with the problem
3) Construct a mathematical model
4) Set up possible courses of action for testing
5) Run the experiment
6) Consider the results (perhaps deciding to modify the model or change data
inputs), and
7) Decide what course of action to take.

DOWNLOAD THIS GUIDE AND THE


ACCOMPANYING EXCEL EXAMPLE
Financial Modelling financialmodellinghandbook.com
HANDBOOK

MONTE CARLO SIMULATION


When a problem contains elements that exhibit chance or probability in their behaviour, a
Monte Carlo simulation may be deployed.

The idea behind Monte Carlo simulations is to generate values for uncertain elements in the
model (known as “variables” or “inputs”) through random sampling.

The technique breaks down into simple steps:

1. Identify the variables / inputs in the model where simulation would be helpful.

2. Define a probability distribution curve for each identified variable / input in the model.

3. Using random numbers, simulate values from a probability distribution for each variable
/ input in step 1.

4. Repeat the process for a series of replications (also called “runs” or “trials”) – the more
trials undertaken; the greater the confidence in the result.

5. Analyze the outcomes


Financial Modelling financialmodellinghandbook.com
HANDBOOK

PROBABILITY OF DEMANDS INPUTS

Let us set up the example of a fictitious firm selling automobile tires as our simulation
1 model.

From a study of the previous 60 months, monthly demand for tires is 300, 320, 340,
360, 380 or 400 with specific probabilities for each value. Now let us assume that the
following additional information is known regarding the operating environment.
Financial Modelling financialmodellinghandbook.com
HANDBOOK

GATHER THE DATA

Depending on competitors' prices and other market conditions, this firm estimates
2
that its average selling price per tire each month follows a discrete uniform
distribution between $60 and $80 (in increments of $1).
Financial Modelling financialmodellinghandbook.com
HANDBOOK

GATHER THE DATA

The firm’s variable cost per tire also varies each month depending on material costs
3
and other market conditions. This causes the firm’s average profit margin per tire
(calculated as a percentage of the selling price) to vary each month. Using past
data, the firm estimates that its profit margin per tire follows a continuous uniform
distribution between 20% and 30% of the selling price.

This firm estimates that its fixed cost of stocking and selling tires is $2,000 per
4
month.
Financial Modelling financialmodellinghandbook.com
HANDBOOK

CALCULATING MONTHLY DEMAND

5 Using this information, let us simulate and calculate the firm's average profit per
month from the sale of auto tires.

Cell F46 (labelled “Random number 1”) generates the random number used to
simulate the demand that month.

Formula in F46: = RAND()

Note: rows 49 to 95 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

CALCULATING MONTHLY DEMAND

6 The random number in Cell F46 is used in a LOOKUP function to simulate the
monthly demand in Cell F112.

Monthly demand of tires (Rows 98-103), probabilities (Rows 105-10) and the random
number in cell F97 are used to calculate the monthly demand (in cell F112).

Formula in F112: = LOOKUP(F$97, F105:F110, F98:F103)

Note: rows 49 to 95 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

CALCULATING SELLING PRICE

7 In cell F119, we simulate the average selling price per tire by using the
RANDBETWEEN function (with bottom value = 60 and top value = 80).

The formula in F119: = RANDBETWEEN(F117, F118)


Financial Modelling financialmodellinghandbook.com
HANDBOOK

CALCULATING PROFIT MARGIN

Cell F47 generates the random number used to simulate the average profit margin
8 per tire.

The random number in cell F47 is used to simulate the average profit margin per
9 tire in cell F127. For this, we use the continuous uniform distribution formula, [a +
(b-a) * n] with a = 20% and b = 30%.

The formula in F127: = F125 + (F126 - F125) * F124.

Note: rows 49 to 120 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

CALCULATING MONTHLY PROFIT

10

10
Using these simulated values, the firm’s monthly profit is calculated in cell F136 as -
Profit = (Demand for tires) x (Average selling price per tire) x (Average profit margin
per tire) - (Monthly fixed cost)

Formula in cell F136 is = F132 * F133 * F134 - F135


Financial Modelling financialmodellinghandbook.com
HANDBOOK

MONTHLY PROFITS

This is the result for a single replication of Firm's simulation model.

This result indicates that this firm will earn a profit of $4,334 per month. It is important to
remember, however, that each randomly simulated value only represents something that
could occur. As such, there is no guarantee that the specific values simulated will actually
occur.

Owing to the presence of random numbers, these simulated values will change each time
the model is replicated (they will change each time the F9 key is pressed in Excel). It would
be incorrect to estimate the firm's profit based on just one replication.
Financial Modelling financialmodellinghandbook.com
HANDBOOK

MONTHLY PROFITS

To calculate a firm's average monthly profit, we need to replicate the simulation model
several thousand times. However, in order to keep the size of the resulting Excel files
relatively small, we illustrate only 200 replications.

We then compute summary statistics just from these 200 replications.

It is important to note that 200 replication may not be sufficient for a simulation model to
yield trustworthy results. An average based on just 200 replications might be different each
time we run the simulation model.

Careful thought should be given to how many times a model should be run.
Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE


11

11
We illustrate the use of Data Table to replicate Firm's simulation model 200 times.

The procedure is as follows:

Step 1: We first use 200 cells in an empty column in the spreadsheet to represent
the 200 values of the dummy variable. We can describe the cells E9:E208 as ‘Trial 1’
to ‘Trial 200’ - to indicate we are performing 200 replications

Note: rows 11 to 205 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE

13

12

Step 2:
In the cell adjacent to the first cell in the range E9:E208 (that is, in cell F9), we
12
specify the cell reference for the output measure we want replicated 200 times.

In the model, this corresponds to Cell F136 of ‘Monte Carlo Simulation_Calc’ sheet,
13
the monthly profit value. Hence, the formula in cell F9 would be = 'Monte Carlo
Simulation_Calc'!F136. Leave cells F10:F208 blank. Data Table will fill in these cells
automatically when we run it.

Note: rows 11 to 205 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE


14

Step 3:

We now select the range E9:F208 (that is, both columns).


14

After selecting this range, we choose DataTable (Alt D, T).

The window titled Data Table, is now displayed.

Note: rows 11 to 205 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE


15

Step 4:
Because our Data Table is arranged in columns, we leave the Row input cell box
15
blank.

We then select any arbitrary cell (for example cell F5 that has nothing to do with the
simulation model) and enter this cell reference in the Column input cell box.

It is important to make sure this selected cell has no role to play in the simulation
model. In effect, we are telling Data Table that cell F5 contains our dummy formula.
Note: rows 11 to 205 are hidden for screenshot purposes.
Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE

16

Step 5:
Finally, click OK to run Data Table.
16

The procedure now takes the 200 entries in cells F9:F208, plugs them one at a time
in cell F5, and reports the value of cell F136 of ‘Monte Carlo Simulation_Calc’ sheet
each time in cells F9:F208.

Note: rows 11 to 205 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE

16

Step 5 (continued):
Owing to the presence of random numbers, these simulated values will change each
16
time the model is replicated (that is, they will change each time the F9 key is pressed
in Excel).

Consequently, it is not advisable to estimate a firm's profit based on just one


replication. The formula shown in the screenshot is an array formula generated by
running the data table.

Note: rows 11 to 205 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE

16

Step 5 (continued):

Even though the variable values in cells F9:F208 and the formula in cell F5 are
16
dummies, Excel generates new random numbers for each replication of the model.

The simulated results in cells F9:F208 are therefore different for each replication.

Note: rows 11 to 205 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE

17

Select the range F9:F208, copy it and paste values only. Further analysis should be
17
undertaken based on the captured values, rather than on a live data table.

Note: rows 11 to 205 are hidden for screenshot purposes.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE


18

19
20

Now we can calculate a few outcomes to analyse the scenario:-

‘Average monthly profit’.


18

19 ‘Standard deviation’.

20 Probability that monthly profit will be >= 4000 USD.


Financial Modelling financialmodellinghandbook.com
HANDBOOK

REPLICATION USING A DATA TABLE

We could also calculate several outcomes using the Descriptive Statistics function in
the Analysis Toolpak.

You might also like