# Monte-Carlo Simulation

Fortune tellers, palm readers, the Farmer’s Almanac, financial analysts. What do these things have in common? They all attempt to anticipate the future. While some use a crystal ball, the ridges of their subject’s palm, or sunspots, financial analysts use numeric models and mathematical techniques to generate simulations of their client’s financial future.

There are two kinds of forecasting models: deterministic models and stochastic models. Deterministic models assume a fixed relationship between the inputs and the output, while stochastic models depends on inputs that are influenced by chance. Deterministic models can be solved analytically via mathematical formulas, while stochastic models require numerical solutions. To solve stochastic models numerically, one must try various values for the model’s parameters and variables. When these variables come from a sequence of random numbers, the solution is called Monte-Carlo simulation.

Monte-Carlo simulation was originally introduced by financial analysts John Von Neumann and Stanislaw Ulam while working on the Manhattan Project at the Los Alamos National Laboratory. They invented a procedure of substituting a random sequence of numbers into equations to solve problems regarding the physics of nuclear explosions. The term Monte-Carlo was inspired by the gambling casinos in Monaco.

Monte-Carlo simulation is performed with a sequence of numbers that are distributed uniformly, are independently of each other, and are random. Random sequences can be generated using mathematical techniques such as the mid-square method, but most spreadsheet software includes random-number generators. It is important to note that most financial analysis applications generate random variables that are not distributed uniformly. In order to perform a Monte-Carlo simulation, the sequence of uniformly distributed random numbers must be transformed into a sequence of normally distributed random numbers.

## Applying Monte-Carlo Simulation to the Stock Market

Imagine we invest \$100,000 to an S&P 500 index fund in which the dividends are then reinvested, and we want to predict the value of that investment 10 years from now. As previously mentioned, we start by generating a series of 10 random numbers that are uniformly distributed. However, we assume that the S&P’s returns are normally distributed and we therefore need to transform our sequence. This transformation can be accomplished easily by applying the Central Limit Theorem.

The following table shows the relative frequencies of two variables, X and Y.

 Value X Y (X+Y)/2 1.0 1/6 1/6 1/36 1.5 0 0 1/18 2.0 1/6 1/6 1/12 2.5 0 0 1/9 3.0 1/6 1/6 5/36 3.5 0 0 1/6 4.0 1/6 1/6 5/36 4.5 0 0 1/9 5.0 1/6 1/6 1/12 5.5 0 0 1/18 6.0 1/6 1/6 1/36

It is clear to see that while neither X nor Y are normally distributed on their own, their average beings to approach a normal distribution. Therefore, we can create a sequence of random numbers that is normally distributed by taking the averages of many sequences of random, uniformly distributed numbers.

 Uniform Sequence Average of 30 Uniform Squences 0.6471 0.4965 0.4162 0.4336 0.5691 0.5747 0.2006 0.4477 0.4685 0.5014 0.7442 0.5126 0.9439 0.4930 0.5556 0.6040 0.2480 0.5267 0.3644 0.4721

Figure 1 shows the relative frequency of both sequences, and we can see from this graph that the average of the 30 uniformly distributed sequences approached a normal distribution.

The next step in Monte-Carlo simulation is to scale the normally distributed sequence so it has a standard deviation of one and a mean of zero. By dividing each observation by 0.05 (the theoretical standard deviation), and then subtracting 10 (the theoretical mean of this sequence) from each other its observations, we can achieve this transformation.