QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Private Member Functions | List of all members
ActualActual Class Reference

Actual/Actual day count. More...

#include <actualactual.hpp>

+ Inheritance diagram for ActualActual:
+ Collaboration diagram for ActualActual:

Classes

class  AFB_Impl
 
class  ISDA_Impl
 
class  ISMA_Impl
 
class  Old_ISMA_Impl
 

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. More...
 
std::string name () const
 Returns the name of the day counter. More...
 
Date::serial_type dayCount (const Date &, const Date &) const
 Returns the number of days between two dates. More...
 
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. More...
 

Static Private Member Functions

static ext::shared_ptr< DayCounter::Implimplementation (Convention c, Schedule schedule)
 

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:

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.

Definition at line 51 of file actualactual.hpp.

Member Enumeration Documentation

◆ Convention

enum Convention
Enumerator
ISMA 
Bond 
ISDA 
Historical 
Actual365 
AFB 
Euro 

Definition at line 53 of file actualactual.hpp.

Constructor & Destructor Documentation

◆ ActualActual()

ActualActual ( Convention  c,
Schedule  schedule = Schedule() 
)
explicit

Definition at line 92 of file actualactual.hpp.

Member Function Documentation

◆ implementation()

ext::shared_ptr< DayCounter::Impl > implementation ( ActualActual::Convention  c,
Schedule  schedule 
)
staticprivate

Definition at line 127 of file actualactual.cpp.

+ Here is the call graph for this function: