[Solved] MA 573 Computational Methods of Mathematical Finance Assignment 2

$25

File Name: MA_573__Computational_Methods_of_Mathematical_Finance__Assignment_2.zip
File Size: 631.14 KB

SKU: [Solved] MA 573 – Computational Methods of Mathematical Finance – Assignment 2 Category: Tag:
5/5 - (1 vote)
  1. Use the inverse transform method to produce a standard Cauchy distributed random variable X with density

from a standard uniformly distributed one,:

  1. Calculate the (generalized) inverse cdf FX1 of X.
  2. Sample the Cauchy distribution numerically by creating a histogram for x [5,5) and bin size with 10,000 samples and compare it to a direct plot of the density f.
  1. Show that the Box-Muller algorithm

produces indeed two independent standard normal random variables from independent uniform ones.

  1. Use the acceptance rejection method to produce a sample of a folded normal random variable X with density

if x > 0;

0 else,

by using an exponential density as dominating term.

  1. Choose a reasonably small constant c such that cg(x) f(x) for all x R.
  2. Plot the density of your trial by plotting a histogram for x [0,3) and bin size with 10,000 samples and compare it to a direct plot of the density f.
  1. The MarsagliaBray method is an alternative method to generate a normal distribution out of a uniform sample, using the acceptance-rejection method: Using two independent standard normal distributed random variables,, we set V 1 = 2U1 1 and V 2 = 2U2 1, and calculate 1 we reject the sample,

otherwise we calculate

; .

Prove that X1 and X2 are standard-normal distributed random variables.

Note: The MarsagliaBray algorithm is superior to Box-Muller as it uses only one computationally expensive transcendental functions (namely log) instead of three (log, sin and cos), at the price of having a part of the sample rejected.

Bonus question: Which percentage of the sample gets rejected?

  1. Compare the BoxMuller and the MarsagliaBray algorithm (see problem 2 and 4) by using them to produce samples of standard-normal distributed random variables from uniform random variables given by the built-in random number generator of your programming language. Compare the densities of your samples generated by the two methods with each other and the exact normal density function by plotting a histogram for x [3,3) and bin size . Choose the sample size in a way that the runtime of the slower algorithm is between 1s and 10s (just using trial and error) and compare the runtimes.
  2. Assume a financial markets where stock and money market account follow the dynamics

dSt = St dt + St dWt, S0 = 100;

dBt = rBt dt, B0 = 1,

with = 0.05, = 0.2 and r = 0.03.

  1. Calculate the price of a European put option with maturity T = 0.5 and strike K = 110 using the BlackScholes formula.
  2. Calculate the price of a European put option with maturity T = 0.5 and strike K = 110 using Monte-Carlo integration.
  3. Compare the results of part (a) and part (b), using different sample sizes for the Monte-Carlo integration. Make a plot that shows the numerically computed option price as function of the sample size.
  4. Calculate the price of a European asset-or-nothig digital call option (payoff

ST1l{ST>K}) option with maturity T = 0.5 and strike K = 110 using Monte-Carlo integration.

  1. Calculate the price of a European cubic put option (payoff ) option with maturity T = 0.5 and strike K = 110 using Monte-Carlo integration.
  2. Calculate the price of a European gap call option (payoff (ST L)+1l{ST>K}) option with maturity T = 0.5 and strike K = 110 and exercise level L = 105 using Monte-Carlo integration.
  3. Calculate the price of a European exponential put option (payoff e(KST)+) option with maturity T = 0.5 and strike K = 110 using Monte-Carlo integration.

Bonus question: Which of the options of problem (d)(g) admit a closed-form representation of the option price?

Note: All programming problems should be either in Python 2.7 (recommended) or Python 3.5, matlab, or R (no support for these languages provided). Please comment the programs extensively and send them in a .zip file with title Lastname HW2.zip and suject line MA 573 HW2 Lastname to Qingyun Ren [email protected] before the due date of the homework (replacing the bold words by your actual last name). Plots can be provided either as printout or as .pdf file.

4 points per problems

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] MA 573 Computational Methods of Mathematical Finance Assignment 2
$25