Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::Calendar Class Reference

#include <calendar.hpp>

Inheritance diagram for QuantLib::Calendar:

QuantLib::Argentina QuantLib::Australia QuantLib::BespokeCalendar QuantLib::Brazil QuantLib::Canada QuantLib::China QuantLib::CzechRepublic QuantLib::Denmark QuantLib::Finland QuantLib::Germany QuantLib::HongKong QuantLib::Hungary QuantLib::Iceland QuantLib::India QuantLib::Indonesia QuantLib::Italy QuantLib::Japan QuantLib::JointCalendar QuantLib::Mexico QuantLib::NewZealand QuantLib::Norway QuantLib::NullCalendar QuantLib::Poland QuantLib::SaudiArabia QuantLib::Singapore QuantLib::Slovakia QuantLib::SouthAfrica QuantLib::SouthKorea QuantLib::Sweden QuantLib::Switzerland QuantLib::Taiwan QuantLib::TARGET QuantLib::Turkey QuantLib::Ukraine QuantLib::UnitedKingdom QuantLib::UnitedStates QuantLib::WeekendsOnly

List of all members.


Detailed Description

calendar class

This class provides methods for determining whether a date is a business day or a holiday for a given market, and for incrementing/decrementing a date of a given number of business days.

The Bridge pattern is used to provide the base behavior of the calendar, namely, to determine whether a date is a business day.

A calendar should be defined for specific exchange holiday schedule or for general country holiday schedule. Legacy city holiday schedule calendars will be moved to the exchange/country convention.

Test:
the methods for adding and removing holidays are tested by inspecting the calendar before and after their invocation.

Definition at line 58 of file calendar.hpp.


Calendar interface

void addHoliday (const Date &)
Date adjust (const Date &, BusinessDayConvention convention=Following) const
Date advance (const Date &date, const Period &period, BusinessDayConvention convention=Following, bool endOfMonth=false) const
Date advance (const Date &, Integer n, TimeUnit unit, BusinessDayConvention convention=Following, bool endOfMonth=false) const
BigInteger businessDaysBetween (const Date &from, const Date &to, bool includeFirst=true, bool includeLast=false) const
bool empty () const
 Returns whether or not the calendar is initialized.
Date endOfMonth (const Date &d) const
 last business day of the month to which the given date belongs
bool isBusinessDay (const Date &d) const
bool isEndOfMonth (const Date &d) const
bool isHoliday (const Date &d) const
bool isWeekend (Weekday w) const
std::string name () const
 Returns the name of the calendar.
void removeHoliday (const Date &)
static std::vector< DateholidayList (const Calendar &calendar, const Date &from, const Date &to, bool includeWeekEnds=false)
 Returns the holidays between two dates.

Public Member Functions

 Calendar ()

Protected Attributes

boost::shared_ptr< Implimpl_

Related Functions

(Note that these are not member functions.)

bool operator!= (const Calendar &, const Calendar &)
std::ostream & operator<< (std::ostream &, const Calendar &)
bool operator== (const Calendar &, const Calendar &)

Classes

class  Impl
 abstract base class for calendar implementations More...
class  OrthodoxImpl
 partial calendar implementation More...
class  WesternImpl
 partial calendar implementation More...

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index