com::ftlabs::fisa::calc::DefaultAnalytics Class Reference

An implementation of Analytics that attempts to balance memory and CPU usage by caching only the values with more complex formulas, and values that are needed for multiple methods. More...

#include <DefaultAnalytics.h>

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

com::ftlabs::fisa::calc::Analytics List of all members.

Public Member Functions

 DefaultAnalytics (const Calculator *calculator, double price)
 DefaultAnalytics (const Calculator *calculator, double price, double yield)
 DefaultAnalytics (const DefaultAnalytics &analytics)
 ~DefaultAnalytics (void)
DefaultAnalyticsoperator= (const DefaultAnalytics &analytics)
const RedemptiongetRedemption (void)
double getPrice (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getYield (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getTrueYield (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getMacaulayDuration (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getModifiedDuration (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getConvexity (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getPriceValue1BP (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getYieldValue1_32 (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getEstimatedMacaulayDuration (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getEstimatedModifiedDuration (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getEstimatedConvexity (void) throw ( com::ftlabs::fisa::calc::CalculationException )
double getAccruedInterest (void) throw ( com::ftlabs::fisa::calc::CalculationException )
virtual double getTotalInterestFlows (void) throw ( com::ftlabs::fisa::calc::CalculationException )
 Get the total interest flows.
virtual double getInterestOnInterest (void) throw ( com::ftlabs::fisa::calc::CalculationException )
 Get interest on interest using an assumed reinvestment yield that is equal to yield.
virtual double getInterestOnInterest (double reinvestmentYield) throw ( com::ftlabs::fisa::calc::CalculationException )
 Get interest on interest.

Private Member Functions

double getPeriodicYield (void) throw ( com::ftlabs::fisa::calc::CalculationException )

Private Attributes

const Calculatorcalculator
double price
double yield
double priceValue1bp
double macaulayDuration
double convexity
double periodicYield
double totalInterestFlows
double intOnInt

Detailed Description

An implementation of Analytics that attempts to balance memory and CPU usage by caching only the values with more complex formulas, and values that are needed for multiple methods.


Constructor & Destructor Documentation

com::ftlabs::fisa::calc::DefaultAnalytics::DefaultAnalytics ( const Calculator calculator,
double  price 
)

com::ftlabs::fisa::calc::DefaultAnalytics::DefaultAnalytics ( const Calculator calculator,
double  price,
double  yield 
)

com::ftlabs::fisa::calc::DefaultAnalytics::DefaultAnalytics ( const DefaultAnalytics analytics  ) 

com::ftlabs::fisa::calc::DefaultAnalytics::~DefaultAnalytics ( void   ) 


Member Function Documentation

DefaultAnalytics& com::ftlabs::fisa::calc::DefaultAnalytics::operator= ( const DefaultAnalytics analytics  ) 

const Redemption& com::ftlabs::fisa::calc::DefaultAnalytics::getRedemption ( void   )  [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getPrice ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getYield ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getTrueYield ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getMacaulayDuration ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getModifiedDuration ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getConvexity ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getPriceValue1BP ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getYieldValue1_32 ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getEstimatedMacaulayDuration ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getEstimatedModifiedDuration ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getEstimatedConvexity ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getAccruedInterest ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Implements com::ftlabs::fisa::calc::Analytics.

virtual double com::ftlabs::fisa::calc::DefaultAnalytics::getTotalInterestFlows ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Get the total interest flows.

Returns:
the total interest flows.

Implements com::ftlabs::fisa::calc::Analytics.

virtual double com::ftlabs::fisa::calc::DefaultAnalytics::getInterestOnInterest ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Get interest on interest using an assumed reinvestment yield that is equal to yield.

Returns:
interest on interest

Implements com::ftlabs::fisa::calc::Analytics.

virtual double com::ftlabs::fisa::calc::DefaultAnalytics::getInterestOnInterest ( double  reinvestmentYield  )  throw ( com::ftlabs::fisa::calc::CalculationException ) [virtual]

Get interest on interest.

Parameters:
reinvestmentYield 
Returns:
interest on interest

Implements com::ftlabs::fisa::calc::Analytics.

double com::ftlabs::fisa::calc::DefaultAnalytics::getPeriodicYield ( void   )  throw ( com::ftlabs::fisa::calc::CalculationException ) [private]


Member Data Documentation

const Calculator* com::ftlabs::fisa::calc::DefaultAnalytics::calculator [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::price [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::yield [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::priceValue1bp [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::macaulayDuration [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::convexity [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::periodicYield [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::totalInterestFlows [private]

double com::ftlabs::fisa::calc::DefaultAnalytics::intOnInt [private]


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