com::ftlabs::fisa::DayCountBasis_30_360 Class Reference

Implementation of the 30/360 Day Count Basis. More...

#include <DayCountBasis.h>

Inheritance diagram for com::ftlabs::fisa::DayCountBasis_30_360:

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 360/interestFrequency.
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 using the 30/360 day count method.
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 daysInPeriod - daysAccrued.
double calculateDays (const FISADate &earlierDate, const FISADate &laterDate, int interestFrequency, bool eomAdjust) const
 Calculate the number of days between two dates using the 30/360 Day Count method.
int getDaysInYear (const FISADate &date) const
 Calculate the number of days for a given year.
const std::string & getName (void) const

Private Member Functions

 DayCountBasis_30_360 (void)
 ~DayCountBasis_30_360 (void)

Static Private Attributes

static const std::string name

Friends

class DayCountBasis

Detailed Description

Implementation of the 30/360 Day Count Basis.


Constructor & Destructor Documentation

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

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


Member Function Documentation

double com::ftlabs::fisa::DayCountBasis_30_360::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 360/interestFrequency.

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

Returns:
the number of days within the given period.

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

double com::ftlabs::fisa::DayCountBasis_30_360::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 using the 30/360 day count method.

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

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

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

double com::ftlabs::fisa::DayCountBasis_30_360::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 daysInPeriod - daysAccrued.

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

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

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

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

Calculate the number of days between two dates using the 30/360 Day Count method.

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

Returns:
the number of days within the specified period.

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

int com::ftlabs::fisa::DayCountBasis_30_360::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:
360. For 30/360, every year is considered to have 360 days.

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

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

Return 30/360 for this implementation.

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


Friends And Related Function Documentation

friend class DayCountBasis [friend]


Member Data Documentation

const std::string com::ftlabs::fisa::DayCountBasis_30_360::name [static, 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