Stock price simulation

Stock price simulation

In the article Cholesky decomposition is shown how to deal with correlation between two or more underlyings to get correlated random variables.
The decomposition is used in Monte Carlo process which also requires valuation algorithm with the mathematical construction of the geometric Brownian motion.
Brownian motion is a stochastic process and shows the same behaviour as a stock price movements.

In this article, for simplicity sake, Excel with RAND() function will be used to make a simple Monte Carlo for 4 underlyings but some Excel’s limitations should be taken into account:
1. It can be slow if number of paths increase.
2. The Wichmann–Hill generator in Excel 2007 does not really fulfill the basic requirements, such as standard randomness test and independence of generated numbers.

Therefore it is better to use other programs like Matlab, or use at least Excel Analysis ToolPack function RANDBETWEEN() to generate pseudo-random variables.
Why geometric Brownian motion is used in the Monte Carlo process? Let us see from the very beginning.

Brownian motion(Wiener process)
Brownian motion is a limit of a random walk, an example is a drunk guy is going home making one step towards home and another step away from home. All these steps are along the same straight line.
The initial value of the process is 0 and all steps have the same probability. The i-th step is defined as follows:

Brownian motion


where the distance between two jumps is equal to 1/n, Up and Down jumps are equal and both of size sqrt(1/n) , having the same probabiltiy.
X is a binomial variable that can be 1 or -1.
Now, the first three steps of Brownian motion is possible to calculate.

Brownian steps

Mathematics behind the scheme according to the formula above is as follows:
3/sqrt(n) = 2/sqrt(n)+1/sqrt(n); because the previous step was 2/sqrt(n) and X increased by 1.
The same logis we follow with the rest of the numbers.
1/sqrt(n)=2/sqrt(n)-1/sqrt(n)
1/sqrt(n)=0+1/sqrt(n)
-1/sqrt(n)=0-1/sqrt(n)
-1/sqrt(n)=-2/sqrt(n)+1/sqrt(n)
-3/sqrt(n)=-2/sqrt(n)-1/sqrt(n)

Brownian motion, as a process, has three main properties such as Continuity, Normality and Markov property.
In Markov processes future price movements depend only on where we are but not on the history so successive periods of time are independent.
This means that variances are additive.
Usually, a single stock is characterized by its mean μ and volatility σ.
In order to make our Brownian motion applicable for any kind of stock we need to make a general form – Generalized random walk also known as Brownian motion with drift or Arithmetic Brownian motion.
If we know μ and σ, the process has the following form:

Brownian motion with drift

𝑊𝑡 is our Brownian motion described above.
Taking into account that the motion has Normal distribution, 𝑊𝑡 equals e*sqrt(t), where “e” is a random number drawn from a normal distribution.
The infinitesimal form is:

Brownian motion with drift and random number

The key to the stock price modelling is a stock return that can be devided into two parts, namely predictable with some constant return and an unpredictable stochastic part. These two parts should be of cause proportional to the stock price. Here it is:

Brownian motion with drift

This form of the process above is known as Geometric Brownian motion, it is said that stock price follows Geometrical Brownian motion.
Now, the model is the sum of deterministic predictable function of time and stochastic part that reflects the random changes in stock price on a small time interval dt.
An analytical formula for the price of underlying asset at time t is found by applying Ito’s Lemma.


Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “Stock price simulation