Class implements the concept of floating cash flow. More...

#include <FloatingCashFlow.hpp>

Inheritance diagram for julian::FloatingCashFlow:
julian::CashFlow

Public Member Functions

 FloatingCashFlow (Date acc_start, Date acc_end, Date fix_start, Date fix_end, Date payment, double n, double additive_margin, double multiplicative_margin, bool notional_is_paid)
 constructor More...
 
virtual double price (const SmartPointer< ir::Curve > &disc)
 discounts the cashflow More...
 
double value (const SmartPointer< ir::Curve > &disc)
 prints discounted cashflows More...
 
virtual Date getDate () const
 returns payment date More...
 
virtual double getCF () const
 returns CF More...
 
virtual double getNotional () const
 returns notional More...
 
void setCashFlow (double amount)
 sets the cash flow More...
 
void setCashFlow (double quote, const InterestRate &rate)
 calculates new CF value basing on quoting and interest rate provided More...
 
void setCashFlow (const SmartPointer< ir::Curve > &)
 sets new CF value basing on interest rate curve More...
 
virtual FloatingCashFlowclone () const
 virtual copy constructor More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 interface used by Boost serialization library More...
 
- Public Member Functions inherited from julian::CashFlow
virtual ~CashFlow ()
 destructor More...
 

Private Attributes

Date accrual_start_
 Date determining the beginning of accrual period. More...
 
Date accrual_end_
 Date determining the end of accrual period. More...
 
Date fixing_start_
 Date of fixings the benchmark rate. More...
 
Date fixing_end_
 Benchmark rate maturity date. More...
 
Date payment_date_
 Date on which the CF is paid. More...
 
double notional_
 Notional of the CF. More...
 
double amount_
 Amount paid on payment_date_. More...
 
double additive_margin_
 Margin added to benchmark date. More...
 
double multiplicative_margin_
 Margin multiplying to benchmark date. More...
 
bool notional_is_paid_
 If true notional of CF is paid on payment date with accrued amount. More...
 

Friends

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

Detailed Description

Class implements the concept of floating cash flow.

Floating cash flow is paid on predefined date. Amount of cash paid is dependent on predefined market benchmark. Market benchmark is defined by FloatingCashFlow::fixing_start_ and FloatingCashFlow::fixing_end_ dates. On fixing start date we observe a benchmark rate, which matures on fixing end date. One can modify the amount of CF by additive or multiplicative margin.

Usually floating CF is determined by interest rate given and length of accrual period covering time interval between FloatingCashFlow::accrual_start_ and FloatingCashFlow::accrual_end_ date.

Constructor & Destructor Documentation

julian::FloatingCashFlow::FloatingCashFlow ( Date  acc_start,
Date  acc_end,
Date  fix_start,
Date  fix_end,
Date  payment,
double  n,
double  additive_margin,
double  multiplicative_margin,
bool  notional_is_paid 
)

constructor

Creates FloatingCashFlow basing on provided dates and amount

Member Function Documentation

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

virtual copy constructor

Implements julian::CashFlow.

double julian::FloatingCashFlow::getCF ( ) const
virtual

returns CF

Implements julian::CashFlow.

Date julian::FloatingCashFlow::getDate ( ) const
virtual

returns payment date

Implements julian::CashFlow.

double julian::FloatingCashFlow::getNotional ( ) const
virtual

returns notional

Implements julian::CashFlow.

double julian::FloatingCashFlow::price ( const SmartPointer< ir::Curve > &  disc)
virtual

discounts the cashflow

Method discount the cashflow on the curve valuation date.

Implements julian::CashFlow.

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

interface used by Boost serialization library

void julian::FloatingCashFlow::setCashFlow ( double  amount)
virtual

sets the cash flow

Implements julian::CashFlow.

void julian::FloatingCashFlow::setCashFlow ( double  quote,
const InterestRate rate 
)
virtual

calculates new CF value basing on quoting and interest rate provided

Implements julian::CashFlow.

void julian::FloatingCashFlow::setCashFlow ( const SmartPointer< ir::Curve > &  c)
virtual

sets new CF value basing on interest rate curve

Implements julian::CashFlow.

double julian::FloatingCashFlow::value ( const SmartPointer< ir::Curve > &  disc)
virtual

prints discounted cashflows

Method calculates discounted cashflow on the curve valuation date and then prints it

Implements julian::CashFlow.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
FloatingCashFlow cf 
)
friend

Overloads stream operator.

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

Member Data Documentation

Date julian::FloatingCashFlow::accrual_end_
private

Date determining the end of accrual period.

Date julian::FloatingCashFlow::accrual_start_
private

Date determining the beginning of accrual period.

double julian::FloatingCashFlow::additive_margin_
private

Margin added to benchmark date.

double julian::FloatingCashFlow::amount_
private

Amount paid on payment_date_.

Date julian::FloatingCashFlow::fixing_end_
private

Benchmark rate maturity date.

Date julian::FloatingCashFlow::fixing_start_
private

Date of fixings the benchmark rate.

double julian::FloatingCashFlow::multiplicative_margin_
private

Margin multiplying to benchmark date.

double julian::FloatingCashFlow::notional_
private

Notional of the CF.

bool julian::FloatingCashFlow::notional_is_paid_
private

If true notional of CF is paid on payment date with accrued amount.

Date julian::FloatingCashFlow::payment_date_
private

Date on which the CF is paid.


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