The class encapsulates the E30360 year fraction convention. More...

#include <E30360.hpp>

Inheritance diagram for julian::E30360:
julian::YearFraction

Public Member Functions

virtual double operator() (const Date &, const Date &) const
 Calculates year fraction. More...
 
virtual E30360clone () const
 Virtual copy constructor. More...
 
virtual std::string info () const
 Name of a class. More...
 
- Public Member Functions inherited from julian::YearFraction
 YearFraction ()
 Constructor. More...
 
virtual ~YearFraction ()
 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, E30360 &yf)
 Name of a class. More...
 

Detailed Description

The class encapsulates the E30360 year fraction convention.

An object of E30360 class is derived from YearFraction. It calculates year fraction on the basis of two dates using the formula:

\[YearFraction(date_1,date_2) = \frac{360 \times (Y_{2}-Y_{1}) +30 \times (M_{2}-M_{1})+min(D_{2},30) - min(D_{1},30)}{360}\]

where: $\textrm{Y}_{i}$ is a year number of the $\textrm{date}_{i}$, $\textrm{M}_{i}$ is a month number of the $\textrm{date}_{i}$ and $\textrm{D}_{i}$ is a day number of the $\textrm{date}_{i}$.

This convention is known as 30E/360, 30/360 ICMA or Eurobond basis.The year fraction is calculated according to the formula:

Member Function Documentation

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

Virtual copy constructor.

Virtual copy constructor of the E30360 class

Implements julian::YearFraction.

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

Name of a class.

Method returns string that containing information about class.

Implements julian::YearFraction.

double julian::E30360::operator() ( const Date d1,
const Date d2 
) const
virtual

Calculates year fraction.

Method calculates the year fraction on the basis of two dates. An object of E30360 class is derived from YearFraction. It calculates year fraction on the basis of two dates using the formula:

\[YearFraction(date_1,date_2) = \frac{360 \times (Y_{2}-Y_{1}) +30 \times (M_{2}-M_{1})+min(D_{2},30) - min(D_{1},30)}{360}\]

where: $\textrm{Y}_{i}$ is a year number of the $\textrm{date}_{i}$, $\textrm{M}_{i}$ is a month number of the $\textrm{date}_{i}$ and $\textrm{D}_{i}$ is a day number of the $\textrm{date}_{i}$.

Implements julian::YearFraction.

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

interface used by Boost serialization library

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
E30360 yf 
)
friend

Name of a class.

Overloading << operator


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