[Solved] MA 573 -Computational Methods of Mathematical Finance -Assignment 1

$25

File Name: MA_573_-Computational_Methods_of_Mathematical_Finance_-Assignment_1.zip
File Size: 631.14 KB

SKU: [Solved] MA 573 -Computational Methods of Mathematical Finance -Assignment 1 Category: Tag:
5/5 - (1 vote)

1.Use a number generator to produce samples of

    1. 10
    2. 100
    3. 1000
    4. 10000

standard uniformly distributed random variables. For every sample size, produce a plot that shows the empirical cumulatice distrbution function F in comparison with the actual cumulative distibution function F.

  1. Use a number generator to produce samples of
    1. 10
    2. 100
    3. 1000
    4. 10000

standard uniformly distributed random variables. For every sample size, produce a histogram that shows the relative frequency of values taken, rounding to one decimal place (i.e., you count the relative frequency of realizations in bins of size 0.1).

2

  1. A good way to check if a sequence of random variables is close to being indeed random is to make a correlation plot: Plot the sequence of pairs (xn,xn+1) generated by the random number generator inside the unit square. As less structure is visible in the plot, as better the random number generator is. Make correlation plots for a sequence of pseudorandom variables for
    1. The built-in uniform random number generator with seed x0 = 375;
    2. A linear congruence random number generator with m = 11, a = 6 and c = 0 (and seed x0 = 1);
    3. A linear congruence random number generator with m = 231 1, a = 16807 and c = 0 (and seed x0 = 1);
    4. A linear congruence random number generator with m = 231 1, a = 950706376 and c = 0 (and seed x0 = 1).
  2. The generation of random number generators before the Mersenne Twister improved upon the basic linear congruence generator by coming different random number generators. E.g., The Wichmann-Hill generator implemented in Python before version

2.3 sums up over different LCRNGs and takes the fractional part of the sum.

Specifically, assuming that there are K random number generators, working for k {1,,K} by

x0,k = x0,k

one calculates

(where bxc denotes the largest integer smaller or equal than x).

Consider the specific case of two LCRNGs with x0,1 = 3,a1 = 5,m1 = 7 and x0,2 = 1,a2 = 7,m2 = 5.

  1. Calculate the period length of the two LCRNGs as well as the combined Wichmann-Hill generator.
  2. Make plots for the serial correlation of all three generators (as in problem 3).

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 HW1.zip and suject line MA 573 HW1 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.

6 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 1
$25