com::ftlabs::fisa::DayCountBasis_Actual Class Reference

Implementation of the Actual/Actual Day Count Basis. More...

#include <DayCountBasis.h>

Inheritance diagram for com::ftlabs::fisa::DayCountBasis_Actual:

com::ftlabs::fisa::DayCountBasis List of all members.

Public Member Functions

double calculateDaysInPeriod (const FISADate &previousCouponDate, const FISADate &nextCouponDate, int interestFrequency, bool eomAdjust) const
 Calculate the total number of days in a coupon period. This implementation returns calculateDays( previousCouponDate, nextCouponDate, security );.
double calculateDaysAccrued (const FISADate &previousCouponDate, const FISADate &nextCouponDate, const FISADate &settlementDate, int interestFrequency, bool eomAdjust) const
 Calculate the number of days accrued within a coupon period. This implementation returns calculateDays( previousCouponDate, settlementDate, security );.
double calculateDaysRemaining (const FISADate &previousCouponDate, const FISADate &nextCouponDate, const FISADate &settlementDate, int interestFrequency, bool eomAdjust) const
 Calculate the number of days remaining in a coupon period. This implementation returns calculateDays( settlementDate, nextCouponDate, security );.
double calculateDays (const FISADate &earlierDate, const FISADate &laterDate, int interestFrequency, bool eomAdjust) const
 Calculates the number of days in a given period using the using an actual day count. If excludeLeapDays is true, then leap days are ignored.
int getDaysInYear (const FISADate &date) const
 Calculate the number of days for a given year.
const std::string & getName (void) const
 Get the name of this DayCountBasis implementation.

Private Member Functions

 DayCountBasis_Actual (void)
 DayCountBasis_Actual (int daysInYear)
 DayCountBasis_Actual (int daysInYear, bool excludeLeapDays)
 ~DayCountBasis_Actual (void)
void init (void)

Private Attributes

const int daysInYear
const bool excludeLeapDays
std::string name

Friends

class DayCountBasis

Detailed Description

Implementation of the Actual/Actual Day Count Basis.


Constructor & Destructor Documentation

com::ftlabs::fisa::DayCountBasis_Actual::DayCountBasis_Actual ( void   )  [private]

com::ftlabs::fisa::DayCountBasis_Actual::DayCountBasis_Actual ( int  daysInYear  )  [private]

com::ftlabs::fisa::DayCountBasis_Actual::DayCountBasis_Actual ( int  daysInYear,
bool  excludeLeapDays 
) [private]

com::ftlabs::fisa::DayCountBasis_Actual::~DayCountBasis_Actual ( void   )  [private]


Member Function Documentation

void com::ftlabs::fisa::DayCountBasis_Actual::init ( void   )  [private]

double com::ftlabs::fisa::DayCountBasis_Actual::calculateDaysInPeriod ( const FISADate previousCouponDate,
const FISADate nextCouponDate,
int  interestFrequency,
bool  eomAdjust 
) const [virtual]

Calculate the total number of days in a coupon period. This implementation returns calculateDays( previousCouponDate, nextCouponDate, security );.

Parameters:
previousCouponDate the previous coupon date.
nextCouponDate the next coupon date.
interestFrequency the interestFrequency. This implementation ignores this parameter.
eomAdjust determines whether the end of month adjustment rule is used. This implementation ignores this parameter.

Returns:
the number of days within the given period.

Implements com::ftlabs::fisa::DayCountBasis.

double com::ftlabs::fisa::DayCountBasis_Actual::calculateDaysAccrued ( const FISADate previousCouponDate,
const FISADate nextCouponDate,
const FISADate settlementDate,
int  interestFrequency,
bool  eomAdjust 
) const [virtual]

Calculate the number of days accrued within a coupon period. This implementation returns calculateDays( previousCouponDate, settlementDate, security );.

Parameters:
previousCouponDate the previous coupon date.
nextCouponDate the next coupon date.
settlementDate the date on which settlement occurs.
interestFrequency the interestFrequency. This implementation ignores this parameter.
eomAdjust determines whether the end of month adjustment rule is used. This implementation ignores this parameter.

Returns:
the number of days accrued within the given period.

Implements com::ftlabs::fisa::DayCountBasis.

double com::ftlabs::fisa::DayCountBasis_Actual::calculateDaysRemaining ( const FISADate previousCouponDate,
const FISADate nextCouponDate,
const FISADate settlementDate,
int  interestFrequency,
bool  eomAdjust 
) const [virtual]

Calculate the number of days remaining in a coupon period. This implementation returns calculateDays( settlementDate, nextCouponDate, security );.

Parameters:
previousCouponDate the previous coupon date.
nextCouponDate the next coupon date.
settlementDate the date on which settlement occurs.
interestFrequency the interestFrequency. This implementation ignores this parameter.
eomAdjust determines whether the end of month adjustment rule is used. This implementation ignores this parameter.

Returns:
the number of days remaining in the given period.

Implements com::ftlabs::fisa::DayCountBasis.

double com::ftlabs::fisa::DayCountBasis_Actual::calculateDays ( const FISADate earlierDate,
const FISADate laterDate,
int  interestFrequency,
bool  eomAdjust 
) const [virtual]

Calculates the number of days in a given period using the using an actual day count. If excludeLeapDays is true, then leap days are ignored.

Parameters:
earlierDate The starting date of the period.
laterDate The ending date of the period.
interestFrequency the interestFrequency. This implementation ignores this parameter.
eomAdjust determines whether the end of month adjustment rule is used. This implementation ignores this parameter.

Returns:
the number of days within the specified period.

Implements com::ftlabs::fisa::DayCountBasis.

int com::ftlabs::fisa::DayCountBasis_Actual::getDaysInYear ( const FISADate date  )  const [virtual]

Calculate the number of days for a given year.

Parameters:
date The date for which the number of days per year will be returned.

Returns:
the actual number of days in the given year if daysInYear is less than or equal to zero, otherwise returns the value of daysInYear which would usually be 360 or 365.

Implements com::ftlabs::fisa::DayCountBasis.

const std::string& com::ftlabs::fisa::DayCountBasis_Actual::getName ( void   )  const [virtual]

Get the name of this DayCountBasis implementation.

Returns:
The name of this DayCountBasis implementation.

Implements com::ftlabs::fisa::DayCountBasis.


Friends And Related Function Documentation

friend class DayCountBasis [friend]


Member Data Documentation

const int com::ftlabs::fisa::DayCountBasis_Actual::daysInYear [private]

const bool com::ftlabs::fisa::DayCountBasis_Actual::excludeLeapDays [private]

std::string com::ftlabs::fisa::DayCountBasis_Actual::name [private]


The documentation for this class was generated from the following file:
Generated on Tue Feb 5 03:50:23 2008 for FTLabs FISA (c++) by  doxygen 1.5.2