Monte Carlo Simulations Using Matlab: Vincent Leclercq, Application Engineer Email: Vincent - Leclercq@
Monte Carlo Simulations Using Matlab: Vincent Leclercq, Application Engineer Email: Vincent - Leclercq@
Monte Carlo Simulations Using Matlab: Vincent Leclercq, Application Engineer Email: Vincent - Leclercq@
Email : [email protected]
® ®
Agenda
2
® ®
90
100
90
80 80
70 70
60 60
50 50
40
30 30
20 20
10 10
0 0
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
One gets
Area Square N N n
Area Lake * Area Square
Area Lake N n N
3
® ®
Take outs
100 100
90 90
80 80
70 70
60 60
50 50
40 40
30 30
20 20
10 10
0 0
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
Results depends on :
Number of simulations
4
® ®
Risk
Structurer
…
5
® ®
General Principles
6
® ®
7
® ®
Good points
Drawbacks
8
® ®
Why MATLAB ?
Efficiency :
Mersenne Twister
Linear algebra
Easy deployment
9
® ®
Agenda
10
® ®
Financial toolbox :
GARCH Toolbox
garchsim
11
® ®
12
® ®
Demo 1:
Geometric brownian motion
Lognormality of equity prices
Annually or Daily
Compare results
13
® ®
Demo 2:
Use the previous paths to price aVanilla option
14
® ®
15
® ®
Agenda
16
® ®
Cholesky factorization
cumsum
17
® ®
Process
18
® ®
Demo
Correlated Equities Simulation
Input :
Time : NDays
Number of different paths : NSimulation
Number of Assets : 2, NAssets with correlation
We know :
Volatility
Correlations
Output :
19
® ®
Agenda
20
® ®
Variance Reduction
Why ?
Solution :
21
® ®
Antithetic Variables
Control Variables
We canuse the close formula (Hulll) in order to compute the variance and the
expected return of the underlying at maturity
We need to estimate the covariance between our control variable (the
underlying) and the variable we want to estimate (option price)
22
® ®
Better Accuracy
23
® ®
Principle:
Var(E[X]) < Var(E[X |Y])
At time T1, one can exercise a put or call at time T2, with a given strike
At time T1, one can use Black Scholes closed formula to compute the call and put
price -> Reduced Variance
Other techniques :
Importance sampling
Stratified sampling
24
® ®
Demonstration
Vanilla option pricing using Variance Reduction
Antithetic Variables
Control Variable
Results comparison
25
® ®
Confidence intervals
26
® ®
General Conclusion
27
® ®
Bibliography used
http://www.puc-rio.br/marco.ind/quasi_mc.html
28
® ®
Questions ?
29