You are on page 1of 8

Plot the variation of theta with stock

price for a call option


x=50;
r=0.05;
t=0.5;
sig=0.2;
div=0;
s=30:120;
[call_theta,put_theta]=blstheta(s,x,r,t,sig,
div)
figure
plot(s,call_theta,'-')
title('theta vs. s')
xlabel('s')
ylabel('theta')
legend('theta')

Plot the variation of gamma with stock price for a


call option
x=50;
r=0.05;
t=0.5;
sig=0.2;
div=0;
s=30:120;
gamma=blsgamma(s,x,r,t,sig,div)

figure
plot(s,gamma,'-')
title('gamma vs. s')
xlabel('s')
ylabel('gamma')
legend('gamma')

Plot the variation of vega with stock price


for a call option
x=50;
r=0.05;
t=0.5;
sig=0.2;
div=0;
s=30:120;
vega=blsvega(s,x,r,t,sig,div)
figure
plot(s, delta,'-')
title('delta vs. s')
xlabel('s')
ylabel('delta')
legend('delta')

Plot the patterns for variation of delta


with time to maturity for a call option
x=50;
r=0.05;
t=1:10
sig=0.2;
div=0;
s=30
delta=blsdelta(s,x,r,t,sig,div)
figure
Plot(t, delta,'-')
title('delta vs. s')
xlabel('s')
ylabel('delta')
legend('delta')

You might also like