30 : calendar_(
std::move(cal)), referenceDate_(referenceDate), settlementDays_(
Null<
Natural>()),
31 dayCounter_(
std::move(dc)) {}
34 : moving_(true), updated_(false), calendar_(
std::move(cal)), settlementDays_(settlementDays),
35 dayCounter_(
std::move(dc)) {
55 bool extrapolate)
const {
57 "date (" <<
d <<
") before reference date (" <<
60 "date (" <<
d <<
") is past max curve date ("
65 bool extrapolate)
const {
67 "negative time (" <<
t <<
") given");
70 "time (" <<
t <<
") is past max curve time ("
Date advance(const Date &, Integer n, TimeUnit unit, BusinessDayConvention convention=Following, bool endOfMonth=false) const
template class providing a null value for a given type.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
DateProxy & evaluationDate()
the date at which pricing is to be performed.
static Settings & instance()
access to the unique instance
virtual Natural settlementDays() const
the settlementDays used for reference date calculation
virtual const Date & referenceDate() const
the date at which discount = 1.0 and/or variance = 0.0
virtual Calendar calendar() const
the calendar used for reference and/or option date calculation
virtual Time maxTime() const
the latest time for which the curve can return values
TermStructure(DayCounter dc=DayCounter())
default constructor
virtual Date maxDate() const =0
the latest date for which the curve can return values
void checkRange(const Date &d, bool extrapolate) const
date-range check
floating-point comparisons
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Real Time
continuous quantity with 1-year units
unsigned QL_INTEGER Natural
positive integer
bool close_enough(const Quantity &m1, const Quantity &m2, Size n)
base class for term structures