com::ftlabs::fisa::calc::CDSteppedCouponCalculator Class Reference

#include <CDSteppedCouponCalculator.h>

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

com::ftlabs::fisa::calc::SteppedCouponCalculator com::ftlabs::fisa::calc::MultiplePeriodCalculator com::ftlabs::fisa::calc::MultipleCashFlowCalculator com::ftlabs::fisa::calc::AbstractCalculator com::ftlabs::fisa::calc::Calculator com::ftlabs::fisa::calc::YieldConvergable List of all members.

Public Member Functions

 CDSteppedCouponCalculator (const CDSteppedCouponCalculator &calculator)
 CDSteppedCouponCalculator (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const InterestRateSchedule &interestRateSchedule, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate, const HolidaySchedule *holidaySchedule) throw ( com::ftlabs::fisa::calc::CalculationException )
virtual ~CDSteppedCouponCalculator (void)
CDSteppedCouponCalculatoroperator= (const CDSteppedCouponCalculator &calculator)
void setValues (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const InterestRateSchedule &interestRateSchedule, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate, const HolidaySchedule *holidaySchedule) throw ( com::ftlabs::fisa::calc::CalculationException )
double calculatePrice (double yield) const throw ( com::ftlabs::fisa::calc::CalculationException )
 Calculate price for the given yield.
double calculateAccruedInterest () const throw ( com::ftlabs::fisa::calc::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 calculatePriceValue1BP (double price, double yield) const throw ( com::ftlabs::fisa::calc::CalculationException )
 Calculate the average price value obtained by varying the yield up and down one basis point.
double calculateEstimatedConvexity (double pv1b, double price, double yield) const throw ( com::ftlabs::fisa::calc::CalculationException )
 Calculate an estimated convexity.
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

 CDSteppedCouponCalculator (void)

Protected Attributes

double * yearFractions
double remainingYearFraction

Private Attributes

CDTrueYieldConvergable ** trueYieldConvergable
const HolidayScheduleholidaySchedule
const DayCountBasisdayCountBasis
FISADate interestAccrualDate

Constructor & Destructor Documentation

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

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

com::ftlabs::fisa::calc::CDSteppedCouponCalculator::CDSteppedCouponCalculator ( const FISADate settlementDate,
const Redemption redemption,
const double  parValue,
const InterestRateSchedule interestRateSchedule,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust,
const FISADate datedDate,
const FISADate firstInterestDate,
const HolidaySchedule holidaySchedule 
) throw ( com::ftlabs::fisa::calc::CalculationException )

virtual com::ftlabs::fisa::calc::CDSteppedCouponCalculator::~CDSteppedCouponCalculator ( void   )  [virtual]


Member Function Documentation

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

void com::ftlabs::fisa::calc::CDSteppedCouponCalculator::setValues ( const FISADate settlementDate,
const Redemption redemption,
const double  parValue,
const InterestRateSchedule interestRateSchedule,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust,
const FISADate datedDate,
const FISADate firstInterestDate,
const HolidaySchedule holidaySchedule 
) throw ( com::ftlabs::fisa::calc::CalculationException )

double com::ftlabs::fisa::calc::CDSteppedCouponCalculator::calculatePrice ( double  yield  )  const throw ( com::ftlabs::fisa::calc::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::CDSteppedCouponCalculator::calculateAccruedInterest (  )  const throw ( com::ftlabs::fisa::calc::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::CDSteppedCouponCalculator::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::CDSteppedCouponCalculator::calculatePriceValue1BP ( double  price,
double  yield 
) const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Calculate the average price value obtained by varying the yield up and down one basis point.

Returns:
the average price value obtained by varying the yield up and down one basis point.

Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

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

double com::ftlabs::fisa::calc::CDSteppedCouponCalculator::calculateEstimatedConvexity ( double  pv1b,
double  price,
double  yield 
) const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Calculate an estimated convexity.

This is usually faster than the actual convexity method.

Parameters:
pv1b The average price value obtained by varying the yield up and down one basis point, as returned by the calculatePriceValue1BP method.
price the price.
yield the yield.

Returns:
an estimated convexity.

Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

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

double com::ftlabs::fisa::calc::CDSteppedCouponCalculator::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::MultipleCashFlowCalculator.

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

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


Member Data Documentation

double* com::ftlabs::fisa::calc::CDSteppedCouponCalculator::yearFractions [protected]

double com::ftlabs::fisa::calc::CDSteppedCouponCalculator::remainingYearFraction [protected]

CDTrueYieldConvergable** com::ftlabs::fisa::calc::CDSteppedCouponCalculator::trueYieldConvergable [private]

const HolidaySchedule* com::ftlabs::fisa::calc::CDSteppedCouponCalculator::holidaySchedule [private]

const DayCountBasis* com::ftlabs::fisa::calc::CDSteppedCouponCalculator::dayCountBasis [private]

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

FISADate com::ftlabs::fisa::calc::CDSteppedCouponCalculator::interestAccrualDate [private]

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


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