Class implements Builder design pattern that can be used to create interest rate curves. More...

#include <irCurveBuilder.hpp>

Public Member Functions

 BuildCurve ()
 constructor More...
 
BuildCurveasOfDate (const Date &)
 sets date of curve More...
 
BuildCurvewithCalendar (const Calendar &)
 sets calendar More...
 
BuildCurvewithDates (const std::vector< Date > &)
 sets grid dates of the curve More...
 
BuildCurvewithTenors (const std::vector< Tenor > &)
 sets tenors, basing on tenors the grid dates of the curve are calculated More...
 
BuildCurvewithTenors (const std::vector< std::string > &)
 sets tenors, basing on tenors the grid dates of the curve are calculated More...
 
BuildCurvewithDiscountFactors (const std::vector< double > &)
 sets discount factors More...
 
BuildCurvewithZeroCouponRate (const double)
 sets zero coupon rate More...
 
BuildCurvewithZeroCouponRates (const std::vector< double > &)
 sets zero coupon rates More...
 
BuildCurvewithForwardRates (const std::vector< double > &)
 sets forward rates More...
 
BuildCurvewithSetOfInstruments (const std::vector< SmartPointer< BuildingBlock > > &)
 sets benchmark instruments More...
 
BuildCurveusingDiscountingCurve (const SmartPointer< ir::Curve > &)
 sets discounting curve used in multiple curve framework More...
 
BuildCurveusingProjectionCurve (const SmartPointer< ir::Curve > &)
 sets projection curve used in multiple curve framework More...
 
BuildCurvewithInterestRate (const InterestRate &)
 sets interest rate convention More...
 
BuildCurvewithInterpolator (const SmartPointer< Interpolator > &)
 sets interpolator More...
 
BuildCurvewithExtrapolator (const SmartPointer< Extrapolator > &)
 sets extrapolator More...
 
BuildCurveusingEstimator (const SmartPointer< Estimator > &)
 sets estimator More...
 
BuildCurvewithFxSpot (const double &)
 sets fx spot More...
 
 operator InterpolatedCurve ()
 Creates interpolated interest rate curve. More...
 
 operator FlatCurve ()
 creates flat interest rate curve More...
 

Private Types

enum  InputType {
  NONE, DF, ZCR, FWD,
  INSTRUMENTS
}
 Auxiliary type used to identify what data are used to create curve. More...
 

Private Attributes

std::vector< Datedates_
 dates that can be used as grid dates of interpolated interest rate curve More...
 
std::vector< Tenortenors_
 tenors that can be used to calculate grid dates More...
 
std::vector< double > double_holder_
 vector holding the doubles which may represent DFs, ZCRs or Fwds More...
 
double zero_coupon_rate_
 zero coupon rate required by flat curve More...
 
std::vector< SmartPointer< BuildingBlock > > instruments_
 benchmark instrument that are used to estimate curve More...
 
InterestRate rate_
 convention of interest rate compounding More...
 
SmartPointer< Interpolatorinterpolator_
 interpolator used by interpolated rate curve More...
 
SmartPointer< Extrapolatorextrapolator_
 extrapolator used by interpolated rate curve More...
 
SmartPointer< Estimatorestimator_
 estimator used to estimate curve basing on the instruments More...
 
Calendar calendar_
 calendar used by interest rate curve More...
 
SmartPointer< ir::Curvediscounting_curve_
 discounting curve used in multiple curve framework More...
 
SmartPointer< ir::Curveprojection_curve_
 projection curve used in multiple curve framework More...
 
Date today_
 date of interest rate curve More...
 
double fx_spot_
 fx spot used by when constructing cross currency curve More...
 
InputType method_of_construction_
 contains information what method was used to construct curve More...
 

Detailed Description

Class implements Builder design pattern that can be used to create interest rate curves.

Class provides simple and clear interface for constructing the interest rate curve. The class contains the methods through which the parameters of curve are established. If some parameters are not given builder sets following default setting:

  • interpolator - linear interpolation of zero-coupon rates
  • extrapolator - extrapolating zero-coupon rate
  • rate - simple compounding ACT365

The curve can be constructed by:

  • providing the benchmark instruments and interest rate curve estimator
  • providing the dates (or tenors) and DFs/ZCRs/Fwds.
Examples:
algebraicBootstrapperExample.cpp, bondsExample.cpp, bootstrapperComparison.cpp, constrainedBootstrapperExample.cpp, rootFindingBootstrapperExample.cpp, and unconstrainedBootstrapperExample.cpp.

Member Enumeration Documentation

Auxiliary type used to identify what data are used to create curve.

Constructor & Destructor Documentation

julian::ir::BuildCurve::BuildCurve ( )

constructor

Member Function Documentation

julian::ir::BuildCurve::operator FlatCurve ( )

creates flat interest rate curve

This is conversion operator. It creates the flat curve with settings provided by other methods.

julian::ir::BuildCurve::operator InterpolatedCurve ( )

Creates interpolated interest rate curve.

This is conversion operator. It creates the interest rate curve with settings provided by other methods.

BuildCurve & julian::ir::BuildCurve::usingDiscountingCurve ( const SmartPointer< ir::Curve > &  input)

sets discounting curve used in multiple curve framework

BuildCurve & julian::ir::BuildCurve::usingProjectionCurve ( const SmartPointer< ir::Curve > &  input)

sets projection curve used in multiple curve framework

BuildCurve & julian::ir::BuildCurve::withDates ( const std::vector< Date > &  input)

sets grid dates of the curve

BuildCurve & julian::ir::BuildCurve::withDiscountFactors ( const std::vector< double > &  input)

sets discount factors

BuildCurve & julian::ir::BuildCurve::withExtrapolator ( const SmartPointer< Extrapolator > &  input)

sets extrapolator

Examples:
bootstrapperComparison.cpp.
BuildCurve & julian::ir::BuildCurve::withForwardRates ( const std::vector< double > &  input)

sets forward rates

BuildCurve & julian::ir::BuildCurve::withFxSpot ( const double &  input)

sets fx spot

BuildCurve & julian::ir::BuildCurve::withSetOfInstruments ( const std::vector< SmartPointer< BuildingBlock > > &  input)
BuildCurve & julian::ir::BuildCurve::withTenors ( const std::vector< Tenor > &  input)

sets tenors, basing on tenors the grid dates of the curve are calculated

BuildCurve & julian::ir::BuildCurve::withTenors ( const std::vector< std::string > &  input)

sets tenors, basing on tenors the grid dates of the curve are calculated

BuildCurve & julian::ir::BuildCurve::withZeroCouponRate ( const double  input)

sets zero coupon rate

Examples:
bondsExample.cpp.
BuildCurve & julian::ir::BuildCurve::withZeroCouponRates ( const std::vector< double > &  input)

sets zero coupon rates

Member Data Documentation

Calendar julian::ir::BuildCurve::calendar_
private

calendar used by interest rate curve

std::vector<Date> julian::ir::BuildCurve::dates_
private

dates that can be used as grid dates of interpolated interest rate curve

SmartPointer<ir::Curve> julian::ir::BuildCurve::discounting_curve_
private

discounting curve used in multiple curve framework

std::vector<double> julian::ir::BuildCurve::double_holder_
private

vector holding the doubles which may represent DFs, ZCRs or Fwds

SmartPointer<Estimator> julian::ir::BuildCurve::estimator_
private

estimator used to estimate curve basing on the instruments

SmartPointer<Extrapolator> julian::ir::BuildCurve::extrapolator_
private

extrapolator used by interpolated rate curve

double julian::ir::BuildCurve::fx_spot_
private

fx spot used by when constructing cross currency curve

std::vector<SmartPointer<BuildingBlock> > julian::ir::BuildCurve::instruments_
private

benchmark instrument that are used to estimate curve

SmartPointer<Interpolator> julian::ir::BuildCurve::interpolator_
private

interpolator used by interpolated rate curve

InputType julian::ir::BuildCurve::method_of_construction_
private

contains information what method was used to construct curve

SmartPointer<ir::Curve> julian::ir::BuildCurve::projection_curve_
private

projection curve used in multiple curve framework

InterestRate julian::ir::BuildCurve::rate_
private

convention of interest rate compounding

std::vector<Tenor> julian::ir::BuildCurve::tenors_
private

tenors that can be used to calculate grid dates

Date julian::ir::BuildCurve::today_
private

date of interest rate curve

double julian::ir::BuildCurve::zero_coupon_rate_
private

zero coupon rate required by flat curve


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