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

Public Member Functions | |
| FixedInterestRateCalculator (void) | |
| FixedInterestRateCalculator (const FISADate &settlementDate, const Redemption &redemption, double parValue, double interestRate, const DayCountBasis &dayCountBasis, int interestFrequency, bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate) throw ( CalculationException ) | |
| FixedInterestRateCalculator (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, double parValue, double interestRate, const DayCountBasis &dayCountBasis, int interestFrequency, bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate) throw ( CalculationException ) | |
| FixedInterestRateCalculator (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, double parValue, double interestRate, const DayCountBasis &dayCountBasis, int interestFrequency, bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate, const HolidaySchedule *holidaySchedule) throw ( CalculationException ) | |
| FixedInterestRateCalculator (const FixedInterestRateCalculator &calculator) | |
| FixedInterestRateCalculator & | operator= (const FixedInterestRateCalculator &calculator) |
| virtual | ~FixedInterestRateCalculator (void) |
| void | setValues (const FISADate &settlementDate, const Redemption &redemption, double parValue, double interestRate, const DayCountBasis &dayCountBasis, int interestFrequency, bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate) throw ( CalculationException ) |
| void | setValues (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, double parValue, double interestRate, const DayCountBasis &dayCountBasis, int interestFrequency, bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate) throw ( CalculationException ) |
| void | setValues (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, double parValue, double interestRate, const DayCountBasis &dayCountBasis, int interestFrequency, bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate, const HolidaySchedule *holidaySchedule) throw ( CalculationException ) |
| double | calculateCurrentYield (double price) const throw ( CalculationException ) |
| Calculate current yield for the given price. | |
| virtual double | calculateYield (double price) const throw ( CalculationException ) |
| Calculate yield for the given price. | |
| virtual 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. | |
| int | getCashFlowCount () const |
| Get the number of cashflows within the bounding settlement to Redemption period. | |
| double | getInterest (int cashFlowIndex) const |
| Get the interest to be paid for a particular cashflow, as specified by cashFlowIndex. | |
| double | calculatePeriodicYield (double price) const throw ( CalculationException ) |
| Calculate a periodic discounted cash flow yield for use with convexity/duration methods. | |
| double | calculatePriceValue1BP (double price, double yield) const throw ( 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 ( CalculationException ) |
| Calculate an estimated convexity. | |
| double | calculateTrueYield (double price) const throw ( CalculationException ) |
| Calculate a True Yield, using adjusting cashflows that fall on business days. | |
| double | calculateAccruedIncome (const FISADate &salesDate) const throw ( CalculationException ) |
| Calculates the accrued interest income to the supplied salesDate. | |
| virtual Calculator * | clone (void) const |
Protected Attributes | |
| double | interestRate |
| int | cashFlowCount |
| double | taxAdjustedInterestRate |
| double | taxAdjustedRedemptionValue |
Private Attributes | |
| TrueYieldConvergable ** | trueYieldConvergable |
| const HolidaySchedule * | holidaySchedule |
| std::auto_ptr< PeriodicYieldConvergable > | periodicYieldConvergable |
Classes | |
| class | PeriodicYieldConvergable |
| com::ftlabs::fisa::calc::FixedInterestRateCalculator::FixedInterestRateCalculator | ( | void | ) |
| com::ftlabs::fisa::calc::FixedInterestRateCalculator::FixedInterestRateCalculator | ( | const FISADate & | settlementDate, | |
| const Redemption & | redemption, | |||
| double | parValue, | |||
| double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| int | interestFrequency, | |||
| bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate | |||
| ) | throw ( CalculationException ) |
| com::ftlabs::fisa::calc::FixedInterestRateCalculator::FixedInterestRateCalculator | ( | const FISADate & | settlementDate, | |
| const FISADate * | exDividendDate, | |||
| const Redemption & | redemption, | |||
| double | parValue, | |||
| double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| int | interestFrequency, | |||
| bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate | |||
| ) | throw ( CalculationException ) |
| com::ftlabs::fisa::calc::FixedInterestRateCalculator::FixedInterestRateCalculator | ( | const FISADate & | settlementDate, | |
| const FISADate * | exDividendDate, | |||
| const Redemption & | redemption, | |||
| double | parValue, | |||
| double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| int | interestFrequency, | |||
| bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate, | |||
| const HolidaySchedule * | holidaySchedule | |||
| ) | throw ( CalculationException ) |
| com::ftlabs::fisa::calc::FixedInterestRateCalculator::FixedInterestRateCalculator | ( | const FixedInterestRateCalculator & | calculator | ) |
| virtual com::ftlabs::fisa::calc::FixedInterestRateCalculator::~FixedInterestRateCalculator | ( | void | ) | [virtual] |
| FixedInterestRateCalculator& com::ftlabs::fisa::calc::FixedInterestRateCalculator::operator= | ( | const FixedInterestRateCalculator & | calculator | ) |
| void com::ftlabs::fisa::calc::FixedInterestRateCalculator::setValues | ( | const FISADate & | settlementDate, | |
| const Redemption & | redemption, | |||
| double | parValue, | |||
| double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| int | interestFrequency, | |||
| bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate | |||
| ) | throw ( CalculationException ) |
| void com::ftlabs::fisa::calc::FixedInterestRateCalculator::setValues | ( | const FISADate & | settlementDate, | |
| const FISADate * | exDividendDate, | |||
| const Redemption & | redemption, | |||
| double | parValue, | |||
| double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| int | interestFrequency, | |||
| bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate | |||
| ) | throw ( CalculationException ) |
Reimplemented in com::ftlabs::fisa::calc::SimpleYTRMultiplePeriodCalculator.
| void com::ftlabs::fisa::calc::FixedInterestRateCalculator::setValues | ( | const FISADate & | settlementDate, | |
| const FISADate * | exDividendDate, | |||
| const Redemption & | redemption, | |||
| double | parValue, | |||
| double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| int | interestFrequency, | |||
| bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate, | |||
| const HolidaySchedule * | holidaySchedule | |||
| ) | throw ( CalculationException ) |
Reimplemented in com::ftlabs::fisa::calc::FirstPeriodSimpleInterestCalculator.
| double com::ftlabs::fisa::calc::FixedInterestRateCalculator::calculateCurrentYield | ( | double | price | ) | const throw ( CalculationException ) [virtual] |
Calculate current yield for the given price.
| price | a price |
Implements com::ftlabs::fisa::calc::Calculator.
| virtual double com::ftlabs::fisa::calc::FixedInterestRateCalculator::calculateYield | ( | double | price | ) | const throw ( CalculationException ) [virtual] |
Calculate yield for the given price.
| price | a price |
Implements com::ftlabs::fisa::calc::Calculator.
Reimplemented in com::ftlabs::fisa::calc::SimpleYTRMultiplePeriodCalculator.
| virtual double com::ftlabs::fisa::calc::FixedInterestRateCalculator::calculatePrice | ( | double | yield | ) | const throw ( CalculationException ) [virtual] |
Calculate price for the given yield.
| yield | a yield |
Implements com::ftlabs::fisa::calc::Calculator.
Reimplemented in com::ftlabs::fisa::calc::FirstPeriodSimpleInterestCalculator, com::ftlabs::fisa::calc::MSRBFixedInterestRateCalculator, and com::ftlabs::fisa::calc::SimpleYTRMultiplePeriodCalculator.
| double com::ftlabs::fisa::calc::FixedInterestRateCalculator::calculateAccruedInterest | ( | ) | const throw ( CalculationException ) [virtual] |
Calculate the accrued interest to the settlement date.
Implements com::ftlabs::fisa::calc::Calculator.
| int com::ftlabs::fisa::calc::FixedInterestRateCalculator::getCashFlowCount | ( | ) | const [virtual] |
Get the number of cashflows within the bounding settlement to Redemption period.
Implements com::ftlabs::fisa::calc::Calculator.
| double com::ftlabs::fisa::calc::FixedInterestRateCalculator::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::FixedInterestRateCalculator::calculatePeriodicYield | ( | double | price | ) | const throw ( CalculationException ) [virtual] |
Calculate a periodic discounted cash flow yield for use with convexity/duration methods.
| price | the price. |
Implements com::ftlabs::fisa::calc::Calculator.
| double com::ftlabs::fisa::calc::FixedInterestRateCalculator::calculatePriceValue1BP | ( | double | price, | |
| double | yield | |||
| ) | const throw ( 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::FixedInterestRateCalculator::calculateEstimatedConvexity | ( | double | pv1b, | |
| double | price, | |||
| double | yield | |||
| ) | const throw ( 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::FixedInterestRateCalculator::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.
| double com::ftlabs::fisa::calc::FixedInterestRateCalculator::calculateAccruedIncome | ( | const FISADate & | salesDate | ) | const throw ( CalculationException ) [virtual] |
Calculates the accrued interest income to the supplied salesDate.
| salesDate | The projected or actual sales date. |
Reimplemented from com::ftlabs::fisa::calc::MultiplePeriodCalculator.
| virtual Calculator* com::ftlabs::fisa::calc::FixedInterestRateCalculator::clone | ( | void | ) | const [virtual] |
TrueYieldConvergable** com::ftlabs::fisa::calc::FixedInterestRateCalculator::trueYieldConvergable [private] |
const HolidaySchedule* com::ftlabs::fisa::calc::FixedInterestRateCalculator::holidaySchedule [private] |
double com::ftlabs::fisa::calc::FixedInterestRateCalculator::interestRate [protected] |
std::auto_ptr<PeriodicYieldConvergable> com::ftlabs::fisa::calc::FixedInterestRateCalculator::periodicYieldConvergable [private] |
1.5.2