1 / 19

HW6

HW6. 100071021 楊佑濬. Proportion Dividends (1). function [ Cprice , Pprice , Clattice , Plattice ] = bitprice_p ( S, K, r, T, sigma, q, tau, N, mode ) % mode : 1=>American 0=>European % dividend : proportion deltaT = T/N; u = exp ( sigma * sqrt ( deltaT ) ); d = 1/u;

diem
Download Presentation

HW6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HW6 100071021 楊佑濬

  2. Proportion Dividends (1) function [ Cprice, Pprice, Clattice, Plattice] = bitprice_p( S, K, r, T, sigma, q, tau, N, mode ) % mode : 1=>American 0=>European % dividend : proportion deltaT = T/N; u = exp( sigma * sqrt(deltaT) ); d = 1/u; p = ( exp( r * deltaT ) - d ) / ( u - d ); for i = 0 : N C(i+1) = max( 0, S * (1-q) * u^(N-i) * d^(i) - K ); P(i+1) = max( 0, K - S * (1-q) * u^(N-i) * d^(i) ); end

  3. Proportion Dividends (2) for i = N : -1 : 1 for j = 0 : i-1 C(j+1) = exp(-r*deltaT) * ( C(j+1)*p + C(j+2)*(1-p) ); P(j+1) = exp(-r*deltaT) * ( P(j+1)*p + P(j+2)*(1-p) ); if mode == 1 now_p = S * u^(i-1-j) * d^(j) ; if i>tau now_p = now_p * (1-q); end C(j+1) = max( C(j+1) , now_p - K ); P(j+1) = max( P(j+1) , K - now_p ); end end Clattice(1:i,i) = C(1:i); Plattice(1:i,i) = P(1:i); end

  4. Example - European S0=50, K=50, r=0.02, T=1, sigma=0.2, q=0.1, tau=3, N=10, mode=European >> [c p clapla] = bitprice_p(50,50,0.02,1,0.2,0.1,3,10,0) c = 2.0767 p = 6.0867

  5. Example - American S0=50, K=50, r=0.02, T=1, sigma=0.2, q=0.1, tau=3, N=10, mode=American >> [c p clapla] = bitprice_p(50,50,0.02,1,0.2,0.1,3,10,1) c = 2.6130 p = 6.2852

  6. Compare European American c = 2.6130 p = 6.2852 c = 2.0767 p = 6.0867

  7. Dollar Dividends (1) function [ Cprice, Pprice, Clattice, Plattice] = bitprice_d( S, K, r, T, sigma, D, tau, N, mode ) % mode : 1=>American 0=>European % dividend : dollar deltaT = T/N; u = exp( sigma * sqrt(deltaT) ); d = 1/u; p = ( exp( r * deltaT ) - d ) / ( u - d ); Sa = S - D * exp( -r * tau * deltaT ); for i = 0 : N C(i+1) = max( 0, Sa * u^(N-i) * d^(i) - K ); P(i+1) = max( 0, K - Sa * u^(N-i) * d^(i) ); end

  8. Dollar Dividends (2) for i = N : -1 : 1 for j = 0 : i-1 C(j+1) = exp(-r*deltaT) * ( C(j+1)*p + C(j+2)*(1-p) ); P(j+1) = exp(-r*deltaT) * ( P(j+1)*p + P(j+2)*(1-p) ); if mode == 1 now_p = Sa * u^(i-1-j) * d^(j) ; if i<=tau now_p = now_p + D * exp( -r * (tau-i+1) * deltaT ); end C(j+1) = max( C(j+1) , now_p - K ); P(j+1) = max( P(j+1) , K - now_p ); end end Clattice(1:i,i) = C(1:i); Plattice(1:i,i) = P(1:i); end

  9. Example - European S0=50, K=50, r=0.02, T=1, sigma=0.2, D=5, tau=3, N=10, mode=European >> [c p cl pl] = bitprice_d(50,50,0.02,1,0.2,5,3,10,0) c = 2.0904 p = 6.0704

  10. Example - American S0=50, K=50, r=0.02, T=1, sigma=0.2, D=5, tau=3, N=10, mode=American >> [c p cl pl] = bitprice_d(50,50,0.02,1,0.2,5,3,10,1) c = 2.4588 p = 6.2673

  11. Compare European American c = 2.4588 p = 6.2673 c = 2.0904 p = 6.0704

More Related