#include <CDSteppedCouponCalculator.h>
Inheritance diagram for com::ftlabs::fisa::calc::CDSteppedCouponCalculator:

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) |
| CDSteppedCouponCalculator & | operator= (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 Calculator * | clone (void) const |
Protected Member Functions | |
| CDSteppedCouponCalculator (void) | |
Protected Attributes | |
| double * | yearFractions |
| double | remainingYearFraction |
Private Attributes | |
| CDTrueYieldConvergable ** | trueYieldConvergable |
| const HolidaySchedule * | holidaySchedule |
| const DayCountBasis * | dayCountBasis |
| FISADate | interestAccrualDate |
| 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] |
| 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.
| yield | a yield |
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.
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.
| cashFlowIndex | The cashflow index. cashFlowIndex is zero based and must be a number from 0 to getCashFlowCount() - 1. |
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.
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.
| 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. |
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.
| price | the clean price. |
Reimplemented from com::ftlabs::fisa::calc::MultipleCashFlowCalculator.
| virtual Calculator* com::ftlabs::fisa::calc::CDSteppedCouponCalculator::clone | ( | void | ) | const [virtual] |
Implements com::ftlabs::fisa::calc::Calculator.
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] |
Reimplemented from com::ftlabs::fisa::calc::MultiplePeriodCalculator.
Reimplemented from com::ftlabs::fisa::calc::MultiplePeriodCalculator.
1.5.2