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

Public Member Functions | |
| InterestAtMaturityCalculator (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const bool eomAdjust, const FISADate &datedDate, const HolidaySchedule *holidaySchedule) throw ( com::ftlabs::fisa::calc::CalculationException ) | |
| InterestAtMaturityCalculator (const InterestAtMaturityCalculator &calculator) | |
| InterestAtMaturityCalculator & | operator= (const InterestAtMaturityCalculator &calculator) |
| ~InterestAtMaturityCalculator (void) | |
| void | setValues (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const bool eomAdjust, const FISADate &datedDate, const HolidaySchedule *holidaySchedule) throw ( com::ftlabs::fisa::calc::CalculationException ) |
| double | calculateCurrentYield (double price) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
| Calculate current yield for the given price. | |
| double | calculateYield (double price) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
| Calculate yield for the given price. | |
| 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 | getPrincipal (int cashFlowIndex) const |
| Get the principal to be paid for a particular cashflow, as specified by cashFlowIndex. | |
| double | getTimeToFlow (int cashFlowIndex) const |
| Get the time to flow for a particular cashflow, as specified by cashFlowIndex. | |
| double | getPeriodicTimeToFlow (int cashFlowIndex) const |
| Get the periodic time to flow as calculated with an actual day count method for a particular cashflow, as specified by cashFlowIndex. This value is generally used in actual convexity and duration methods. | |
| 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 | calculateYieldValue1_32 (double pv1b) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
| Calculate the average yield value obtained by varying the price up and down 1/32. | |
| double | calculateEstimatedMacaulayDuration (double pv1b, double price, double yield) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
| Calculate an estimated Macaulay duration. | |
| double | calculateEstimatedModifiedDuration (double pv1b, double price, double yield) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
| Calculate an estimated modified duration. | |
| double | calculateEstimatedModifiedDuration (double duration, double yield) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
| Calculate the estimated modified duration. | |
| 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 ( com::ftlabs::fisa::calc::CalculationException ) |
| Calculate a True Yield, using adjusting cashflows that fall on business days. | |
| virtual Calculator * | clone (void) const |
Private Attributes | |
| double | interestRate |
| double | taxAdjustedInterestRate |
| double | taxAdjustedRedemptionValue |
| double | aif |
| double | df |
| double | lcf |
| double | periodicTTF |
| double | ty_df |
| com::ftlabs::fisa::calc::InterestAtMaturityCalculator::InterestAtMaturityCalculator | ( | const FISADate & | settlementDate, | |
| const Redemption & | redemption, | |||
| const double | parValue, | |||
| const double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| const bool | eomAdjust, | |||
| const FISADate & | datedDate, | |||
| const HolidaySchedule * | holidaySchedule | |||
| ) | throw ( com::ftlabs::fisa::calc::CalculationException ) |
| com::ftlabs::fisa::calc::InterestAtMaturityCalculator::InterestAtMaturityCalculator | ( | const InterestAtMaturityCalculator & | calculator | ) |
| com::ftlabs::fisa::calc::InterestAtMaturityCalculator::~InterestAtMaturityCalculator | ( | void | ) |
| InterestAtMaturityCalculator& com::ftlabs::fisa::calc::InterestAtMaturityCalculator::operator= | ( | const InterestAtMaturityCalculator & | calculator | ) |
| void com::ftlabs::fisa::calc::InterestAtMaturityCalculator::setValues | ( | const FISADate & | settlementDate, | |
| const Redemption & | redemption, | |||
| const double | parValue, | |||
| const double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| const bool | eomAdjust, | |||
| const FISADate & | datedDate, | |||
| const HolidaySchedule * | holidaySchedule | |||
| ) | throw ( com::ftlabs::fisa::calc::CalculationException ) |
| double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::calculateCurrentYield | ( | double | price | ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual] |
Calculate current yield for the given price.
| price | a price |
Implements com::ftlabs::fisa::calc::Calculator.
| double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::calculateYield | ( | double | price | ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual] |
Calculate yield for the given price.
| price | a price |
Implements com::ftlabs::fisa::calc::Calculator.
| double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::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::InterestAtMaturityCalculator::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::InterestAtMaturityCalculator::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::InterestAtMaturityCalculator::getPrincipal | ( | int | cashFlowIndex | ) | const [virtual] |
Get the principal 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::InterestAtMaturityCalculator::getTimeToFlow | ( | int | cashFlowIndex | ) | const [virtual] |
Get the time to flow 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::InterestAtMaturityCalculator::getPeriodicTimeToFlow | ( | int | cashFlowIndex | ) | const [virtual] |
Get the periodic time to flow as calculated with an actual day count method for a particular cashflow, as specified by cashFlowIndex. This value is generally used in actual convexity and duration methods.
| 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::InterestAtMaturityCalculator::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::InterestAtMaturityCalculator::calculateYieldValue1_32 | ( | double | pv1b | ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual] |
Calculate the average yield value obtained by varying the price up and down 1/32.
| pv1b | The average price value obtained by varying the yield up and down one basis point, as returned by the calculatePriceValue1BP method. |
Implements com::ftlabs::fisa::calc::Calculator.
| double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::calculateEstimatedMacaulayDuration | ( | double | pv1b, | |
| double | price, | |||
| double | yield | |||
| ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual] |
Calculate an estimated Macaulay duration.
This is usually faster than the actual Macaulay duration 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::InterestAtMaturityCalculator::calculateEstimatedModifiedDuration | ( | double | pv1b, | |
| double | price, | |||
| double | yield | |||
| ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual] |
Calculate an estimated modified duration.
This is usually faster than the actual modified duration 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::InterestAtMaturityCalculator::calculateEstimatedModifiedDuration | ( | double | duration, | |
| double | yield | |||
| ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual] |
Calculate the estimated modified duration.
| duration | an estimated Macaulay Duration as returned from calculateEstimatedMacaulayDuration. | |
| yield | the yield. |
Implements com::ftlabs::fisa::calc::Calculator.
| double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::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::InterestAtMaturityCalculator::calculateTrueYield | ( | double | price | ) | const throw ( com::ftlabs::fisa::calc::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::OneCashFlowCalculator.
| virtual Calculator* com::ftlabs::fisa::calc::InterestAtMaturityCalculator::clone | ( | void | ) | const [virtual] |
Implements com::ftlabs::fisa::calc::Calculator.
double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::interestRate [private] |
double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::aif [private] |
double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::df [private] |
double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::lcf [private] |
double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::periodicTTF [private] |
double com::ftlabs::fisa::calc::InterestAtMaturityCalculator::ty_df [private] |
1.5.2