26#include <ql/time/calendars/target.hpp>
27#include <ql/time/daycounters/actualactual.hpp>
28#include <ql/timegrid.hpp>
47 const QuantLib::DayCounter&
dayCounter = QuantLib::ActualActual(QuantLib::ActualActual::ISDA));
51 const QuantLib::DayCounter&
dayCounter = QuantLib::ActualActual(QuantLib::ActualActual::ISDA));
55 const QuantLib::DayCounter&
dayCounter = QuantLib::ActualActual(QuantLib::ActualActual::ISDA));
67 void truncate(
const QuantLib::Date& d,
bool overrun =
true);
76 void addCloseOutDates(
const QuantLib::Period& p = QuantLib::Period(2, QuantLib::Weeks));
81 const std::vector<QuantLib::Date>&
dates()
const {
return dates_; }
90 const std::vector<QuantLib::Time>&
times()
const {
return times_; }
125 const QuantLib::Period& shift = QuantLib::Period(2,
128QuantLib::ext::shared_ptr<DateGrid>
combineDateGrids(
const QuantLib::ext::shared_ptr<DateGrid>& dg1,
129 const QuantLib::ext::shared_ptr<DateGrid>& dg2);
void truncate(const QuantLib::Date &d, bool overrun=true)
Truncate the grid up to the given date.
const QuantLib::TimeGrid & timeGrid() const
Returns the time grid associated with the vector of times (plus t=0)
void truncate(QuantLib::Size length)
Truncate the grid to the given length.
std::map< QuantLib::Date, QuantLib::Date > valuationCloseOutMap_
DateGrid()
Build a date grid with a single date equal to Settings::instance().evaluationDate()
const std::vector< bool > & isValuationDate() const
QuantLib::TimeGrid closeOutTimeGrid() const
Returns the time grid associated with the vector of close-out times (plus t=0)
QuantLib::Size size() const
The size of the date grid.
std::vector< QuantLib::Date > closeOutDates() const
std::vector< QuantLib::Date > dates_
std::vector< QuantLib::Date > valuationDates() const
const std::vector< QuantLib::Time > & times() const
Returns the times from Settings::instance().evaluationDate to each Date using the day counter.
std::vector< bool > isValuationDate_
const QuantLib::Calendar & calendar() const
std::vector< QuantLib::Period > tenors_
const QuantLib::DayCounter & dayCounter() const
DateGrid(const std::vector< QuantLib::Date > &dates, const QuantLib::Calendar &gridCalendar=QuantLib::TARGET(), const QuantLib::DayCounter &dayCounter=QuantLib::ActualActual(QuantLib::ActualActual::ISDA))
Build a date grid from an explicit set of dates, sorted in ascending order.
QuantLib::Date closeOutDateFromValuationDate(const QuantLib::Date &d) const
QuantLib::Calendar calendar_
DateGrid(const std::vector< QuantLib::Period > &tenors, const QuantLib::Calendar &gridCalendar=QuantLib::TARGET(), const QuantLib::DayCounter &dayCounter=QuantLib::ActualActual(QuantLib::ActualActual::ISDA))
Build a date grid from the given vector of tenors.
const std::vector< QuantLib::Period > & tenors() const
QuantLib::TimeGrid valuationTimeGrid() const
Returns the time grid associated with the vector of valuation times (plus t=0)
const QuantLib::Date & operator[](QuantLib::Size i) const
Accessor methods.
std::vector< QuantLib::Time > times_
const std::vector< bool > & isCloseOutDate() const
void addCloseOutDates(const QuantLib::Period &p=QuantLib::Period(2, QuantLib::Weeks))
const std::vector< QuantLib::Date > & dates() const
QuantLib::DayCounter dayCounter_
std::vector< bool > isCloseOutDate_
QuantLib::TimeGrid timeGrid_
void buildDates(const QuantLib::Calendar &cal, const QuantLib::DayCounter &dc)
QuantLib::ext::shared_ptr< DateGrid > combineDateGrids(const QuantLib::ext::shared_ptr< DateGrid > &dg1, const QuantLib::ext::shared_ptr< DateGrid > &dg2)
QuantLib::ext::shared_ptr< DateGrid > generateShiftedDateGrid(const QuantLib::ext::shared_ptr< DateGrid > &dg, const QuantLib::Period &shift)
Serializable Credit Default Swap.