1 / 23

Monte-Carlo Simulation

Monte-Carlo Simulation. Mathematical basis. The discounted price is a martingale ( MA4257 and MA5248). European vanilla call: linked to BS equation. Generating stock prices (1). Generating stock prices (2).

gitel
Download Presentation

Monte-Carlo Simulation

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

  2. Mathematical basis • The discounted price is a martingale (MA4257 and MA5248).

  3. European vanilla call: linked to BS equation

  4. Generating stock prices (1)

  5. Generating stock prices (2) • For European vanilla options, we can just take t=T and use the discrete process of x since prices at intermediate times are unnecessary. • For path dependent options like Asian options, it is necessary to generate prices at each ti.

  6. Generating normal variables The polar form of the Box-Muller method can be found at http://en.wikipedia.org/wiki/Box-Muller_method.

  7. A Matlab code for European call • T=0.5; N=100; dt=T/N; sigma=0.3; r=0.05; q=0.01; mu=r-q; S0=1; K=0.9; nsample=2000; v=0; • for i=1:nsample s(1)=S0; for j=2:N+1 eps=randn; s(j)=s(j-1)*(1+mu*dt+eps*sigma*sqrt(dt)); end v=v+max(s(j)-K,0); end v=exp(-r*T)*v/nsample

  8. Another code for European call • T=0.5; sigma=0.3; r=0.05; q=0.01; mu=r-q-sigma^2/2; S0=1; K=0.9; nsample=2000; v=0; • for i=1:nsample x=mu*T+randn*sigma*sqrt(dt)); s=S0*exp(x); v=v+max(s-K,0); end v=exp(-r*T)*v/nsample

  9. A better code • T=0.5; sigma=0.3; r=0.05; q=0.01; mu=r-q-sigma^2/2; S0=1; K=0.9; nsample=2000; • epsv=randn(nsample,1); • ST=S0*exp((mu-sigma^2/2)*T+epsv*sigma*sqrt(T)); • v=exp(-r*T)*mean(max(ST-X,0))

  10. Number of trials and error of estimate • The number of simulation trials carried out depends on the accuracy required. • Denote the mean by b and the standard deviation by . Then variable b is the simulation's estimate for the true value f, with the standard error of the estimate • To increase the accuracy by a factor of 10, the number of trials must increase by a factor of 100.

  11. Sampling through a tree • Suppose we have a binomial tree where the risk neutral probability is p. • The sampling procedure: • At each node, we sample a random number between [0,1]. We take the down path if the number <1-p; and the up path otherwise. Once we have a complete path from the initial node to the end of the tree we can calculate a payoff. This completes the first trial. • A similar procedure is used to complete more trials. The mean of the payoffs is discounted at the risk-free rate to get an estimate of the value of the derivative.

  12. Calculating the Greek letters: method 1

  13. Calculating the Greek letters: method 2

  14. Calculating the Greek letters: method 3

  15. Generation of correlated samples (1)

  16. Generation of correlated samples (2) The Cholesky factorization gives one way of choosing this decomposition.

  17. Generation of correlated samples (3)

  18. Antithetic variance reduction

  19. Control variates (1) Suppose we are trying to use MC to price a derivative A, and there is a derivative B with payoff correlated to A and with a price available in analytically closed form.

  20. Control variates (2)

  21. Control variates (3): an example

  22. Handling early exercise • Not required • I refer interested students to Longstaff and Schwartz (2001): Valuing American options by simulation: a simple least squares approach, Review of Financial Studies, 14(1), 113-147.

  23. Quasi Monte Carlo • Not required • Quasi MC makes use of low discrepancy sequences, instead of pseudo random variables, to generate representative samples for desired probability distributions. • References: • http://www.puc-rio.br/marco.ind/quasi_mc.html • P. Glasserman, Monte Carlo Methods in Financial Engineering, Springer

More Related