DayCounter Class Reference
[Date and time calculations]
#include <ql/daycounter.hpp>
Inheritance diagram for DayCounter:

Detailed Description
day counter classThis class provides methods for determining the length of a time period according to given market convention, both as a number of days and as a year fraction.
The Bridge pattern is used to provide the base behavior of the day counter.
- Examples:
-
BermudanSwaption.cpp, ConvertibleBonds.cpp, DiscreteHedging.cpp, EquityOption.cpp, and swapvaluation.cpp.
Public Member Functions | |
| DayCounter () | |
DayCounter interface | |
| std::string | name () const |
| Returns the name of the day counter. | |
| BigInteger | dayCount (const Date &, const Date &) const |
| Returns the number of days between two dates. | |
| Time | yearFraction (const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const |
| Returns the period between two dates as a fraction of year. | |
Protected Member Functions | |
| DayCounter (const boost::shared_ptr< DayCounterImpl > &impl) | |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator== (const DayCounter &, const DayCounter &) |
| bool | operator!= (const DayCounter &, const DayCounter &) |
Constructor & Destructor Documentation
|
|
This default constructor returns a day counter with a null implementation, which is therefore unusable except as a placeholder. |
|
|
This protected constructor will only be invoked by derived classes which define a given DayCounter implementation |
Member Function Documentation
|
|
Returns the name of the day counter.
|
Friends And Related Function Documentation
|
||||||||||||
|
Returns |
