clear all

% European Call Options
calput = 'C';
x = 5.0;
s1 = 4.9; 
t = 20.0/52;
sigma = 0.2;
r = 0.05;
q = 0.0;

[p1, delta, gamma, vega, theta, rho, crho, vanna, ...
   charm, speed, colour, zomma, vomma, ifail] = ...
                   s30ab(calput, x, s1, t, sigma, r, q);
p1
delta

s2 = 4.95;
t = 19.0/52;
[p2, ifail] = s30aa(calput, x, s2, t, sigma, r, q);

p2

netgain  = (p1 - p2 + delta*s2 - delta*s1 * (1 + r/52)) * 100000

% Heston's Stochastic Volatility Model
x = 100;
s = 100;
t = 1:15;
sigmav = 0.5751;
kappa =1.5768;
corr = -0.5711;
var0 = 0.0175;
eta = 0.0398;
r = 0.025;
q = 0.0;
gamma = 1.0;

[p, ifail] = s30na(calput, x, s, t, sigmav, kappa, corr, ...
                                         var0, eta, gamma, r, q);
                                     
plot(t,p)
xlabel('Time')
ylabel('Price of Call')