QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
ActualActual Class Reference

Actual/Actual day count. More...

#include <ql/time/daycounters/actualactual.hpp>

Inheritance diagram for ActualActual:

Public Types

enum  Convention {
  ISMA , Bond , ISDA , Historical ,
  Actual365 , AFB , Euro
}

Public Member Functions

 ActualActual (Convention c, Schedule schedule=Schedule())
Public Member Functions inherited from DayCounter
 DayCounter ()=default
bool empty () const
 Returns whether or not the day counter is initialized.
std::string name () const
 Returns the name of the day counter.
Date::serial_type 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.

Additional Inherited Members

Protected Member Functions inherited from DayCounter
 DayCounter (ext::shared_ptr< Impl > impl)
Protected Attributes inherited from DayCounter
ext::shared_ptr< Implimpl_

Detailed Description

Actual/Actual day count.

The day count can be calculated according to:

  • the ISDA convention, also known as "Actual/Actual (Historical)", "Actual/Actual", "Act/Act", and according to ISDA also "Actual/365", "Act/365", and "A/365";
  • the ISMA and US Treasury convention, also known as "Actual/Actual (Bond)";
  • the AFB convention, also known as "Actual/Actual (Euro)".

For more details, refer to https://www.isda.org/a/pIJEE/The-Actual-Actual-Day-Count-Fraction-1999.pdf

Tests
the correctness of the results is checked against known good values.
Examples
Bonds.cpp, CVAIRS.cpp, CallableBonds.cpp, and FRA.cpp.