%CH01     Program for chapter 1
%
% Plots a simple payoff diagram

clf
E1 = 2;
E2 = 4;

S = linspace(0,6,100);
B = max(S-E1,0)-max(S-E2,0);
plot(S,B)
ylim([0,3])

xlabel('S')
ylabel('B')
title('Bull Spread Payoff')
grid on
