For this homework, you are expected to develop several simulation algorithms for a square-root diffusion {X:t 0} which satisfies the SDE,
dX=ab-Xdt+σXdW
with Xo=0.
1. Propose a method to simulate the Poisson random variable N~ Poisson(A P[N=k]=e^(-A) * (A^k) / k! 2. A chi-square random variable Y with degree of freedom d.o.f. v >0 has density function f_Y(x) = (x/2)^(v/2-1) * e^(-x/2) / (2^(v/2) * Γ(v/2)) a. Propose an acceptance-rejection AR method to simulate Y exactly. Hint: you can consider the cases v≥2 and 0<v<2 separately. b. Propose an inverse-transform (IR) method to simulate Y by the Wilson-Hilferty cubic formula, F^(-1)(x) = (2v)^(-1) * (x/2)^(-1/v) where F^(-1) and Φ^(-1) are the inverse cumulative distribution function of Y and standard normal respectively. Hint: you can use built-in functions to calculate Φ^(-1).
c. Implement the AR and IR methods and compare their efficiency for v=0.1,0.5,1,10,100
3. Combining the methods developed in 1 and 2, propose a method to simulate {X:t>0 on an arbitrary set of time points t_i < t_2 << t_n. You have two versions of the method, one with the AR approach in 2a and the other with the IR approach in 2b. Evaluate the accuracy of the second version for computing E[XT] with Monte Carlo simulation. Set σ=0.3, a=0.8, b=0.3, A=1.0, and T=1.0.