Monte Carlo Methods in Finance
Author: Yiyang Yang
Advisor: Pr. Xiaolin Li, Pr. Zari Rachev
Department of Applied Mathematics and Statistics State University of New York at Stony Brook
October 2, 2012
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Outline
1
Introduction
2
Implement of Monte Carlo Method Generating Random Numbers Generating Random Variables Generating Sample Path
3
Techniques for Elaborate Simulation Variance Reduction Techniques Quasi Monte Carlo Method
4
Example of Pricing European Options Black-Scholes Equations
Monte Carlo Simulations for Option Pricing
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction
Background History:
John von Neumann, Stainslaw Ulam and Nicholas Metroplis Manhattan Project in Los Alamous National Laboratory Monte Carlo Casino, Monaco
Monte Carlo methods:
experimental mathematics
large number of random variable simulation strong law of large numbers
the sample average converges almost surely to the expected value
X¯n= X1+ · · · + Xn
n
a.s.→ µ n → ∞ i .e.
P
n→∞lim X¯n= µ
= 1.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Introduction (Cont.)
Two broad classes of Monte Carlo methods:
Direct simulation of a naturally random system
Operations research (inventory control, hospital management) Statistics: properties of complicated distribution
Finance: models for stock prices, credit risk
Physical, biology and social science: models with complex nondeterministic time evolution
Adding artificial randomness to a system, then simulating the new system
Solving some partial differential equations
Markov chain Monte Carlo methods: for problems in statistical physics and in Bayesian statistics
Optimization: “travelling salesman”, “genetic algorithms”
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Example
Objective: integral
α = ˆ1
0
f (x ) dx = E [f (U)]
U uniformly distributed between 0 and 1
Get points U1, U2, · · · independently and uniformly from [0, 1]
The Monte carlo estimate
ˆ αn=1
n
n
X
i =1
f (Ui)
If f is integrable over [0, 1], by strong law of large numbers ˆ
αn→ α with probability 1 as n → ∞
The error αn− α is approximately normally distributed with mean 0 and standard deviationσf/√n, whereσf2=´1
0(f (x ) − α)2dx and can be approximated by smaple standard deviationsf =
q 1 n−1
Pn
i =1(f (Ui) − ˆαn)2
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Principles of Derivative Pricing
Principles of theory for Monte Carlo
If a derivative security can be perfectly replicated through trading in other assets, then the price of the derivative security is the cost of the replicating trading strategy.
Discounted asset prices are martingales under a probability measure associated with the choice of discount factor. Prices are expectation of discounted payoffs under such martingale measure.
In a complete market, any payoff can be realized through a trading strategy and the martingale measure associated with the discount rate is unique.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Random Number Generator
A generator of genuinely random numbers has the mechanism for producing random variables U
1, U
2, · · · such that
each Ui is uniformly distirbuted between 0 and 1 the Ui are mutually indepedent
A random number generator produces a finite sequence of numbers u
1, u
2, · · · , u
Kin the unit interval
pseudorandom number generator
not real random number, only mimics randomness
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Generating Random Numbers Generating Random Variables Generating Sample Path
Linear Congruential Gnerators
Definition
The general linear congruential generator proposed by Lehmer takes the form
x
i +1= (ax
i+ c) mod m, u
i +1= x
i +1m .
a, c, m are integer constants that determine the value generated.
Initial value x
0is called seed.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Inverse Transform Method
Definition
In order to sample from a cumulative distribution function F , i.e.
generate a random variable X with the property that P (X ≤ x ) = F (x ) for all x . The inverse transform method sets
X = F−1(U) , U ∼ Unif [0, 1]
where F−1 is the inverse of F and Unif [0, 1] denotes the uniform distribution on [0, 1].
Proof sketch: P (X ≤ x ) = P F−1(U) ≤ x = P (U ≤ F (x)) = F (x) Example: The exponential distribution with mean θ has distribution
F (x ) = 1 − e−x/θ, x ≥ 0.
Inverting the exponential distirbution yields X = −θ log (1 − U) and can be implemented as
X = −θ log (U) .
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Generating Random Numbers Generating Random Variables Generating Sample Path
Acceptance-Rejection Method
Definition
In order to generate random variable X with density function f (x ), we first generate X from distribution g (x ). Then generate U from Unif [0, 1]. If U ≤
f (X )/
cg (X ), this is the expected X ; else, repeat above steps.
Proof sketch:
Let Y be a sample returned by the algorithm and observe that Y has the distribution of X conditional on U ≤f (X )/cg (X ). For any A ⊆ R
P (Y ∈ A) = P (X ∈ A |U ≤f (X )/cg (X ))
=P (X ∈ A, U ≤f (X )/cg (X )) P (U ≤f (X )/cg (X )) P (X ∈ A, U ≤f (X )/cg (X )) =´
A f (x )
cg (x )g (x ) dx =c1´
Af (x ) dx P (U ≤f (X )/cg (X )) =´
R f (x )
cg (x )g (x ) dx = 1c P (Y ∈ A) =´
Af (x ) dx conclusion proved.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Brownian Motion
Definition
A standard one-dimensional Brownian motion on [0, T ] is a stochastic process {W (t) , 0 ≤ t ≤ T } with following properties:
W (0) = 0;
The mapping t → W (t) is a continuous function;
The increments
W (t1) − W (t0) , W (t2) − W (t1) , · · · , W (tk) − W (tk−1) are independent for any k and any 0 < t0< t1< · · · < tk≤ T ; W (t) − W (s) ∼ N (0, t − s) for any 0 < s < t < T .
Simulation of Brownian Motion
Based on the stationary and independent increment properties, generate n independent and identically distributed random variable B1, · · · , Bnsuch that Bi ∼ N 0,Tn , i = 1, · · · , n.
Define ˆW kTn = Pki =1Bi, then as n → ∞, ˆW is an appropriate of W .
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Generating Random Numbers Generating Random Variables Generating Sample Path
Brownian Motion (Cont.)
0 20 40 60 80 100 120
−0.3
−0.2
−0.1 0 0.1 0.2 0.3 0.4
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Geometric Brownian Motion
Definition
A stochastic process S (t) is a geometric Brownian motion if log S (t) is a Brownian motion with initial value log S (0).
Geometric Brownian motion is the most fundamental model of the value of a financial asset.
Suppose W is a standard Brownian motion and a geometric Brownian motion process is often specified by an SDE
dS (t)
S (t) = µdt + σdW (t) By Itˆo formula, we have
d (log S (t)) =
µ −1
2σ2
dt + σdW (t)
and if S has initial value S (0) then S (t) = S (0) exp
µ −1 2σ2
t + σW (t)
.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Generating Random Numbers Generating Random Variables Generating Sample Path
Geometric Brownian Motion (Cont.)
0 20 40 60 80 100 120
0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
The Stratified Sampling
Definition
Stratified sampling refers broadly to any sampling mechanism that constrains the fraction of observations drawn from specific subsets of the sample space.
Let A1, · · · , Ak be disjoint subsets of the real line for which P (Y ∈ ∪iAi) = 1, then
E [Y ] =
K
X
i =1
P (Y ∈ Ai) E [Y |Y ∈ Ai] =
K
X
i =1
piE [Y |Y ∈ Ai]
Decide in advance what fraction of the sample should be drawn from each stratum Ai and the theoretical probability pi = P (Y ∈ Ai)
An unbiased estimator of E [Y ] is provided by Y =ˆ
K
X
i =1
pi
1 ni
ni
X
j =1
Yij= 1 n
K
X
i =1 ni
X
j =1
Yij
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Variance Reduction Techniques Quasi Monte Carlo Method
Stratified Sampling (Cont.)
comparison of stratified sample (left) and random sample (right)
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Antithetic Variates
Definition
The method of antithetic variates attempts to reduce variance by introducing negative dependence between pairs of replications.
U and 1 − U are both uniformly distributed over [0, 1]
F−1(U) and F−1(1 − U) both have distribution F and are mutually antithetic.
Implement of the antithetic variates method:
the pairs Y1, ˜Y1
,
Y2, ˜Y2
, · · · ,
Yn, ˜Yn
are i .i .d . each Yi and ˜Yi have same distribution and Cov
Yi, ˜Yi
< 0 Monte Carlo estimate is ˆY =2n1 Pn
i =1
Yi+ ˜Yi
Var ˆY
=1 nVar
n
X
i =1
Yi+ ˜Yi
2
=1 2
Var (Y1) + Cov Y1, ˜Y1
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Variance Reduction Techniques Quasi Monte Carlo Method
Importance Sampling
Definition
Compute an expectation under a given probability measure Q of a random variable X , there is another measure ˜Q equivalent to Q such that
EQ[X ] = EQ˜
XdQ
d ˜Q
.
define Radon-Nikodym derivative L = dQ
d ˜Q and measure ˜Q is called an importance measure which give more weight to important outcomes.
Theorem
Let Q∗be define by
dQ∗ dQ = |X |
E |X |
the importance sampling estimator ZL∗under Q∗ has a smaller variance than the estimator ZL under any other ˜Q.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Quasi Monte Carlo Method
Definition
Quasi Monte Carlo method is a method numerical integration and solving some problems using low-discrepancy sequences (or quasi-random sequence or sub-random sequences)
Properties of Quasi Monte Carlo Method
Quasi Monte Carlo method make no attempt to mimic randomness, but to generating points evenly distributed.
Accelerate convergence of ordinary Monte Carlo method from O
√1 n
to Quasi Monte Carlo method O 1n.
Example: Suppose the objective is to calculate
E [f (U1, · · · , Ud)] = ˆ
[0,1)d
f (x ) dx ≈ 1 n
n
X
i =1
f (xi)
for carefully and deterministically chosen points x1, · · · , xnin [0, 1)d.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Black-Scholes Equations
Monte Carlo Simulations for Option Pricing
European Option
Definition
An option is a derivative financial instrument that specifies a contract between two parties for future transaction on an asset at a reference price (the strike).
The buyer of the option gains the right, but not the obligation, to engage in the transaction, while the seller incurs the corresponding obligation to fulfill the transaction.
An option conveys the right to buy something is called a call option; an option conveys the right to sell something is called a put option.
The reference price at which the underlying asset may be traded is called strike price or exercise price.
Most options have an expiration date and if it is not exercised by the expiration date, it becomes worthless.
A European option may be exercised only at the expiration date of the option.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Black-Scholes Equations
Black-Scholes model of the market follows these assumptions:
There is no arbitrage opportunity.
The stock price follows a geometric Brownian motion with constant drift and volatility.
It is possible to borrow and lend cash at a known constant risk free interest rate.
It is possible to but and sell any amount, even fractional of stock.
The transactions do not incur any fees or costs and underlying security does not pay a dividend.
Definition
The Black-Scholes equation is a partial differential equation which describes the price of the option over time:
∂V
∂t +1
2σ2S2∂2V
∂S2 + rS∂V
∂S − rV = 0.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Black-Scholes Equations
Monte Carlo Simulations for Option Pricing
Black-Scholes Solution
The value of a call option for a non-dividend paying underlying stock in terms of Black-Scholes parameter is
C (S, t) = N (d1) S − N (d2) Ke−r (T −t)
d1= ln
S K
+
r +σ22
(T − t) σ√
T − t
d2= ln
S K
+
r −σ22
(T − t) σ√
T − t = d1− σ√ T − t.
The price of a corresponding put option based on put-call parity is P (S, t) = Ke−r (T −t)− S + C (S, t) = N (−d2) Ke−r (T −t)− N (−d1) S.
N (·) is the cumulative distribution function of the standard normal distribution.
T − t is the time to maturity.
S is spot price of the underlying asset and K is strike price.
r is the risk free rate and σ is the volatility of the returns.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Numerical Scheme
With boundary conditions
C (0, t) = 0 for all t, C (S , t) → S as S → ∞, C (S , T ) = max {S − K , 0}
corresponding numerical schemes can be developed.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Black-Scholes Equations
Monte Carlo Simulations for Option Pricing
No-Arbitrage Pricing Formula
Non-Arbitrage Pricing Formula
Price of a European option can be obtained by the expectation of the present value of the payoff for the options under the equivalent martingale measure Q. That is, at time t < T , the non-arbitrage price of a European option Vt with the payoff Π(T ) and the maturity T is obtained by
Vt = e−r (T −t)EQ[Π(T )|Ft] .
Consider European call option, then Π(T ) = (ST− K )+. Then we have
C (St, t) = e−r (T −t)EQ(ST− K )+|Ft
and the stock price follows geometric Brownian motion dSt
St
= µdt + σdWt.
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Monte Carlo Simulation
Simulate N (about ten thousands scale) paths of Si, i = 1, · · · , N Every path Si is genererated from time t to T step by step
Sk= Sk−1exp
µ −1 2σ2
4t + σW4t
, W4t ∼ N (0, 4t)
Start from Si0= St, i = 1, · · · , N we have N paths ended with S
T −t 4t
i ,
then the simulated Monte Carlo result of call option can be approximated as
C (St, t) ≈ 1 N
N
X
i =1
S
T −t 4t
i − K
+
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
Introduction Implement of Monte Carlo Method Techniques for Elaborate Simulation Example of Pricing European Options
Black-Scholes Equations
Monte Carlo Simulations for Option Pricing
Monte Carlo Simulation (Cont.)
0 0.2 0.4 0.6 0.8 1
1 1.2 1.4 1.6 1.8 2 0
0.2 0.4 0.6 0.8
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance
References
Paul Glasserman, Monte Carlo Methods in Financial Engineering, Springer, ISBN-10: 0387004513, ISBN-13:
978-0387004518, August 2003
Phelim P. Boyle, Options: A Monte Carlo Approach, Journal of Financial Economics 4(1977) 323-338
Phelim Boyle, Mark Broadie, Paul Glasserman, Monte Carlo Methods for Security Pricing, Journal of Economic Dynamics and Control 21(1997) 1267-1321
Yiyang Yang (Advisor: Pr. Xiaolin Li and Pr. Zari Rachev) Monte Carlo Methods in Finance