# Numerical Methods MATLAB

Numerical Methods MATLAB

I need help with these in MATLAB (Do everything except Question 1,4 and 5)

Compile the code and the output in a word doc when submitting

Monte Carlo Project

1. a) Use the random number generator with to generate 10000 uniformly distributed random numbers on and plot the histogram.

b) Generate 10000 uniformly distributed random numbers on using built-in function of MATLAB.

c) Compare the histograms obtained in parts a) and b).

2. a) Use the numbers generated in problem 1 a) to generate 10000 random numbers that represent the daily price

fluctuation of a financial asset that can have an increase of 100 with probability 0.45 , a decrease of 200 with probability

0.25, or stays the same with probability 0.3.

b) Plot the histogram and the empirical distribution function obtained using the data generated in part a).

3. Generate 5000 Binomial distributed random numbers by doing:

a) Use Bernoulli random variables. Plot the empirical histogram and using your data to calculate the probability that the

Binomial random variable is less than 50. Compare with the theoretical answer.

4. Generate 5000 standard normal Gaussian distributed numbers by doing:

a) Use MATLAB function randn

5.

Let be uniform random variables on . Define .

a) Organize in a table the estimates of obtained by generating values of .

b) Are your estimates in part a) converging to a particular value?

6.

Let be a standard Gaussian random variable.

a) Using a simple Monte Carlo technique estimate . Use the following values for :

b) Use the Importance sampling technique to estimate .

c) Compare parts a) and b). Comment on this.

7. Consider the integral

.

a) Estimate the integral using a simple Monte Carlo Method. Find 95% confidence interval for the true value of the

integral.

b) Estimate the integral using data generated for a) and applying antithetic variate approach. Find 95% confidence

interval for the true value of the integral.

c) Estimate the integral using data generated for a) and applying control variate approach. Use as control variate i)

and ii) . Note that you’ll need to calculate exact (theoretical values) of and .

Find 95% confidence interval for the true value of the integral.

d) Compare a), b), c). Which variance reduction technique works better here.

8.

Let be a Geometric Brownian Motion process:

where is a Wiener process.

a) Estimate (by Monte Carlo simulation) the price of a European Call option on the stock. Use

b) Compute the price of a European Call option on the stock using the Black-Scholes formula.

c) Compare results in a) and b).

9. Consider the stock AMZN that does not pay dividends.

a) Use B-S formula to calculate the price of a January 2015 European call option , where

. Use the put-call parity relation to calculate the price of a corresponding put option.

b) Use a simple Monte Carlo method to estimate the price of a January 2015 European call option , where