The class encapsulates the compounded rate compounding method. More...

#include <compoundedRate.hpp>

Inheritance diagram for julian::CompoundedRate:
julian::Compounding

Public Member Functions

virtual double getCapitalization (double interest_rate, double accrual_time) const
 Calculates future value. More...
 
virtual double getRate (double future_value, double accrual_time) const
 Calculates interest rate. More...
 
virtual std::string info () const
 Info about class. More...
 
virtual CompoundedRateclone () const
 Virtual copy constructor. More...
 
- Public Member Functions inherited from julian::Compounding
 Compounding ()
 Default constructor. More...
 
virtual ~Compounding ()
 Destructor. More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &, const unsigned int)
 interface used by Boost serialization library More...
 

Friends

class boost::serialization::access
 
std::ostream & operator<< (std::ostream &, CompoundedRate &)
 Overloads stream operator. More...
 

Detailed Description

The class encapsulates the compounded rate compounding method.

Object of this class implements compounded interest rate compounding. Using compounded convention the future value and interest rate are calculated according to formulae:

\[\textrm{Future Value} = (1 + \textrm{Interest Rate})^{\textrm{Accrual Time}}\]

\[\textrm{Interest Rate} = \sqrt[\textrm{Accrual Period}]{\textrm{Future Value}}-1\]

Examples:
InterestRateExample.cpp.

Member Function Documentation

CompoundedRate * julian::CompoundedRate::clone ( ) const
virtual

Virtual copy constructor.

Method is an implementation of virtual copy constructor.

Implements julian::Compounding.

double julian::CompoundedRate::getCapitalization ( double  r,
double  t 
) const
virtual

Calculates future value.

Method calculates the future value of 1 currency unit on the basis of annualized interest rate and interest accrual period.

\[\textrm{Future Value} = (1 + \textrm{Interest Rate})^{\textrm{Accrual Period}}\]

Implements julian::Compounding.

Examples:
InterestRateExample.cpp.
double julian::CompoundedRate::getRate ( double  x,
double  t 
) const
virtual

Calculates interest rate.

Method calculates the annualized interest rate on the basis of future value of interest rate value and interest accrual period.

\[\textrm{Interest Rate} = \sqrt[\textrm{Accrual Period}]{\textrm{Future Value}}-1\]

Implements julian::Compounding.

Examples:
InterestRateExample.cpp.
std::string julian::CompoundedRate::info ( ) const
virtual

Info about class.

Method returns string that containing information about class.

Implements julian::Compounding.

template<class Archive >
void julian::CompoundedRate::serialize ( Archive &  ,
const unsigned  int 
)
inlineprivate

interface used by Boost serialization library

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
CompoundedRate  
)
friend

Overloads stream operator.

This overloaded operator enables to print the curve on the console.


The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/jULIAN/src/interestRates/compoundedRate.hpp
  • C:/Unix/home/OEM/jULIAN/src/interestRates/compoundedRate.cpp