27 const std::vector<Date>& dates,
30 bool forceMonotoneVariance)
32 maxDate_(dates.back()), volatilities_(
std::move(volatilities)),
33 forceMonotoneVariance_(forceMonotoneVariance) {
35 "size mismatch between dates and volatilities");
38 "cannot have dates_[0] <= referenceDate");
40 variances_ = std::vector<Real>(dates.size()+1);
41 times_ = std::vector<Time>(dates.size()+1);
44 for (
Size j=1; j<=dates.size(); ++j) {
47 "dates must be sorted unique!");
51 setInterpolation<Linear>();
64 "variance must be non-decreasing");
Black variance term structure.
std::vector< Real > variances_
std::vector< Time > times_
std::vector< Handle< Quote > > volatilities_
bool forceMonotoneVariance_
Interpolation varianceCurve_
ExtendedBlackVarianceCurve(const Date &referenceDate, const std::vector< Date > &dates, std::vector< Handle< Quote > > volatilities, DayCounter dayCounter, bool forceMonotoneVariance=true)
Real blackVarianceImpl(Time t, Real) const override
Black variance calculation.
Shared handle to an observable.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
virtual const Date & referenceDate() const
the date at which discount = 1.0 and/or variance = 0.0
Time timeFromReference(const Date &date) const
date/time conversion
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Black volatility curve modelled as variance curve.
Real Time
continuous quantity with 1-year units
Real Volatility
volatility
std::size_t Size
size of a container
linear interpolation between discrete points