Class implements a deposit contract. More...

#include <deposit.hpp>

Inheritance diagram for julian::Deposit:
julian::LinearInstrument julian::ir::BuildingBlock

Public Member Functions

 Deposit (Date trade_date, Date start_date, Date end_date, InterestRate rate, double notional, double quoting)
 constructor More...
 
Depositclone () const
 Virtual copy constructor. More...
 
Linear instrument interface
double price (const SmartPointer< ir::Curve > &)
 calculates price of deposit by summing the discounted CFs More...
 
double price (const SmartPointer< ir::Curve > &discounting1, const SmartPointer< ir::Curve > &, const SmartPointer< ir::Curve > &, const SmartPointer< ir::Curve > &)
 calculates price of deposit by summing the discounted CFs More...
 
void valuation (const SmartPointer< ir::Curve > &)
 prints price and CFs of deposit More...
 
void valuation (const SmartPointer< ir::Curve > &discounting1, const SmartPointer< ir::Curve > &discounting2, const SmartPointer< ir::Curve > &projecting1, const SmartPointer< ir::Curve > &projecting2)
 prints price and CFs of deposit using curve provided More...
 
Building Block interface
Date getDate () const override
 returns maturity of deposit More...
 
std::pair< CashFlowVector, CashFlowVectorgetCFs () const override
 Returns the sets of cashflows associated with deposit. More...
 
InterestRate getInterestRate () const override
 Returns interest rates convention of deposit. More...
 
double calibrate (const SmartPointer< ir::Curve > &calibrated) override
 Method calibrate is used by root finding estimator. More...
 
double calibrate (const SmartPointer< ir::Curve > &discounting, const SmartPointer< ir::Curve > &projection, const SmartPointer< ir::Curve > &calibrated) override
 Method calibrate is used by root finding estimator. More...
 
double getParRate (const SmartPointer< ir::Curve > &discounting, const SmartPointer< ir::Curve > &projection, const SmartPointer< ir::Curve > &projection2) override
 Implies quoting of benchmark instrument from interest rate curves provided. More...
 
double getQuoting () override
 Returns quoting. More...
 
void changeQuoting (double) override
 changes quoting of the deposit More...
 
std::string info () const override
 returns the name of instrument: Deposit More...
 
- Public Member Functions inherited from julian::LinearInstrument
 LinearInstrument ()
 constructor More...
 
virtual ~LinearInstrument ()
 destructor More...
 
- Public Member Functions inherited from julian::ir::BuildingBlock
virtual ~BuildingBlock ()
 destructor More...
 

Private Attributes

Date trade_date_
 The date on which deposit is dealt. More...
 
InterestRate rate_
 Convention of interest rates. More...
 
double quoting_
 Deposit interest rate. More...
 
CashFlowVector cfs_
 Deposit cashflows . More...
 

Friends

std::ostream & operator<< (std::ostream &, Deposit &)
 Overloads stream operator. More...
 

Detailed Description

Class implements a deposit contract.

Class models the interbank deposit - one bank holding funds of another bank and paying interest rate.

Examples:
bootstrapperComparison.cpp, and DepositExample.cpp.

Constructor & Destructor Documentation

julian::Deposit::Deposit ( Date  trade_date,
Date  start_date,
Date  end_date,
InterestRate  rate,
double  notional,
double  quoting 
)

constructor

Member Function Documentation

double julian::Deposit::calibrate ( const SmartPointer< ir::Curve > &  calibrated)
overridevirtual

Method calibrate is used by root finding estimator.

The estimator calibrates curve by finding the root of this method.

Implements julian::ir::BuildingBlock.

double julian::Deposit::calibrate ( const SmartPointer< ir::Curve > &  discounting,
const SmartPointer< ir::Curve > &  projection,
const SmartPointer< ir::Curve > &  calibrated 
)
overridevirtual

Method calibrate is used by root finding estimator.

The estimator calibrates curve by finding the root of this method.

Implements julian::ir::BuildingBlock.

void julian::Deposit::changeQuoting ( double  input)
overridevirtual

changes quoting of the deposit

Implements julian::ir::BuildingBlock.

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

Virtual copy constructor.

Implements julian::LinearInstrument.

std::pair< CashFlowVector, CashFlowVector > julian::Deposit::getCFs ( ) const
overridevirtual

Returns the sets of cashflows associated with deposit.

Note
Second Cash Flow Vector is empty

Implements julian::ir::BuildingBlock.

Date julian::Deposit::getDate ( ) const
overridevirtual

returns maturity of deposit

Implements julian::ir::BuildingBlock.

InterestRate julian::Deposit::getInterestRate ( ) const
overridevirtual

Returns interest rates convention of deposit.

Implements julian::ir::BuildingBlock.

double julian::Deposit::getParRate ( const SmartPointer< ir::Curve > &  discounting,
const SmartPointer< ir::Curve > &  projection,
const SmartPointer< ir::Curve > &  projection2 
)
overridevirtual

Implies quoting of benchmark instrument from interest rate curves provided.

Implements julian::ir::BuildingBlock.

double julian::Deposit::getQuoting ( )
overridevirtual

Returns quoting.

Implements julian::ir::BuildingBlock.

std::string julian::Deposit::info ( ) const
overridevirtual

returns the name of instrument: Deposit

Implements julian::ir::BuildingBlock.

double julian::Deposit::price ( const SmartPointer< ir::Curve > &  c)
virtual

calculates price of deposit by summing the discounted CFs

Parameters
cdiscounting curve

Implements julian::LinearInstrument.

double julian::Deposit::price ( const SmartPointer< ir::Curve > &  c,
const SmartPointer< ir::Curve > &  ,
const SmartPointer< ir::Curve > &  ,
const SmartPointer< ir::Curve > &   
)
virtual

calculates price of deposit by summing the discounted CFs

Parameters
cdiscounting curve

Implements julian::LinearInstrument.

void julian::Deposit::valuation ( const SmartPointer< ir::Curve > &  curve)
virtual

prints price and CFs of deposit

Implements julian::LinearInstrument.

Examples:
DepositExample.cpp.
void julian::Deposit::valuation ( const SmartPointer< ir::Curve > &  discounting1,
const SmartPointer< ir::Curve > &  discounting2,
const SmartPointer< ir::Curve > &  projecting1,
const SmartPointer< ir::Curve > &  projecting2 
)
virtual

prints price and CFs of deposit using curve provided

Implements julian::LinearInstrument.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
Deposit d 
)
friend

Overloads stream operator.

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

Member Data Documentation

CashFlowVector julian::Deposit::cfs_
private

Deposit cashflows .

double julian::Deposit::quoting_
private

Deposit interest rate.

InterestRate julian::Deposit::rate_
private

Convention of interest rates.

Date julian::Deposit::trade_date_
private

The date on which deposit is dealt.


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