Homework exercises

1)      Test PRand using the TestU01 test suite (e.g. Little Crush or Big Crush).

2)      Create and test a variant of PRand eg. D2(A2l), and compare with the test results from PRand.

3)      Apply the Chi-squared test (as described in Thomas, Luk, Leong and Villasenor 2007 : 11 – 25) to a random samples generated by

·         NRand()  (PRand + Moro)

·         NormSInv(Rand())

and compare the results. This exercise can be done in Excel.

4)      Compute a bounding rectangle B for the acceptance region A for the ratio-of-uniforms method applied to the normal distribution.

5)      Generate 100 standard normal random variables using the ratio-of-uniforms method, and test for normality, using

·         The Jacques-Bera test

·         The Kolmogorov-Smirnov Test.

6)      Generate 100 standard normal random variables using the Moro or Wichura transforms, and test for normality, using

·         The Jacques-Bera test

·         The Kolmogorov-Smirnov Test.

Compare the test results and the computation time with the ratio-of-uniforms method.

7)      Write a program to generate a list of random option parameters Type, S, K, r, σ, T as follows:

·         Call with probability 0.5, put with probability 0.5.

·         S = 100

·         K ~ U[70,130]

·         r ~ U[0,0.10] with probability 0.8, r = 0 with probability 0.2

·         σ ~ U[0.1,0.6]

·         T ~ U[0.1,1] with probability 0.75, T ~ U[1,5] with probability 0.75

Each line should contain the parameters for one option, separated by commas (CSV format).

8)      Write a program to value vanilla European options (calls and puts), using the PRand random number generator and the Moro transformation. The program should read option parameters from a file, and print a value for each option.

9)      Extend the previous program to optionally output a convergence table. We will call this VanillaOption.

10)   If you want a programming challenge, implement a GUI interface for VanillaOption. Call it VanillaOptionG.

11)   Using VanillaOption, value a European call option S0 = 100, r = 5% , q = 1%, σ = 20%, and T = 1, with a confidence interval of ±1 cents (i.e. ±0.01).

12)   Amend VanillaOption1 to implement antithetic variables. Call this the VanillaOptionAV.

13)   Apply VanillaOptionAV to value the European call option with a confidence interval of ±1 cents (i.e. ±0.01).