1 / 39

Financial Engineering

Financial Engineering. Zvi Wiener mswiener@mscc.huji.ac.il 02-588-3049. Monte Carlo Simulations. 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

jameselong
Download Presentation

Financial Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Financial Engineering Zvi Wiener mswiener@mscc.huji.ac.il 02-588-3049 http://pluto.mscc.huji.ac.il/~mswiener/zvi.html

  2. Monte Carlo Simulations http://pluto.mscc.huji.ac.il/~mswiener/zvi.html

  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 FE-Monte Carlo

  4. Monte Carlo FE-Monte Carlo

  5. Monte Carlo FE-Monte Carlo

  6. Monte Carlo FE-Monte Carlo

  7. Monte Carlo FE-Monte Carlo

  8. Generating Normal Variables • Very simple method of generating almost Normal random variables: pi are uniformly distributed between 0 and 1. FE-Monte Carlo

  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=MMT, where M is lower triangular, see example. FE-Monte Carlo

  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] FE-Monte Carlo

  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 FE-Monte Carlo

  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? FE-Monte Carlo

  13. Geometrical Brownian Motion FE-Monte Carlo

  14. Lognormal process FE-Monte Carlo

  15. Euler Scheme FE-Monte Carlo

  16. Milstein Scheme FE-Monte Carlo

  17. MC for simple options • Needs["Statistics`NormalDistribution`"] • Clear[MCEuropean, MCEuropeanCall, MCEuropeanPut] • nor[mu_,sig_]:=Random[NormalDistribution[mu,sig]]; FE-Monte Carlo

  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[#]}& • ] FE-Monte Carlo

  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]&] FE-Monte Carlo

  20. MC for path dependent options • RandomWalk[n_Integer] := • FoldList[Plus, 0, Table[Random[] - 1/2, {n}]]; • ListPlot[ RandomWalk[500], PlotJoined -> True]; FE-Monte Carlo

  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 numberPathsrandom 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. FE-Monte Carlo

  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}] • ] FE-Monte Carlo

  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]} • ] FE-Monte Carlo

  24. Speed of convergence Whole circle Upper triangle FE-Monte Carlo

  25. Smart Sampling FE-Monte Carlo

  26. Spectral Truncation FE-Monte Carlo

  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 FE-Monte Carlo

  28. Variance Reduction • The variance of the new variable is If 2cov[X,Y] > 2var[Y] we have reduced the variance. FE-Monte Carlo

  29. Variance Reduction • The optimal value of  is Then the variance of the estimator becomes: FE-Monte Carlo

  30. Variance Reduction • Note that we do not have to use the optimal * in order to get a significant variance reduction. FE-Monte Carlo

  31. Multidimensional Variance Reduction • A simple generalization of the method can be used when there are several correlated variables with known expected values. • Let Y1, …, Yn 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 Yi. FE-Monte Carlo

  32. Multidimensional Variance Reduction • Then the optimal projection on the Y plane is given by vector: The resulting minimum variance is where FE-Monte Carlo

  33. Variance Reduction • Antithetic sampling • Moment matching/calibration • Control variate • Importance sampling • Stratification FE-Monte Carlo

  34. Quasi Monte Carlo • Van der Corput • Halton • Haber • Sobol • Faure • Niederreiter • Permutations • Nets FE-Monte Carlo

  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. FE-Monte Carlo

  36. Do not use free sequences FE-Monte Carlo

  37. Other MC applications • Pricing • Optimal hedging • Impact of dividends • Bounds on a basket • Prepayments • Tranches of MBS FE-Monte Carlo

  38. Other MC related topics • Use of analytical approximations • Richardson extrapolation • Ratchets example • American properties • Bundling • Modeling Fat tails FE-Monte Carlo

  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). FE-Monte Carlo

More Related