com::ftlabs::fisa::calc::FixedInterestRateCalculator Class Reference

#include <FixedInterestRateCalculator.h>

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

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 com::ftlabs::fisa::calc::FirstPeriodSimpleInterestCalculator com::ftlabs::fisa::calc::MSRBFixedInterestRateCalculator com::ftlabs::fisa::calc::SimpleYTRMultiplePeriodCalculator List of all members.

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)
FixedInterestRateCalculatoroperator= (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 Calculatorclone (void) const

Protected Attributes

double interestRate
int cashFlowCount
double taxAdjustedInterestRate
double taxAdjustedRedemptionValue

Private Attributes

TrueYieldConvergable ** trueYieldConvergable
const HolidayScheduleholidaySchedule
std::auto_ptr< PeriodicYieldConvergableperiodicYieldConvergable

Classes

class  PeriodicYieldConvergable

Constructor & Destructor Documentation

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]


Member Function Documentation

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.

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.

virtual double com::ftlabs::fisa::calc::FixedInterestRateCalculator::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.

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.

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.

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.

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

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.

Returns:
The number of cashflows within the supported 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.

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::FixedInterestRateCalculator::calculatePeriodicYield ( double  price  )  const throw ( CalculationException ) [virtual]

Calculate a periodic discounted cash flow yield for use with convexity/duration methods.

Parameters:
price the price.
Returns:
Periodic discounted cash flow yield.

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.

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::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.

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::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.

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.

double com::ftlabs::fisa::calc::FixedInterestRateCalculator::calculateAccruedIncome ( const FISADate salesDate  )  const throw ( CalculationException ) [virtual]

Calculates the accrued interest income to the supplied salesDate.

Parameters:
salesDate The projected or actual sales date.
Returns:
The accrued interest income to the supplied salesDate.
Exceptions:
com::ftlabs::fisa::calc::CalculationException CalculationException

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

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

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

Reimplemented in com::ftlabs::fisa::calc::FirstPeriodSimpleInterestCalculator, com::ftlabs::fisa::calc::MSRBFixedInterestRateCalculator, and com::ftlabs::fisa::calc::SimpleYTRMultiplePeriodCalculator.


Member Data Documentation

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]

int com::ftlabs::fisa::calc::FixedInterestRateCalculator::cashFlowCount [protected]

double com::ftlabs::fisa::calc::FixedInterestRateCalculator::taxAdjustedInterestRate [protected]

double com::ftlabs::fisa::calc::FixedInterestRateCalculator::taxAdjustedRedemptionValue [protected]

std::auto_ptr<PeriodicYieldConvergable> com::ftlabs::fisa::calc::FixedInterestRateCalculator::periodicYieldConvergable [private]


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