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

#include <simpleRate.hpp>

Inheritance diagram for julian::SimpleRate:
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 SimpleRateclone () 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 &s, SimpleRate &c)
 Overloads stream operator. More...
 

Detailed Description

The class encapsulates the simple rate compounding method.

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

\[\textrm{Future Value} = 1 + \textrm{Interest Rate} \times \textrm{Accrual Period}\]

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

Examples:
bootstrapperComparison.cpp, DepositExample.cpp, InterestRateExample.cpp, and serializationExample.cpp.

Member Function Documentation

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

Virtual copy constructor.

Method is an implementation of virtual copy constructor.

Implements julian::Compounding.

double julian::SimpleRate::getCapitalization ( double  interest_rate,
double  accrual_time 
) 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} \times \textrm{Accrual Time}\]

Implements julian::Compounding.

Examples:
InterestRateExample.cpp.
double julian::SimpleRate::getRate ( double  future_value,
double  accrual_time 
) 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} = \frac{\textrm{Future Value}-1}{\textrm{Accrual Time}}\]

Implements julian::Compounding.

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

Info about class.

Method returns string that containing information about class.

Implements julian::Compounding.

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

interface used by Boost serialization library

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
SimpleRate c 
)
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/simpleRate.hpp
  • C:/Unix/home/OEM/jULIAN/src/interestRates/simpleRate.cpp