关键词 > CS476/676

CS 476/676 Assignment 2 Winter 2023

发布时间:2023-02-25

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS 476/676 Assignment 2

Winter 2023

Due:  11am Feb 27, 2023

Programming Questions

IMPORTANT:     In this and in future assignments, most of the marks for programming questions are allocated for explanations of algorithms (e.g. pseudo-code) and discussion of results. If all you hand in is the listing of the Raw Code” or Raw Output” by itself, you will get poor marks. Noting that all programming examples in lectures and course notes are in Matlab, coding for assignments can be done in Matlab or python. All the plots should be appropriately labeled. You should submit all code used in your assignment. Be sure to document (i.e. add liberal comments) your code. The TA will take off marks for poor documentation.

1  [ (14 marks) ] (Drifting Binomial Lattice)

In lectures we have considered the non-drift lattice. In this assignment we consider the Drifting Lattice described in Section 5.3 of the course notes, i.e.,

u   =   exp [σ ^∆t + (r . σ 2 /2)∆t]

d   =   exp [.σ ^∆t + (r . σ 2 /2)∆t]

S = uSj(n)  ;  Sj(n)+1  = dSj(n)

q*      =                                                                                                  (1)

Table 1: Some typical option parameters

σ

r

Time to expiry T

Strike Price

Initial asset price S(0)

20%

3%

1 year

$10

$10

Implement European option pricing using this binomial lattice.  Your code should take only O(N) storage NOT O(N2 ), N = T/∆t. This can be done efficiently if you store the payoff in an array of size O(N) and index it appropriately.

(a)  (9 marks) Write a code to price an European put option with the Drifting Lattice described (see also in Section 5.3 of the course notes).  Using data in Table 1, assuming no dividend, write a binomial pricing code.  Test your code for standard European call and put by comparing your results with the exact solutions from the Matlab function blsprice as follows.  Let V0(exact)  be the exact initial price V (S(0), 0) (from the Black-Scholes formula), and Vtree (∆t) be the value from a lattice pricer with the time step ∆t. If convergence rate is linear, then it can be shown that

V0(tree)(t)   =   V0(exact) + α∆t + o(∆t)                  (2)

where α is a constant independent of t. Then the ratio below

V0(tree)((∆t)/2) . V0(tree)(∆t)   

t→0 V0(tree)((∆t)/4) . V0(tree)((∆t)/2)  .                        (3)

would be 2. If convergence rate is quadratic, then

V0(tree)(t)   =   V0(exact) + α(∆t)2 + o((∆t)2 )                (4)

where α is some constant independent of t.  What is the ratio when convergence is quadratic? Does your convergence table indicate a linear or quadratic convergence rate? Explain.

Show tables with the initial option value V (S(0), 0) as a function of t. Start off with a timestep (∆t)0  = .05, and show the option value for (∆t)0 /2, (∆t)0 /4, . . ..  You should see your results converging to the blsprice value. Your tables should look like Table 2.

Table 2: Convergence Test

t

Value

Change

Ratio

.05

.025

.0125

. . .

V1

V2

V3

. . .

V2 . V1 V3 . V2

. . .

 

V2 _V1

V3 _V2

. . .

(b)  (5 marks) For (1), the strike price may not equal to any binomial node Sj(N), j = 0, . . . , N . imple- ment the smoothing payoff method at the t = T (Section 5.4 of the notes). Repeat the experiment of question 1. What do you see?

2  [(12 marks)] (Drifting Lattice and Dividend)

Assume that the underlying stock pays dividend at the dividend payment time td where T is the expiry. The amount of dividend payment D at each td  is specified below

D = max(ρ · S(td(_)), D0 ),

where S(td(_)) is the stock price immediately before dividend payment date td , ρ  > 0 is a constant dividend rate, and D0  > 0 is a constant, specifying a dividend oor.  Note that, when the stock pays dividend at t, the stock price at t+ , S(t+ ), becomes S(t_ ) . D, where t_  and t+  denote immediately before and after the time of stock dividend payment respectively.   Under no arbitrage, the option value immediately before dividend payment and immediately after dividend payment should remain the same.

Your handling of dividend should not require change to the lattice (1).  In ?5.5.2 of the course notes, the case when dividend is a xed amount is discussed. Modify the binomial lattice call and put option pricing to handle the dividend payment case in this question using interpolation similar to the technique described in ?5.5.2.

(a)  (6 marks) Now, repeat Question 1  (a)  (including checking for convergence), which implements smoothed payoff at T, but under above dividend payment specifications with td  =  , D0  = 0.3 and ρ = 0.3%.

(b)  (6 marks) Repeat Question  1  (a) again  (including checking for convergence), but assume now dividend is paid three times at td  =  ,  ,  respectively with D0  = 0.1 and ρ = 0.1%.                How do call and put values change in comparison to (a)? Describe your observations.

3  [ (12 marks] (Monte Carlo)

A  European  down-and-out  call barrier option pays out the  call payoff at the expiry  T  when the underlying price St  never hits the barrier B < S0  in t e [0, T]. Otherwise it pays nothing.

Assume that the asset price S evolves, in the risk neutral world, as follows:

dS = rSdt + σSdZ                                                               (5)

where r is the risk free return, σ is the volatility, and dZ is the increment of a standard Brownian motion.

(a) (4 marks)   Consider a down-and-out call option with the expiry T = 1 year.  The initial asset price and the strike are S0  = K = 100, the down barrier is B = 85.  The analytic formula for pricing this barrier option is

V (S, t)   =   S N(d1 ) . (B/S)1+2r/σ2  (1 . N(d8 )). Ke_r(T _t) ╱N(d2 ) . (B/S)_ 1+2r/σ2  (1 . N(d7 ))

where

d1  = log( )^(r)2 )(T _t)         d2  = d1 . σ ^T . t

d7  = log( B(S)2(K) ) _σt(σ)2 )(T _t)      d8  = d7 . σ ^T . t

where N(d) is the cumulative distribution function for normal distribution, which is normcdf in Matlab, Compute and plot the initial down-and-out call option for S = 0.9S(0) : 2 : 1.1S(0). Other parameters can be found in Table 3.

Table 3: Some typical option parameters

σ

r

Time to expiry T

Strike

Initial asset price S(0)

20%

5%

1 year

$100

$100

(b) (8 marks)   Let

N    =

S(n∆t)   =

T

t

Sn

(6)

Then, given an initial price S(0), M realizations of the path of a risky asset are generated using the algorithm

Sn+1  = Sn e(r _ σ 2 )∆t+σφn ^t                 (7)

where (φn } are independent standard normals.

If the mth simulation value of SN  = S(T) is denoted by (SN )m , then an approximate initial value of the option is given by (assuming initial price is S(0))

(S(0), 0) = e_rT       m(M)=0   Payoff((SN )m )

For down-and-out call

Payoff(SN ) = 

●  The price simulation using (7) has no time discretization error. Does the error in the computed value (S(0), 0) depend on the time discretization? Explain.

●  Code up this MC algorithm in Matlab to determine the initial value of the European down- and-out call. Vectorize your code for efficiency.

●  For  a xed  t  =  0.01  plot the  MC  computed  option values versus the  number  of sim- ulations  for  a  number  of values  of M .   Repeat  this  computation  for  different  t.   Use M=1000:4000:45000, ∆t =  [0.01, 0.005, 0.0025, 0.001].  Use M as the x-axis, option value as y-axis, and plot the option values for all ts in the same plot Show the exact price com- puted from (a) on the plot. Explain what you see.

Submit your code, plots, and discussion.

Graduate  [(Graduate Student Question)] (15 marks).

Explain why the Monte Carlo method in Question 3 for pricing down-and-out call is slow in obtaining an accurate barrier option value.  Read the recent short paper by Nouri et al, Digital Barrier option pricing  :  an  improved Monte  Carlo  algorithm, Math Sci (2016) 10:65-70.  Implement the probability approach in this paper and produce results and Figures, which are similar to Example  1,  for the previous barrier option pricing, using t = [0.02,0.01,0.005,0.0025] and M = 100,000.  Note that the exiting probability formula in the paper holds when D = (B, +o) as well.

Comment on your observations of the computation results. Compare and discuss the improvement of the results compared to your implementation in previous barrier option pricing implementation.