30 std::vector<ext::shared_ptr<GeneralizedBlackScholesProcess> > p)
31 : processes_(
std::move(p)) {
35 const std::function<
Real(
36 const ext::shared_ptr<GeneralizedBlackScholesProcess>&)>&
f)
const {
45 const Date& maturityDate)
const {
48 return p->riskFreeRate()->discount(maturityDate);
55 [](
Real a,
Real b) ->
bool { return close_enough(a, b);}
57 "interest rates need to be the same for all underlyings"
68 const Date& maturityDate)
const {
71 return p->dividendYield()->discount(maturityDate);
77 const Date& maturityDate)
const {
80 return p->blackVolatility()->blackVariance(maturityDate, p->x0());
86 const Date& maturityDate)
const {
89 const Time maturity = p->blackVolatility()->timeFromReference(maturityDate);
90 return p->blackVolatility()->blackVol(maturityDate, p->x0())*std::sqrt(maturity);
1-D array used in linear algebra.
const_iterator end() const
const_iterator begin() const
floating-point comparisons
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::function< Real(Real)> b
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
Real Volatility
volatility
functionals and combinators not included in the STL