MONTE CARLO SIMULATION
Topics• History of Monte Carlo Simulation• GBM process• How to simulate the Stock Path in Excel,• Monte Carlo simulation and VaR
History of the Monte Carlo• http://www.youtube.com/watch?v=ioVccVC_Smg
Markov Property• A Markov process is a particular type of stochastic
process where only the present value of a variable is relevant for predicting the future
Continuous-Time Stochastic Process• Suppose a variable follow a Markov stochastic process and its
current value is 10. Suppose further that its value during 1 year is
• What is the probability of the change in the value during 2 year?......Ans. Because of the Markov process (independent distribution), the distribution
• What is the prob. of change during 6 months?….• Generally, the change during a very short time period ∆t) but note
that the variances of changes are additive but the standard deviations are not additive. Variance in 2, 3 years are 2 and 3 but the standard deviation are 2 and 3
𝑋 ∅ (0 ,1)
𝑋 ∅ (0 ,2)
Wiener Process• Wiener process is a particular type of Markov process. In
physics, it is called as Brownian motion• If a variable z follows wiener process it must follow two
properties• Property 1. The change in ∆z during a small time ∆t is
t
Where has a standardized normal distribution
• Property 2. The value of ∆z for any two different short intervals of time ∆t are independent, thus
• Mean of ∆z = 0,• Standard deviation of ∆z = • Variance of ∆z = t
The second property implies that z follows Markov process
Graphically
∆ 𝑧 1 ∆ 𝑧 2 ∆ 𝑧 3 ∆ 𝑧 5∆ 𝑧 4
t ttt t
Generalized Wiener Process
• dS = a(S
• ,mean change per unit of time is known as drift rate and the variance per unit is called as the variance rate)dt + b(S, t)dz
dx = adt + bdzdx = a(S, t )dt + b(S, t)dz
Example
• Suppose stock price follow the process of
dx = adt or dx/dt = a
Integrating with respect to time, we get
x = x0 + at
- Where x0 is the value of x at time 0. In a period of time of length T, the variable x increase by an amount of aT
- bdz is regarded as noise or variability term added to the path of x
- Wiener process has a standard deviation of 1.0. so, b times a Wiener process has a standard deviation of b.
Stock price process: with out volatile
If the volatility of stock price is zero, thenWhen
Or,
Integrating between 0 and time T, we get
Meaning that the stock price grow at a continuous compound rate of
Stock price process with volatile
+
Or,
+
For the discrete time,
+
Return of stock price is normal distributed as;
(
Change of x at small time changes and in time interval T
• has a standard normal distribution. has a normal distribution with
mean of =
variance of =
standard deviation of = • So, change in value of x in any time interval T
mean of =
variance of = standard deviation of =
Log normal return• When a log of any variable distribute as normal, we call it
as lognormal distribute. We can show that the Log of returns is normally distributed as
• Or
Fundamentals of Futures and Options Markets, 4th edition © 2001 by John C. Hull 11.14
The Lognormal Property
• These assumptions imply ln ST is normally distributed with mean:
and standard deviation:
• Because the logarithm of ST is normal, ST is lognormally distributed
TS )2/(ln 20
T
TS )2/(ln 20
Fundamentals of Futures and Options Markets, 4th edition © 2001 by John C. Hull 11.15
The Lognormal Propertycontinued
where m,s] is a normal distribution with mean m and standard deviation s
TTS
S
TTSS
T
T
,)2(ln
or
,)2(lnln
2
0
20
Fundamentals of Futures and Options Markets, 4th edition © 2001 by John C. Hull 11.16
The Lognormal Distribution
E S S e
S S e e
TT
TT T
( )
( ) ( )
0
02 2 2
1
var
Monte Carlo Simulation (See Excel)• Suppose X follow the Wiener Process
Suppose Find the path of X using Excel• To generate random variables using Excel
Normsinv (rand())
* Note that rand() function generate the variables drawn from the uniform distribution, but to keep it simple just use it to generate ‘Z’.
Monte Carlo Simulation (See Excel)
1
-10
0
10
20
30
40
50
60
70
80
valu
e o
f x