com::ftlabs::fisa::calc::CDLastPeriodCalculator Class Reference

#include <CDLastPeriodCalculator.h>

Inheritance diagram for com::ftlabs::fisa::calc::CDLastPeriodCalculator:

com::ftlabs::fisa::calc::LastPeriodCalculator com::ftlabs::fisa::calc::OneCashFlowCalculator com::ftlabs::fisa::calc::AbstractCalculator com::ftlabs::fisa::calc::Calculator com::ftlabs::fisa::calc::YieldConvergable List of all members.

Public Member Functions

 CDLastPeriodCalculator (const CDLastPeriodCalculator &calculator)
 CDLastPeriodCalculator (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, const HolidaySchedule *holidaySchedule) throw ( CalculationException )
 ~CDLastPeriodCalculator (void)
CDLastPeriodCalculatoroperator= (const CDLastPeriodCalculator &calculator)
void setValues (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, const HolidaySchedule *holidaySchedule) throw ( CalculationException )
double calculateCurrentYield (double price) const throw ( CalculationException )
 Calculate current yield for the given price.
double calculateYield (double price) const throw ( CalculationException )
 Calculate yield for the given price.
double calculatePrice (double yield) const throw ( CalculationException )
 Calculate price for the given yield.
double calculateAccruedInterest () const throw ( CalculationException )
 Calculate the accrued interest to the settlement date.
double getInterest (int cashFlowIndex) const
 Get the interest to be paid for a particular cashflow, as specified by cashFlowIndex.
double calculateTrueYield (double price) const throw ( CalculationException )
 Calculate a True Yield, using adjusting cashflows that fall on business days.
virtual Calculatorclone (void) const

Protected Member Functions

 CDLastPeriodCalculator (void)

Private Attributes

double interestRate
double yearFraction
double taxAdjustedInterestRate
double taxAdjustedRedemptionValue

Constructor & Destructor Documentation

com::ftlabs::fisa::calc::CDLastPeriodCalculator::CDLastPeriodCalculator ( void   )  [protected]

com::ftlabs::fisa::calc::CDLastPeriodCalculator::CDLastPeriodCalculator ( const CDLastPeriodCalculator calculator  ) 

com::ftlabs::fisa::calc::CDLastPeriodCalculator::CDLastPeriodCalculator ( const FISADate settlementDate,
const Redemption redemption,
const double  parValue,
const double  interestRate,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust,
const HolidaySchedule holidaySchedule 
) throw ( CalculationException )

com::ftlabs::fisa::calc::CDLastPeriodCalculator::~CDLastPeriodCalculator ( void   ) 


Member Function Documentation

CDLastPeriodCalculator& com::ftlabs::fisa::calc::CDLastPeriodCalculator::operator= ( const CDLastPeriodCalculator calculator  ) 

void com::ftlabs::fisa::calc::CDLastPeriodCalculator::setValues ( const FISADate settlementDate,
const Redemption redemption,
const double  parValue,
const double  interestRate,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust,
const HolidaySchedule holidaySchedule 
) throw ( CalculationException )

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::calculateCurrentYield ( double  price  )  const throw ( CalculationException ) [virtual]

Calculate current yield for the given price.

Parameters:
price a price
Returns:
current yield as calculated for the given price.
Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

Implements com::ftlabs::fisa::calc::Calculator.

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::calculateYield ( double  price  )  const throw ( CalculationException ) [virtual]

Calculate yield for the given price.

Parameters:
price a price
Returns:
yield as calculated for the given price.
Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

Implements com::ftlabs::fisa::calc::Calculator.

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::calculatePrice ( double  yield  )  const throw ( CalculationException ) [virtual]

Calculate price for the given yield.

Parameters:
yield a yield
Returns:
price as calculated for the given yield.
Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

Implements com::ftlabs::fisa::calc::Calculator.

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::calculateAccruedInterest (  )  const throw ( CalculationException ) [virtual]

Calculate the accrued interest to the settlement date.

Returns:
The accrued interest to the settlement date.
Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

Implements com::ftlabs::fisa::calc::Calculator.

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::getInterest ( int  cashFlowIndex  )  const [virtual]

Get the interest to be paid for a particular cashflow, as specified by cashFlowIndex.

Parameters:
cashFlowIndex The cashflow index. cashFlowIndex is zero based and must be a number from 0 to getCashFlowCount() - 1.

Returns:
The interest to be paid for the specified cashflow.

Implements com::ftlabs::fisa::calc::Calculator.

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::calculateTrueYield ( double  price  )  const throw ( CalculationException ) [virtual]

Calculate a True Yield, using adjusting cashflows that fall on business days.

Cashflow dates are adjusted according to a provided HolidaySchedule and/or weekend days.

Parameters:
price the clean price.
Returns:
The true yield using adjusted cashflows that fall on business days.
Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

Reimplemented from com::ftlabs::fisa::calc::OneCashFlowCalculator.

virtual Calculator* com::ftlabs::fisa::calc::CDLastPeriodCalculator::clone ( void   )  const [virtual]

Implements com::ftlabs::fisa::calc::Calculator.


Member Data Documentation

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::interestRate [private]

Reimplemented from com::ftlabs::fisa::calc::LastPeriodCalculator.

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::yearFraction [private]

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::taxAdjustedInterestRate [private]

double com::ftlabs::fisa::calc::CDLastPeriodCalculator::taxAdjustedRedemptionValue [private]


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