26#ifndef quantlib_schedule_hpp
27#define quantlib_schedule_hpp
47 const std::vector<Date>&,
50 const ext::optional<BusinessDayConvention>& terminationDateConvention =
ext::nullopt,
54 std::vector<bool>
isRegular = std::vector<bool>(0));
57 const Date& terminationDate,
65 const Date& nextToLastDate =
Date());
78 const std::vector<bool>&
isRegular()
const;
114 ext::optional<DateGeneration::Rule>
rule_;
165 #if defined(QL_EXTRA_SAFETY_CHECKS)
187 return static_cast<bool>(
tenor_);
192 "full interface (tenor) not available");
208 "full interface (termination date bdc) not available");
213 return static_cast<bool>(
rule_);
227 "full interface (end of month) not available");
MakeSchedule & withConvention(BusinessDayConvention)
ext::optional< BusinessDayConvention > convention_
MakeSchedule & withTerminationDateConvention(BusinessDayConvention)
ext::optional< Period > tenor_
ext::optional< BusinessDayConvention > terminationDateConvention_
MakeSchedule & withRule(DateGeneration::Rule)
MakeSchedule & backwards()
MakeSchedule & to(const Date &terminationDate)
MakeSchedule & withTenor(const Period &)
DateGeneration::Rule rule_
MakeSchedule & withFirstDate(const Date &d)
MakeSchedule & from(const Date &effectiveDate)
MakeSchedule & endOfMonth(bool flag=true)
MakeSchedule & withFrequency(Frequency)
MakeSchedule & forwards()
MakeSchedule & withNextToLastDate(const Date &d)
MakeSchedule & withCalendar(const Calendar &)
Calendar for reproducing theoretical calculations.
Date nextDate(const Date &refDate) const
const Date & endDate() const
ext::optional< Period > tenor_
const_iterator begin() const
ext::optional< BusinessDayConvention > terminationDateConvention_
std::vector< Date > dates_
const Calendar & calendar() const
const std::vector< Date > & dates() const
std::vector< bool > isRegular_
std::vector< Date >::const_iterator const_iterator
Date previousDate(const Date &refDate) const
BusinessDayConvention convention_
const Date & startDate() const
ext::optional< bool > endOfMonth_
ext::optional< DateGeneration::Rule > rule_
Schedule after(const Date &truncationDate) const
truncated schedule
const Date & at(Size i) const
const Date & operator[](Size i) const
DateGeneration::Rule rule() const
bool hasEndOfMonth() const
const_iterator lower_bound(const Date &d=Date()) const
const std::vector< bool > & isRegular() const
const Date & date(Size i) const
const_iterator end() const
bool hasTerminationDateBusinessDayConvention() const
BusinessDayConvention businessDayConvention() const
bool hasIsRegular() const
Schedule until(const Date &truncationDate) const
const Period & tenor() const
BusinessDayConvention terminationDateBusinessDayConvention() const
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Frequency
Frequency of events.
BusinessDayConvention
Business Day conventions.
std::size_t Size
size of a container
const boost::none_t & nullopt
Date previousTwentieth(const Date &d, DateGeneration::Rule rule)
Calendar for reproducing theoretical calculations.
Maps optional to either the boost or std implementation.
period- and frequency-related classes and enumerations