Download presentation
Presentation is loading. Please wait.
1
FE-W http://pluto.mscc.huji.ac.il/~mswiener/zvi.html EMBAF Zvi Wiener mswiener@mscc.huji.ac.il 02-588-3049 Financial Engineering
2
FE-W http://pluto.mscc.huji.ac.il/~mswiener/zvi.html EMBAF Monte Carlo Simulations
3
Zvi WienerFE-Monte Carlo slide 3 Plan 1. Monte Carlo Method 2. Variance Reduction Methods 3. Quasi Monte Carlo 4. Permuting QMC sequences 5. Dimension reduction 6. Financial Applications simple and exotic options American type prepayments
4
Zvi WienerFE-Monte Carlo slide 4 Monte Carlo
5
Zvi WienerFE-Monte Carlo slide 5 Monte Carlo
6
Zvi WienerFE-Monte Carlo slide 6 Monte Carlo
7
Zvi WienerFE-Monte Carlo slide 7 Monte Carlo
8
Zvi WienerFE-Monte Carlo slide 8 Generating Normal Variables Very simple method of generating almost Normal random variables: p i are uniformly distributed between 0 and 1.
9
Zvi WienerFE-Monte Carlo slide 9 Multi dimensional random numbers Goal : to generate an n-dimensional vector each component of which is a normally distributed random number, with correlation matrix S. Cholesky factorization: S=MM T, where M is lower triangular, see example.
10
Zvi WienerFE-Monte Carlo slide 10 Cholesky factorization Needs["LinearAlgebra`Cholesky`"] s = Table[1/(i + j - 1), {i, 1, 4}, {j, 1, 4}]; Eigenvalues[N[s]]; u = CholeskyDecomposition[s]; u // MatrixForm MatrixForm[Transpose[u].u]
11
Zvi WienerFE-Monte Carlo slide 11 Monte Carlo in Risk Management Distribution of market factors Simulation of a large number of events P&L for each scenario Order the results VaR = lowest quantile
12
Zvi WienerFE-Monte Carlo slide 12 How to design MC The central point is to model the distribution of relevant risk factors. For example, in pricing you should use the risk-neutral distribution. For risk measurement use true distribution. What should be used for an estimate of frequency of hedge?
13
Zvi WienerFE-Monte Carlo slide 13 Geometrical Brownian Motion
14
Zvi WienerFE-Monte Carlo slide 14 Lognormal process
15
Zvi WienerFE-Monte Carlo slide 15 Euler Scheme
16
Zvi WienerFE-Monte Carlo slide 16 Milstein Scheme
17
Zvi WienerFE-Monte Carlo slide 17 MC for simple options Needs["Statistics`NormalDistribution`"] Clear[MCEuropean, MCEuropeanCall, MCEuropeanPut] nor[mu_,sig_]:=Random[NormalDistribution[mu,sig]];
18
Zvi WienerFE-Monte Carlo slide 18 MC for simple options MCEuropean[s_, T_, r_, _, n_, exercise_Function]:= Module[{m = N[Log[s]+(r - 0.5 2 )*T], sg=N[ Sqrt[T] ], tbl}, tbl= Table[nor[m, sg], {i, n}]; Exp[-r*T]*Map[exercise, Exp[Join[tbl, 2*m - tbl]]]// {Mean[#], StandardErrorOfSampleMean[#]}& ]
19
Zvi WienerFE-Monte Carlo slide 19 MC for simple options MCEuropeanCall[s_, x_, T_, r_, _, n_]:= MCEuropean[s, T, r, , n, Max[#-x,0]&] MCEuropeanPut[s_, x_, T_, r_, _, n_]:= MCEuropean[s, T, r, , n, Max[x-#,0]&]
20
Zvi WienerFE-Monte Carlo slide 20 MC for path dependent options RandomWalk[n_Integer] := FoldList[Plus, 0, Table[Random[] - 1/2, {n}]]; ListPlot[ RandomWalk[500], PlotJoined -> True];
21
Zvi WienerFE-Monte Carlo slide 21 MC for path dependent options The function paths generates a random sample of price paths for the averaging period. It returns a list of numberPaths random paths, each consisting of numberPrices prices over the period from time T1 to time T. The prices at the start of the period are given by the appropriate lognormal distribution for time T1.
22
Zvi WienerFE-Monte Carlo slide 22 MC for path dependent options paths[s_,sigma_,T1_,T_,r_,numberPrices_,numberPaths_]:= Module[{meanAtT1=Log[s]+(r-sigma^2/2)*T1, sigmaAtT1 = sigma*Sqrt[T1], meanPath = 1+ r*(T-T1)/(numberPrices-1), sigmaPath = sigma*Sqrt[(T-T1)/(numberPrices-1)] }, Table[NestList[# nor[meanPath,sigmaPath]&, Exp[nor[meanAtT1,sigmaAtT1]], numberPrices - 1], {i,numberPaths}] ]
23
Zvi WienerFE-Monte Carlo slide 23 MC for Asian options MCAsianCall[s_,x_,sigma_,T1_,T_,r_,numberPrices_,numberPaths_]:= Module[{ t1, t2, t3}, t1 = paths[s,sigma,T1,T,r,numberPrices,numberPaths] ; t2 = Map[Max[0,Mean[#] - x]&, t1]; t3 = Exp[-T*r]*t2; {Mean[t3], StandardErrorOfSampleMean[t3]} ]
24
Zvi WienerFE-Monte Carlo slide 24 Speed of convergence Whole circle Upper triangle
25
Zvi WienerFE-Monte Carlo slide 25 Smart Sampling
26
Zvi WienerFE-Monte Carlo slide 26 Spectral Truncation
27
Zvi WienerFE-Monte Carlo slide 27 Variance Reduction Let X( ) be an option. Let Y be a similar option which is correlated with X but for which we have an analytic formula. Introduce a new random variable
28
Zvi WienerFE-Monte Carlo slide 28 Variance Reduction The variance of the new variable is If 2 cov[X,Y] > 2 var[Y] we have reduced the variance.
29
Zvi WienerFE-Monte Carlo slide 29 Variance Reduction The optimal value of is Then the variance of the estimator becomes:
30
Zvi WienerFE-Monte Carlo slide 30 Variance Reduction Note that we do not have to use the optimal * in order to get a significant variance reduction.
31
Zvi WienerFE-Monte Carlo slide 31 Multidimensional Variance Reduction A simple generalization of the method can be used when there are several correlated variables with known expected values. Let Y 1, …, Y n be variables with known means. Denote by Y the covariance matrix of variables Y and by XY the n-dimensional vector of covariances between X and Y i.
32
Zvi WienerFE-Monte Carlo slide 32 Multidimensional Variance Reduction Then the optimal projection on the Y plane is given by vector: The resulting minimum variance is where
33
Zvi WienerFE-Monte Carlo slide 33 Variance Reduction Antithetic sampling Moment matching/calibration Control variate Importance sampling Stratification
34
Zvi WienerFE-Monte Carlo slide 34 Quasi Monte Carlo Van der Corput Halton Haber Sobol Faure Niederreiter Permutations Nets
35
Zvi WienerFE-Monte Carlo slide 35 Quasi Monte Carlo Are efficient in low (1-2) dimensions. Sobol sequences can be used for small dimensions as well. As an alternative one can create a fixed set of well-distributed paths.
36
Zvi WienerFE-Monte Carlo slide 36 Do not use free sequences
37
Zvi WienerFE-Monte Carlo slide 37 Other MC applications Pricing Optimal hedging Impact of dividends Bounds on a basket Prepayments Tranches of MBS
38
Zvi WienerFE-Monte Carlo slide 38 Other MC related topics Use of analytical approximations Richardson extrapolation Ratchets example American properties Bundling Modeling Fat tails
39
Zvi WienerFE-Monte Carlo slide 39 Home Assignment Read chapter 26 in Wilmott. Read and understand the Excel file coming with this chapter. Calculate using the method described in class. Calculate a value of a simple Call option using Monte Carlo method (design your spreadsheet).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.