Walkthrough

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 31

Page 1 Welcome

Thanks for installing the RiskAMP Add-in. We hope


you'll find it's a very valuable tool in modeling and risk
analysis.

The next few pages will introduce you to the functions


and features of the RiskAMP Add-in - how to use it,
what it does, and what's new in the latest release.

On each page, we'll introduce some new functions.


Every function we have is just a normal Excel function,
so feel free to click around or make changes to see
what's happening.

Click the "Next Page" button to get started!

Back Next Page


Table of Contents

Welcome 1
The Basics 2
Running a Simulation 3
Building a Model 4
Deriving Statistics 5
Building a Table 6
Creating Charts 7
Review 8
Summary 9
QuickView 10
Correlation 11
Multivariate Distributions 12
Correlation Matrices 13
Configuration Options 14
Latin Hypercube Sampling 15
Saving Simulation Data 16
More Information 17
Page 2 RiskAMP: The Basics

Everything in RiskAMP is done with spreadsheet


functions. To create a random variable, just enter a
function in a cell. The cell to the right uses the function
"NormalValue".
Random variable function:
94.11816
For the basic distributions, you can also create random
variables using the Insert Distribution button on the
Monte Carlo tab.
Statistics function (average):
#NAME?
To see the results of a simulation, enter one of the
statistics functions in another cell. The cell to the right
shows the mean (or average) value of the random cell
above.

The statistics function shows an error value, "#N/A".


That's because we haven't yet run a Monte Carlo
simulation.

Back Next Page


Page 3 RiskAMP: The Basics

To run a simulation, open the "Monte Carlo" tab on the


Excel ribbon.

Click the button "Run Simulation" on the tab. It's the Random variable function:
button with the big green arrow. That will open the
simulation dialog. 119.0092

When the simulation dialog is open, click "Start". You'll Statistics function (average):
see the progress of the simulation and when it's done,
you'll see that the average - in the cell to the right - #NAME?
now has a value.

Our random variable has a mean of 100, so the average


value should be somewhere near - but not exactly -
100.

Back Next Page


Page 4 RiskAMP: The Basics Opening Balance

For most applications, Monte Carlo simulation is useful Year Return


when you look at the result of a number of random
variables. 1 19.04%
2 25.00%
3 7.64%
For example, in the cells to the right we're showing a 4 -5.89%
stock portfolio over ten years. We have a starting
balance; then in each year, there's a return; and finally 5 4.57%
after 10 years we have a closing balance. 6 14.35%
7 -2.22%
8 10.22%
9 -2.05%
In each year, the "Return" value is a random variable - 10 -11.33%
in this case, a normally-distributed value using the
"NormalValue" function.
Closing Balance

At the end, we use statistics functions to see statistics Average Closing Balance
from the simulation.
Minimum Closing Balance
Maximum Closing Balance
Back Next Page
1,000,000

Gain (Loss) Closing Balance


190,446 1,190,446
297,578 1,488,024
113,758 1,601,782
(94,305) 1,507,477
68,930 1,576,407
226,144 1,802,551
(40,097) 1,762,454
180,180 1,942,634
(39,917) 1,902,717
(215,563) 1,687,154

1,687,154

1,698,065

710,676
3,793,368
Page 5 RiskAMP: The Basics Opening Balance

When you run a simulation, you can look at all kinds of Year Return
statistics to understand the risk involved. With our
basic portfolio model, we'll look at the distribution of 1 19.04%
returns. 2 25.00%
3 7.64%
4 -5.89%
For example, we might want to know "what is the 5 4.57%
likelihood that the closing balance will be below the
opening balance (less than 1 million)?" 6 14.35%
7 -2.22%
8 10.22%
Or, "what is the probability the closing balance will be 9 -2.05%
greater than 2 million (double the starting balance)?"
10 -11.33%

Closing Balance
We can do this with the "SimulationInterval" function.
This function answers the question "what portion of
the simulation falls within some range?" Average Closing Balance

Minimum Closing Balance


Maximum Closing Balance
Back Next Page
1,000,000 Analysis

Gain (Loss) Closing Balance What is the probability that the closing balance
190,446 1,190,446 will be less than 1 million?
297,578 1,488,024
113,758 1,601,782 4.20%
(94,305) 1,507,477
68,930 1,576,407 What is the probability that the closing balance
226,144 1,802,551 will be greater than 2 million?
(40,097) 1,762,454
180,180 1,942,634 24.40%
(39,917) 1,902,717
(215,563) 1,687,154

1,687,154

1,698,065

710,676
3,793,368
Page 6 RiskAMP: The Basics Opening Balance

The "SimulationInterval" function shows you the Year Return


number of times, during the simulation, the value fell
within the range. 1 19.04%
2 25.00%
3 7.64%
So we can also use this function to create a table. 4 -5.89%
Here, the table shows a number of ranges and uses the
"SimulationInterval" function to show the percentage 5 4.57%
of results that fell within each range. 6 14.35%
7 -2.22%
8 10.22%
Creating a table like this is easy using copy and paste. 9 -2.05%
And because these are just Excel functions, we can use
the table to create a graph (on the next page). 10 -11.33%

Closing Balance

Average Closing Balance

Minimum Closing Balance


Maximum Closing Balance
Back Next Page
1,000,000 Analysis

Gain (Loss) Closing Balance From To Result


190,446 1,190,446 400,000 600,000 0%
297,578 1,488,024 600,000 800,000 0%
113,758 1,601,782 800,000 1,000,000 4%
(94,305) 1,507,477 1,000,000 1,200,000 8%
68,930 1,576,407 1,200,000 1,400,000 18%
226,144 1,802,551 1,400,000 1,600,000 16%
(40,097) 1,762,454 1,600,000 1,800,000 18%
180,180 1,942,634 1,800,000 2,000,000 11%
(39,917) 1,902,717 2,000,000 2,200,000 9%
(215,563) 1,687,154 2,200,000 2,400,000 7%
2,400,000 2,600,000 3%
1,687,154 2,600,000 2,800,000 3%
2,800,000 3,000,000 1%
1,698,065 3,000,000 3,200,000 1%
3,200,000 3,400,000 0%
710,676
3,793,368
Page 7 RiskAMP: The Basics Analysis

Here's a chart based on the table. This is just a From To


standard Excel chart, based on the values in the
"Result" column (Column K). 400,000 600,000
600,000 800,000
800,000 1,000,000
To make this even easier, there's a wizard on the 1,000,000 1,200,000
"Monte Carlo" tab of the Excel ribbon that can
automatically create tables and charts using standard 1,200,000 1,400,000
Excel functions. 1,400,000 1,600,000
1,600,000 1,800,000
1,800,000 2,000,000
That's the "Histogram and Chart Wizard". It can create 2,000,000 2,200,000
histograms with just a few clicks.
2,200,000 2,400,000
2,400,000 2,600,000
Tables and charts will update every time you run a 2,600,000 2,800,000
simulation. You can watch this happen, but it's very
slow - run a simulation and check the "allow screen 2,800,000 3,000,000
updates" box. 3,000,000 3,200,000
3,200,000 3,400,000

Back Next Page


20%

Result 18%
0%
16%
0%
4% 14%
8%
12%
18%
16% 10%
18%
8%
11%
9% 6%
7%
4%
3%
3% 2%
1%
0%
1% 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0% 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
6 8 0 2 4 6 8 0 2 4 6 8 0 2 4
1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3,
Page 8 RiskAMP: The Basics (1) Start with some random values:

The statistics functions can analyze any cell in a Age 29


spreadsheet, not just cells containing random value
functions. Height 154.3
Mass 52.2

In most cases, a model will start with some random (2) Do some calculations:
values, do additional calculation, and generate one or
more results using Excel functions. You can use the
statistics functions to get insights into the model. … 0.34

(3) Look at statistics:

You can also look at interim statistics through the Mean 0.32
model to get a sense of how variables interact.
Median 0.31

You can get access to every value generated during the 10th Percentile 0.22
simulation, to do additional analysis, with the
SimulationValue and SimulationValuesArray functions. 90th Percentile 0.43
See our website for more information.

Back Next Page


160

140

120

100

80

60

40

20

0
0 6 1 2 1 8 24 3 0 36 4 2 4 8 54 60 6 6 72 78 8 4 90
0 . 0 . 0. 0. 0 . 0. 0 . 0 . 0. 0. 0 . 0. 0. 0 . 0.
Page 9 Summary

That's pretty much all you need to know to get started.


Just insert functions into your spreadsheet, and click
"Run Simulation" to run a Monte Carlo simulation.

To see a list of all the available functions, click the


"insert function" button (the f(x) right next to the text
bar at the top of the worksheet).

There are two categories for RiskAMP: the random


distribution functions, and the statistics functions.
Select any one of those functions to get more
information about the parameters you need.

Next, we'll walk through some additional features and


configuration options.

Back Next Page


Page 10 QuickView

QuickView is a way to quickly see the distribution of


values for a cell in your spreadsheet. Select cell I5 and
click "QuickView" on the Monte Carlo tab. 26.71826 << Select the cell to the left, then clic

QuickView charts are standard Excel charts, with some


extra formatting. You can paste them into your
spreadsheet, and they will update every time you run a
simulation.

Try pasting a QuickView chart: select cell I5, click


QuickView, and then click the "Paste" button at the
bottom.

You can even customize the look and feel of QuickView


charts - see our website for more information.

Back Next Page


ct the cell to the left, then click "Quick View" on the ribbon.
Page 11 Correlation View 1.00
0.50 1.00
Correlation view is a tool that lets you see the 0.65 0.30 1.00
correlation between two cells with just a few clicks.
Correlated values: -1.72

The sheet on the right has thee variables that are


correlated (we will talk more about generating
correlated values in a moment).

Select cell K6. Click "View Correlation" on the Monte


Carlo tab. Then click cell L6.

Like QuickView charts, Correlation charts can be pasted


into spreadsheets, and will update every time you run a
simulation. Correlation charts can also be customized
with your look and feel.

Back Next Page


1.26 -1.62
Page 12 Multivariate Distribution Correlation Matrix
A B
Multivariate distributions are random distributions with A 1.00
multiple samples, which have a defined internal
correlation. B 0.33 1.00
C 0.25 0.30
D -0.12 -0.20
To create a multivariate distribution, you need a
correlation matrix. The correlation matrix describes
internal cross-correlation among the individual Multivariate Distribution
distributions.
Mean Std.Dev
0.00 1.00
The individual distributions are then created in a table 1.00 1.00
(either a row or column).
2.00 1.00
3.00 1.00
The multivariate distribution functions are all prefixed
with Multivariate (Multivariate.Beta,
Multivariate.Normal, etc). You can mix individual
distribution types.

Back Next Page


C D

1.00
-0.15 1.00

ate Distribution

Sample
-0.58
-0.30
3.49
3.84
Page 13 Multivariate Distribution Correlation Matrix
A B
The correlation matrix must be symmetrical (or you can A 1.00
leave out the upper-triangular, as here).
B 0.60 1.00
C 0.60 0.60
The matrix must also be positive-definite. If not, you D -0.50 0.50
will get #VALUE errors when you try to create the
distribution.
Multivariate Distribution

The Correlation Matrix tool on the Monte Carlo tab can Mean Std.Dev
be used to check if a matrix is positive-definite, and if
nessary, make small changes. 0.00 1.00
1.00 1.00
2.00 1.00
Select the entire correlation matrix (cells J4:M7), then 3.00 1.00
click Correlation Matrix on the Monte Carlo tab. If you
accept the solution, you'll see the #VALUE errors go
away. You can use Undo (Ctrl+Z) to revert the changes.

Back Next Page


C D

1.00
-0.50 1.00

ate Distribution

Sample
#NAME?
#NAME?
#NAME?
#NAME?
Page 14 Configuration

The next few pages will describe configuration options.


These options are only available in the Professional
version of the add-in.

To access the configuration options, click the Advanced


Properties button on the Monte Carlo tab.

Back Next Page


Page 15 Configuration -4.00 0 0
-3.50 0 0
Latin Hypercube Sampling (LHS) -3.00 1 1
-2.50 2 3
Latin-hypercube sampling is a method for sampling -2.00 8 5
random numbers which produces better distributions
over smaller numbers of samples. -1.50 23 18
-1.00 45 53
-0.50 75 64
The tables at right were generated using a normal 0.00 96 114
distribution with and without Latin Hypercube
sampling, with 500 samples. You can see the difference 0.50 95 101
in the resulting histograms. 1.00 75 75
1.50 46 37
2.00 22 22
Latin hypercube sampling will also be used in 2.50 9 5
multivariate distributions when the option is selected.
3.00 3 1
3.50 0 1
4.00 0 0

Back Next Page


With LHS
100

90

80

70

60

50

40

30

20

10

0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0
-4 -3 -3 -2 -2 -1 -1 -0 0 0 1 1 2 2 3 3 4

Without LHS
120

100

80

60

40

20

0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0 .5 .0
-4 -3 -3 -2 -2 -1 -1 -0 0 0 1 1 2 2 3 3 4
Page 16 Configuration

Saving Simulation Data

Normally, simulation data is lost when you close a


spreadsheet. Set this option to save simulation data
with the spreadsheet. Note that this may considerably
increase the size of your file.

Calculating Multiple Workbooks

By default, when you run a simulation only the current


active workbook will be recalculated. Other workbooks
in the background will not.

If you need multiple workbooks to recalculate, set this


option. Note that it may increase the time required to
run the simulation.

Back Next Page


Page 17

Now you know how the RiskAMP Add-in works, what 1


you can do with it, and how to use the tools to make
building simulations faster and easier.

2
If you're new to Monte Carlo simulation, some of this
can be a little confusing. Be sure to check the example
files, and visit our website for more examples and more
information.
3

Back Next Page


For more information:

Check the installed example files. These are installed in the Start menu
(or Start Screen), under "Programs" -> "RiskAMP" -> "Examples".

Check our website. There are more examples and some articles and
documents on the library page, available at
http://www.riskamp.com/library

We're building a knowledge base on the website; it's searchable and may
have the answer to your question.
http://www.riskamp.com/kb

For anything else, questions, comments, feedback, or anything you'd


prefer to ask us directly, please send us an email at
[email protected]
Page 18

Back Next Page


Table of Contents

Welcome 1
The Basics 2
Running a Simulation 3
Building a Model 4
Deriving Statistics 5
Building a Table 6
Creating Charts 7
Review 8
Summary 9
QuickView 10
Correlation 11
Multivariate Distributions 12
Correlation Matrices 13
Configuration Options 14
Latin Hypercube Sampling 15
Saving Simulation Data 16
More Information 17

You might also like