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

#include <fractionRate.hpp>

Inheritance diagram for julian::FractionRate:
julian::Compounding

Public Member Functions

 FractionRate (double input=1.0)
 Constructor. More...
 
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 FractionRateclone () 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 &ar, const unsigned int)
 interface used by Boost serialization library More...
 

Private Attributes

double frequency_
 Compounding frequency used by interest rate. More...
 

Friends

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

Detailed Description

The class encapsulates the fraction 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 + \frac{\textrm{Interest Rate}}{ \textrm{frequency}} )^{\textrm{frequency} \times \textrm{Accrual Time}}\]

\[\textrm{Interest Rate} = (\sqrt[\textrm{frequency}]{\textrm{Future Value}}-1) \times frequency\]

Constructor & Destructor Documentation

julian::FractionRate::FractionRate ( double  input = 1.0)
inline

Constructor.

Member Function Documentation

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

Virtual copy constructor.

Method is an implementation of virtual copy constructor.

Implements julian::Compounding.

double julian::FractionRate::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} \div \textrm{frequency} )^{\textrm{frequency} \times \textrm{Accrual Period}}\]

Implements julian::Compounding.

double julian::FractionRate::getRate ( double  fv,
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{frequency}]{\textrm{Future Value}}-1) \times frequency\]

Implements julian::Compounding.

std::string julian::FractionRate::info ( ) const
virtual

Info about class.

Method returns string that containing information about class.

Implements julian::Compounding.

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

interface used by Boost serialization library

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
FractionRate c 
)
friend

Overloads stream operator.

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

Member Data Documentation

double julian::FractionRate::frequency_
private

Compounding frequency used by interest rate.


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