Class implements a Forward Rate Agreement. More...

#include <FRA.hpp>

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

Public Member Functions

 FRA (Date trade_date, Date fixing_date, Date value_date, Date maturity_date, InterestRate rate, double notional, double fixing, double quoting)
 constructor More...
 
FRAclone () const
 Virtual copy constructor. More...
 
Linear instrument interface
double price (const SmartPointer< ir::Curve > &) override
 calculates price of FRA by summing the discounted CFs of fixed and floating leg More...
 
double price (const SmartPointer< ir::Curve > &discounting, const SmartPointer< ir::Curve > &projecting, const SmartPointer< ir::Curve > &, const SmartPointer< ir::Curve > &) override
 calculates price of FRA by summing the discounted CFs of fixed and floating leg More...
 
void valuation (const SmartPointer< ir::Curve > &) override
 prints price and CFs of FRA using the same curve for discounting and projecting forward rates More...
 
void valuation (const SmartPointer< ir::Curve > &discounting1, const SmartPointer< ir::Curve > &discounting2, const SmartPointer< ir::Curve > &projecting1, const SmartPointer< ir::Curve > &projecting2) override
 prints price and CFs of FRA using different curve for discounting and projecting forward rates More...
 
Building Block interface
Date getDate () const override
 returns maturity of FRA More...
 
std::pair< CashFlowVector, CashFlowVectorgetCFs () const override
 Returns the sets of cashflows associated with FRA. 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 FRA More...
 
InterestRate getInterestRate () const override
 Returns interest rates convention of the benchmark instruments. More...
 
std::string info () const override
 Returns a name of instrument: FRA. 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 FRA is dealt. More...
 
Date fixing_date_
 The date on which reference rate is determined. More...
 
Date value_date_
 The date on which the deposit of found becomes effective. More...
 
Date maturity_date_
 The date on which the deposit expires. More...
 
InterestRate rate_
 Convention of interest rates. More...
 
double notional_
 The amount for which FRA is traded. More...
 
double fixing_
 Determined fixing. More...
 
double quote_
 Interest rate at which FRA is traded. More...
 
CashFlowVector floating_leg_
 Cash flow dependent on market index. More...
 
CashFlowVector fixed_leg_
 Fixed cash flow. More...
 

Friends

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

Detailed Description

Class implements a Forward Rate Agreement.

FRA is an OTC derivative instrument that trades as part of money markets. It is essentially a forward-starting loan, but with no exchange of principal, so that only the difference in interest rate is traded.

For more details see [3] and [31].

Examples:
bootstrapperComparison.cpp.

Constructor & Destructor Documentation

julian::FRA::FRA ( Date  trade_date,
Date  fixing_date,
Date  value_date,
Date  maturity_date,
InterestRate  rate,
double  notional,
double  fixing,
double  quoting 
)

constructor

Member Function Documentation

double julian::FRA::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::FRA::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::FRA::changeQuoting ( double  input)
overridevirtual

changes quoting of the FRA

Implements julian::ir::BuildingBlock.

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

Virtual copy constructor.

Implements julian::LinearInstrument.

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

Returns the sets of cashflows associated with FRA.

Note
Second Cash Flow Vector is empty

Implements julian::ir::BuildingBlock.

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

returns maturity of FRA

Implements julian::ir::BuildingBlock.

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

Returns interest rates convention of the benchmark instruments.

Implements julian::ir::BuildingBlock.

double julian::FRA::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::FRA::getQuoting ( )
overridevirtual

Returns quoting.

Implements julian::ir::BuildingBlock.

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

Returns a name of instrument: FRA.

Implements julian::ir::BuildingBlock.

double julian::FRA::price ( const SmartPointer< ir::Curve > &  c)
overridevirtual

calculates price of FRA by summing the discounted CFs of fixed and floating leg

Method uses the same curve to estimate forward rates and different curve to calculate discount factors

Parameters
cinterest rates curve
Returns
returns the price of FRA

Implements julian::LinearInstrument.

double julian::FRA::price ( const SmartPointer< ir::Curve > &  discounting,
const SmartPointer< ir::Curve > &  projecting,
const SmartPointer< ir::Curve > &  ,
const SmartPointer< ir::Curve > &   
)
overridevirtual

calculates price of FRA by summing the discounted CFs of fixed and floating leg

Method uses different curve to estimate forward rates and different curve to calculate discount factors

Parameters
discountingdiscounting curve
projectingprojecting curve

Implements julian::LinearInstrument.

void julian::FRA::valuation ( const SmartPointer< ir::Curve > &  c)
overridevirtual

prints price and CFs of FRA using the same curve for discounting and projecting forward rates

Implements julian::LinearInstrument.

void julian::FRA::valuation ( const SmartPointer< ir::Curve > &  discounting1,
const SmartPointer< ir::Curve > &  discounting2,
const SmartPointer< ir::Curve > &  projecting1,
const SmartPointer< ir::Curve > &  projecting2 
)
overridevirtual

prints price and CFs of FRA using different curve for discounting and projecting forward rates

Implements julian::LinearInstrument.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
FRA fra 
)
friend

Overloads stream operator.

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

Member Data Documentation

CashFlowVector julian::FRA::fixed_leg_
private

Fixed cash flow.

double julian::FRA::fixing_
private

Determined fixing.

Date julian::FRA::fixing_date_
private

The date on which reference rate is determined.

CashFlowVector julian::FRA::floating_leg_
private

Cash flow dependent on market index.

Date julian::FRA::maturity_date_
private

The date on which the deposit expires.

double julian::FRA::notional_
private

The amount for which FRA is traded.

double julian::FRA::quote_
private

Interest rate at which FRA is traded.

InterestRate julian::FRA::rate_
private

Convention of interest rates.

Date julian::FRA::trade_date_
private

The date on which FRA is dealt.

Date julian::FRA::value_date_
private

The date on which the deposit of found becomes effective.


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