calendar.hpp
Go to the documentation of this file.
33 Calendar(DayRollingConvention, int, const std::vector<Date>&, const std::vector<Date>& ,const std::vector<SmartPointer<Holiday> >&, bool end_of_month,const SmartPointer<SettlementDateConvention>&);
Date settlementDate(const Date &d, const Tenor &t) const
Calculates settlement date.
Definition: calendar.cpp:213
File contains template of deep-coping smart pointer.
bool isBusinessDay(const Date &) const
Method returns true if a given date is business day and false otherwise.
Definition: calendar.cpp:44
std::vector< SmartPointer< Holiday > > holidays_
Vector of holidays objects (see Holiday).
Definition: calendar.hpp:79
Definition: cadHoliday.cpp:3
File contains definition of SettlementFromSpot class.
Date adjust(const Date &) const
Method adjusts a date according to a given day rolling convention.
Definition: calendar.cpp:118
Date workingDays(const Date &, int) const
Method returns nth working day from a given date.
Definition: calendar.cpp:187
File contains definition of date class.
SmartPointer< SettlementDateConvention > settlement_
This variable holds object defining settlement date convention.
Definition: calendar.hpp:80
Date getON(const Date &) const
Method returns next working day of a calendar's date.
Definition: calendar.cpp:175
DayRollingConvention day_rolling_convention_
Variable defines the day rolling convention.
Definition: calendar.hpp:75
std::vector< Date > business_days_
Vector of dates that are recognized as working dates.
Definition: calendar.hpp:77
Date getTN(const Date &) const
Method returns second working day from a calendar's date.
Definition: calendar.cpp:181
Date expiryDate(const Date &d, const Tenor &t) const
Definition: calendar.cpp:240
bool end_of_month_
Boolean variable defining if end of month convention is applied.
Definition: calendar.hpp:76
File contains definition of tenor class.
std::vector< Date > holidays_dates_
Vector of dates that are recognized as holidays.
Definition: calendar.hpp:78
friend std::ostream & operator<<(std::ostream &, Calendar &)
Definition: calendar.cpp:250
int spot_lag_
This integer define how many working days is between today date and spot date.
Definition: calendar.hpp:74
File contains interface of settlement convention.
int businessDaysBetween(const Date &, const Date &) const
Method returns number of business days between date1 and date2.
Definition: calendar.cpp:91
bool isHoliday(const Date &) const
Method returns true if a given date is holiday and false otherwise.
Definition: calendar.cpp:55
Date getLastWorkingDateOfMonth(const Date &) const
Definition: calendar.cpp:299
File contains definition of Holiday class.
bool isWeekend(const Date &) const
Method returns true if a given date is a Saturday or Sunday and false otherwise.
Definition: calendar.cpp:82
void serialize(Archive &ar, const unsigned int)
interface used by Boost serialization library
Definition: calendar.hpp:64
int numberOfHolidaysBetween(const Date &, const Date &) const
Method returns number of holidays between date1 and date2.
Definition: calendar.cpp:104
File contain time units and other useful enumerations.
Date getSpot(const Date &) const
Method returns spot date for a given date.
Definition: calendar.cpp:168