– Assignment 3 – MATH4090: Computation in Financial Mathematics Assignment 3 Semester II Due 5:00pm 18 October Weight 20% Total marks 40 marks No more questions will be added Submission instructions: Submit onto Blackboard softcopy (i.e. scanned copy) of (i) your assignment solutions, as well as (ii) Matlab/Python code, figures, if any, by 5:00pm 18 October. Hardcopies are not required. Include all your answers, numerical outputs, figures, tables and comments as required into one single PDF file. No need to submit individual figure files. You also need to upload all Matlab/Python files onto Blackboard for all programming ques- tions. General coding instructions: You are allowed to reuse any code developed in tutorials. Assignment questions may have specific programming instructions which you are required to follow. Failure to do so will result in a loss of 50% of the questions’s total marks. For programming questions that require you to submit tables of results, you are not required to write Matlab/Python code to produce the tables. Handwritten tables of results are acceptable. Notation: “Lx.y” refers to [Lecture x, Slide y] Assignment questions 1. (9 marks) Consider the Ornstein-Uhlenbeck process X = (Xt)t≥0 given by: Xt = X0 − ∫ t 0 θXs ds+ σWt, t ≥ 0, (1) with the positive constants θ, σ > 0 and a standard Brownian motion W = (Wt)t≥0. a. (2 marks) By applying Ito’s formula to f(Xt, t) := Xte θt, show that Xt = e −θt ( X0 + σ ∫ t 0 eθsdWs ) , t ≥ 0. (2) What is the expected value of Xt? This is a non-programming question. b. (4 marks) Simulate a path of {Xt; 0 ≤ t ≤ T} in two ways: by using (1) and by using (2) for the common Brownian motion W . Take σ = 0.2, θ = 1, T = 1 and X0 = 1. Choose N = 100 so that ∆t = 0.01. Compare the two simulated paths (based on the same Brownian motion increments) in one figure. To understand their difference, compute the maximum absolute difference between the two path (over all time points). MATH 4090 – 1 – Semester 2 – Assignment 3 – c. (3 marks) Using Monte Carlo simulation with (1), confirm that the expected value of X1 is the same as that obtained in part a. You are not required to obtain a confidence interval for this question. Use the same parameters as in part b, and for the number of samples, use M = 1000. 2. (6 marks) Consider approximating C := E[f(U)] where f(x) = log x1{x>1/2} (where 1A takes 1 if A holds and zero otherwise) for U ∼ Unif[0, 1] using an ordinary and antithetic variant Monte Carlo (MC) methods. a. (3 marks) Obtain analytically C and Cov(f(U), f(1 − U)). Is the antithetic variates method more efficient than the ordinary MC method? Mathematically justify your an- swer. See L6.10. This is a non-programming question. b. (3 marks) Implement a code to compute the 95% (asymptotic) confidence interval using ordinary MC (with 2M = 2000 samples) and using antithetic variates method (with M = 1000 samples). Comment on the radius of the confidence intervals. 3. (10 marks) Under risk-neutral probabilities, the dynamics of a stock S are given by dSt = rStdt+ σS α t dWt, where σ > 0 and W is a standard Brownian motion. This is known as the CEV (constant elasticity of variance) model. The parameter α > 0 controls the relationship between volatility and price, while r ≥ 0 is the interest rate. a. (3 marks) Derive the SDE for Lt = log(St) using Itoˆ’s formula. This is a non-programming question. b. (7 marks) Implement the ordinary and control variate Monte Carlo methods for pricing a European call option on S with maturity T = 1 and strike K = 50. Assume the interest rate is r = 0.02. For other parameters, use α = 0.5, S0 = 100 and σ = 0.2. For the control variate, use a European option written on S∗ with the following dynamics dS∗t = rS ∗ t dt+ σS ∗ t dWt. Use M = 105 replications, and a total of 200 timeteps. Report CˆM and Cˆ cv,βˆ M as discussed in class as well as the 95% confidence interval for both methods. 4. (5 marks) Consider approximating an expected value C := E[Y ] where Y := log(max(Z √ |Z|, 1)) for a standard normal random variable Z. Let Y ∗1 = Z, Y ∗2 = Z2 (with the same Z) so that C∗1 := E[Y ∗1 ] = 0 and C∗2 := E[Y ∗2 ] = 1. We consider the following four estimators (M is the sample size): CˆM = Y¯M (which is the empirical average of Y ) Cˆ1,M = Y¯M + β1(C ∗ 1 − Y¯ ∗1,M ) (where Y¯ ∗1,M is the empirical average of Y ∗1 ); Cˆ2,M = Y¯M + β2(C ∗ 2 − Y¯ ∗2,M ) (where Y¯ ∗2,M is the empirical average of Y ∗2 ); Cˆ3,M = Y¯M + β3(C ∗ 1 − Y¯ ∗1,M ) + β4(C∗2 − Y¯ ∗2,M ). For Cˆ3,M , the (optimal) values of β3 and β4 should be selected so that ∂ ∂β3 Var(Cˆ3,M ) = ∂ ∂β4 Var(Cˆ3,M ) = 0. In other words (β3, β4) are solutions to the following linear equations:( Var(Y ∗1 ) Cov(Y ∗1 , Y ∗2 ) Cov(Y ∗1 , Y ∗2 ) Var(Y ∗2 ) )( β3 β4 ) = ( Cov(Y, Y ∗1 ) Cov(Y, Y ∗2 ) ) . MATH 4090 – 2 – Semester 2 – Assignment 3 – Note that this can be solved using built-in functions in Matlab and Python. Implement the code to compute the four estimators for M = 10, 000. Report CˆM , Cˆ1,M , Cˆ2,M , and Cˆ3,M , as well as the asymptotic standard errors. For βˆ (an approximation to the optimal β), you can use the empirical variances and covariances, although some of them can be obtained analytically. 5. (6 marks) We revisit the example given in L6.34, but this time let Y = h(U), where U is a standard normal random variable, and h(u) := 100, if 3 < u ≤ 4, 1, if 0 ≤ u ≤ 3, 0, otherwise. Produce sample trajectories of the ordinary Monte Carlo estimate M 7→ CˆM and the im- portance sampling Monte Carlo estimate M 7→ CˆISM (as in the plot given in L6.36) for M = 1, . . . , 5000, along with the analytical value of C := E[h(U)]. For g, use g(u) := { 0.25, if 0 ≤ u ≤ 4, 0, otherwise. 5. (4 marks) Let 0 < t1 < t2 < t3. Consider an option on a GBM S, with expiry time t3 and discounted payoff Y = e−rt3 ( k − St1 + St2 + St3 3 )+ 1{St1>100,St2>100}, where 1A is the indicator function that takes 1 when A holds true and zero otherwise. Describe a conditional Monte Carlo pricing algorithm to estimate E[Y ]. Hint: Use the Black- Scholes put price CBS(S0, σ,K, ‘put’), which is a known function of the initial stock price S0, diffusion coefficient σ and strike price K. This is a non-programming question. MATH 4090 – 3 – Semester 2 51作业君版权所有