27 ext::shared_ptr<GeneralizedBlackScholesProcess> process1,
28 ext::shared_ptr<GeneralizedBlackScholesProcess> process2,
39 const Real a = f2 + k;
42 const Real sigma1 = std::sqrt(variance1);
43 const Real sigma2 = std::sqrt(variance2);
45 const Real stdev = std::sqrt(
46 variance1 +
b*
b*variance2 - 2*
rho_*
b*sigma1*sigma2);
48 const Real lfa = std::log(f1/a);
51 (lfa + (0.5*variance1 + 0.5*
b*
b*variance2 -
b*
rho_*sigma1*sigma2))/stdev;
53 (lfa + (-0.5*variance1 + variance2*
b*(0.5*
b - 1) +
rho_*sigma1*sigma2))/stdev;
54 const Real d3 = (lfa + (-0.5*variance1 + 0.5*
b*
b*variance2))/stdev;
57 return df*cp*(f1*phi(cp*d1) - f2*phi(cp*d2) - k*phi(cp*d3));
Bjerksund and Stensland formulae (2006)
BjerksundStenslandSpreadEngine(ext::shared_ptr< GeneralizedBlackScholesProcess > process1, ext::shared_ptr< GeneralizedBlackScholesProcess > process2, Real correlation)
Cumulative normal distribution function.
virtual void calculate() const =0
std::function< Real(Real)> b
Real DiscountFactor
discount factor between dates
normal, cumulative and inverse cumulative distributions