Appendix 19 A Microsoft Excel Program for Calculating Cumulative Bivariate Normal Density Function ( 19.8.2) By Cheng Few Lee Joseph Finnerty John Lee.

Presentation on theme: "Appendix 19 A Microsoft Excel Program for Calculating Cumulative Bivariate Normal Density Function ( 19.8.2) By Cheng Few Lee Joseph Finnerty John Lee."— Presentation transcript:

Appendix 19 A Microsoft Excel Program for Calculating Cumulative Bivariate Normal Density Function ( 19.8.2) By Cheng Few Lee Joseph Finnerty John Lee Alice C Lee Donald Wort

Option Explicit Public Function Bivarncdf(a As Double, b As Double, rho As Double) As Double Dim rho_ab As Double, rho_ba As Double Dim delta As Double If (a * b * rho) <= 0 Then If (a <= 0 And b <= 0 And rho <= 0) Then Bivarncdf = Phi(a, b, rho) End If If (a = 0 And rho > 0) Then Bivarncdf = Application.WorksheetFunction.NormSDist(a) - Phi(a, -b, -rho) End If If (a >= 0 And b 0) Then Bivarncdf = Application.WorksheetFunction.NormSDist(b) - Phi(-a, b, -rho) End If If (a >= 0 And b >= 0 And rho <= 0) Then Bivarncdf = Application.WorksheetFunction.NormSDist(a) + Application.WorksheetFunction.NormSDist(b) - 1 + Phi(-a, -b, rho) End If Else rho_ab = ((rho * a - b) * IIf(a >= 0, 1, -1)) / Sqr(a ^ 2 - 2 * rho * a * b + b ^ 2) rho_ba = ((rho * b - a) * IIf(b >= 0, 1, -1)) / Sqr(a ^ 2 - 2 * rho * a * b + b ^ 2) delta = (1 - IIf(a >= 0, 1, -1) * IIf(b >= 0, 1, -1)) / 4 Bivarncdf = Bivarncdf(a, 0, rho_ab) + Bivarncdf(b, 0, rho_ba) - delta End If End Function 2

Public Function Phi(a As Double, b As Double, rho As Double) As Double Dim a1 As Double, b1 As Double Dim w(5) As Double, x(5) As Double Dim i As Integer, j As Integer Dim doublesum As Double a1 = a / Sqr(2 * (1 - rho ^ 2)) b1 = b / Sqr(2 * (1 - rho ^ 2)) w(1) = 0.24840615 w(2) = 0.39233107 w(3) = 0.21141819 w(4) = 0.03324666 w(5) = 0.00082485334 x(1) = 0.10024215 x(2) = 0.48281397 x(3) = 1.0609498 x(4) = 1.7797294 x(5) = 2.6697604 doublesum = 0 For i = 1 To 5 For j = 1 To 5 doublesum = doublesum + w(i) * w(j) * Exp(a1 * (2 * x(i) - a1) + b1 * (2 * x(j) - b1) + 2 * rho * (x(i) - a1) * (x(j) - b1)) Next j Next i Phi = 0.31830989 * Sqr(1 - rho ^ 2) * doublesum End Function 3

Appendix 19 B Microsoft Excel Program for Calculating American Call Options ( 19.8.2) By Cheng Few Lee Joseph Finnerty John Lee Alice C Lee Donald Wort

Number * ABC* 1 Option Pricing Calculation 2 3S (current stock price)=50 4 S t * (critical exdividend stock price)= 46.9641 5 S(current stock price NPV of promised dividend)= 48.0218=B3-B11*EXP(-B7*B10) 6 X (exercise price of option)= 48 7r(risk-free interest rate)=0.08 8σ(volatility of stock)=0.2 9T(expiration date)=0.24658 10t(exercise date)=0.13699 11D(Dividend)=2 12d 1 (nondividend-paying)=0.65933=(LN(B3/B6)+(B7+0.5*B8^2)*B9)/(B8*SQRT(B9)) 13d 2 (nondividend-paying)=0.56001=B12-B8*SQRT(B9) 14 d 1 *(critical exdividend stock price)= -0.16401 =(LN(B4/B6)+(B7+0.5*B8^2)*(B9-B10))/(B8*SQRT (B9-B10)) 15 d 2 *(critical exdividend stock price)= -0.23022=B14-B8*SQRT(B9-B10) 5

16d 1 (dividend-paying)=0.25285=(LN(B5/B6)+(B7+0.5*B8^2)*(B9))/(B8*SQRT(B9)) 17d 2 (dividend-paying)=0.15354=B16-B8*SQRT(B9) 18a1=a1=0.25285 =(LN((B3-B11*EXP(-B7*B10))/B6)+(B7+0.5*B8 ^2)*(B9))/(B8*SQRT(B9)) 19a2=a2=0.15354=B18-B8*SQRT(B9) 20b1=b1=0.48593 =(LN((B3-B11*EXP(-B7*B10))/B4)+(B7+0.5*B8 ^2)*(B10))/(B8*SQRT(B10)) 21b2=b2=0.41191=B20-B8*SQRT(B10) 22 23C(S t *,T-t;X)=0.9641 =B4*NORMSDIST(B14)-B6*EXP(-B7*(B9-B10)) *NORMSDIST(B15) 24C(S t *,T-t;X)-S t *-D+X=2.3E-06=B23-B4-B11+B6 25 26N 1 (a 1 )=0.59981=NORMSDIST(B18) 27N 1 (a 2 )=0.56101=NORMSDIST(B19) 28N 1 (b 1 )=0.68649=NORMSDIST(B20) 29N 1 (b 2 )=0.6598=NORMSDIST(B21) 30N 1 (-b 1 )=0.31351=NORMSDIST(-B20) 6

31N 1 (-b 2 )=0.3402=NORMSDIST(-B21) 32ρ=ρ=-0.74536=-SQRT(B10/B9) 33a = a 1 ;b = -b 1 34Φ(a,-b;-ρ)=0.20259=phi(-B20,0,-B37) 35Φ(-a,b;-ρ)=0.04084=phi(-B18,0,-B36) 36ρab=0.87002 =((B32*B18-(-B20))*IF(B18>=0,1,-1))/SQRT(B 18^2-2*B32*B18*-B20+(-B20)^2) 37ρba=-0.31979 =((B32*-B20-(B18))*IF(-B20>=0,1,-1))/SQRT (B18^2-2*B32*B18*-B20+(-B20)^2) 38N 2 (a,0;ρab)=0.45916=bivarncdf(B18,0,B36) 39N 2 (b,0;ρba)=0.11092=bivarncdf(-B20,0,B37) 40δ=0.5=(1-IF(B18>=0,1,-1)*IF(-B20>=0,1,-1))/4 41a = a 2 ;b = b 2 42Φ(a,-b;-ρ)=0.24401=phi(-B21,0,-B45) 43Φ(-a,b;-ρ)=0.02757=phi(-B19,0,-B44) 44ρab=0.94558 =((B32*B19-(-B21))*IF(B19>=0,1,-1))/SQRT (B19^2-2*B32*B19*-B21+(-B21)^2) 45ρba=-0.48787 =((B32*-B21-(B19))*IF(-B21>=0,1,-1))/SQRT (B19^2-2*B32*B19*-B21+(-B21)^2) 7

46N 2 (a,0;ρab)=0.47243=bivarncdf(B19,0,B44) 47N 2 (b,0;ρba)=0.09619=bivarncdf(-B21,0,B45) 48δ=0.5=(1-IF(B19>=0,1,-1)*IF(-B21>=0,1,-1))/4 49 50N 2 (a 1,-b 1 ;ρ)=0.07007=bivarncdf(B18,-B20,B32) 51N 2 (a 2,-b 2 ;ρ)=0.06862=bivarncdf(B19,-B21,B32) 52 53 c(value of European call option to buy one share) 2.40123 =B5*NORMSDIST(B16)-B6*EXP(-B7*B9)*NO RMSDIST(B17) 54 p(value of European put option to sell one share) 1.44186 =-B5*NORMSDIST(-B16)+B6*EXP(-B7*B9)*NO RMSDIST(-B17) 55 c(value of American call option to buy one share) 3.08238 =(B3-B11*EXP(-B7*B10))*(NORMSDIST(B20) +bivarncdf(B18,-B20,-SQRT(B10/B9)))-B6*EXP (-B7*B9)*(NORMSDIST(B21)*EXP(B7*(B9-B10 ))+bivarncdf(B19,-B21,-SQRT(B10/B9)))+B11*EX P(-B7*B10)*NORMSDIST(B21) 8

Download ppt "Appendix 19 A Microsoft Excel Program for Calculating Cumulative Bivariate Normal Density Function ( 19.8.2) By Cheng Few Lee Joseph Finnerty John Lee."

Similar presentations