% % Written by: % -- % John L. Weatherwax 2006-12-31 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear all; close all; clc; E = 5; S = linspace(max(E-20,0),E+20)'; S(1)=[]; T = 10; t = linspace(0,T); t(1)=[]; r = 0.05; sigma = 0.05; g = blsgamma(S,E,r,t,sigma); %blsdelta,. blstheta, blsvega, blsrho figure; hold on; grid on; ch=plot( S, PC, '-ro' ); ph=plot( S, PP, '-gx' ); legend( [ch,ph], {'call', 'put'} ); axis( [ -15 +25 -7.5 40 ] ); xlabel('stock price at expiration'); ylabel('option value'); %saveas( gcf, '../WriteUp/Graphics/prob_5_7_cp_plot', 'epsc' );