com::ftlabs::fisa::calc::LastPeriodCompoundInterestCalculator Class Reference

#include <LastPeriodCompoundInterestCalculator.h>

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

com::ftlabs::fisa::calc::LastPeriodCalculator com::ftlabs::fisa::calc::OneCashFlowCalculator com::ftlabs::fisa::calc::AbstractCalculator com::ftlabs::fisa::calc::Calculator com::ftlabs::fisa::calc::YieldConvergable List of all members.

Public Member Functions

 LastPeriodCompoundInterestCalculator (const LastPeriodCompoundInterestCalculator &calculator)
 LastPeriodCompoundInterestCalculator (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust) throw ( CalculationException )
 LastPeriodCompoundInterestCalculator (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, const HolidaySchedule *holidaySchedule) throw ( CalculationException )
LastPeriodCompoundInterestCalculatoroperator= (const LastPeriodCompoundInterestCalculator &calculator)
virtual ~LastPeriodCompoundInterestCalculator (void)
void setValues (const FISADate &settlementDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust) throw ( CalculationException )
void setValues (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, 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.
double getInterest (int cashFlowIndex) const
 Get the interest to be paid for a particular cashflow, as specified by cashFlowIndex.
virtual 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.
virtual double calculateEstimatedMacaulayDuration (double pv1b, double price, double yield) const throw ( CalculationException )
 Calculate an estimated Macaulay duration.
virtual double calculateEstimatedModifiedDuration (double duration, double yield) const throw ( CalculationException )
 Calculate the estimated modified duration.
virtual double calculateEstimatedConvexity (double pv1b, double price, double yield) const throw ( CalculationException )
 Calculate an estimated convexity.
virtual 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

 LastPeriodCompoundInterestCalculator (void)

Protected Attributes

double taxAdjustedInterestRate
double taxAdjustedRedemptionValue

Constructor & Destructor Documentation

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

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

com::ftlabs::fisa::calc::LastPeriodCompoundInterestCalculator::LastPeriodCompoundInterestCalculator ( const FISADate settlementDate,
const Redemption redemption,
const double  parValue,
const double  interestRate,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust 
) throw ( CalculationException )

com::ftlabs::fisa::calc::LastPeriodCompoundInterestCalculator::LastPeriodCompoundInterestCalculator ( const FISADate settlementDate,
const FISADate exDividendDate,
const Redemption redemption,
const double  parValue,
const double  interestRate,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust,
const HolidaySchedule holidaySchedule 
) throw ( CalculationException )

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


Member Function Documentation

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

void com::ftlabs::fisa::calc::LastPeriodCompoundInterestCalculator::setValues ( const FISADate settlementDate,
const Redemption redemption,
const double  parValue,
const double  interestRate,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust 
) throw ( CalculationException )

void com::ftlabs::fisa::calc::LastPeriodCompoundInterestCalculator::setValues ( const FISADate settlementDate,
const FISADate exDividendDate,
const Redemption redemption,
const double  parValue,
const double  interestRate,
const DayCountBasis dayCountBasis,
const int  interestFrequency,
const bool  eomAdjust,
const HolidaySchedule holidaySchedule 
) throw ( CalculationException )

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

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

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

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

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

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

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

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

Calculate an estimated Macaulay duration.

This is usually faster than the actual Macaulay duration 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 Macaulay duration.

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

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

virtual double com::ftlabs::fisa::calc::LastPeriodCompoundInterestCalculator::calculateEstimatedModifiedDuration ( double  duration,
double  yield 
) const throw ( CalculationException ) [virtual]

Calculate the estimated modified duration.

Parameters:
duration an estimated Macaulay Duration as returned from calculateEstimatedMacaulayDuration.
yield the yield.

Returns:
estimated modified duration.

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

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

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

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

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

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

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


Member Data Documentation

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

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


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