Interest rate curve estimating algorithm solving equation system [CFij] * [DFj] = [PRIZEi]. More...
#include <algebraicBootstrapper.hpp>
Public Member Functions | |
void | calculate (const std::vector< SmartPointer< BuildingBlock > > &instruments, const CurveSettings &settings, SmartPointer< Curve > &discountingCurve, SmartPointer< Curve > &projectionCurve) |
estimates the curve More... | |
std::vector< double > | getDF () const |
returns DFs More... | |
std::vector< Date > | getDates () const |
returns dates More... | |
std::string | info () const |
returns name of estimator More... | |
AlgebraicBootstrapper * | clone () const |
virtual copy constructor More... | |
Public Member Functions inherited from julian::ir::Estimator | |
Estimator () | |
default constructor More... | |
virtual | ~Estimator () |
destructor More... | |
Private Member Functions | |
std::vector< Date > | getMaturityDates (const std::vector< SmartPointer< ir::BuildingBlock > > &instruments, const Date &today) |
Extracts maturity dates from benchmark instruments. More... | |
void | getGridDates (const std::vector< SmartPointer< ir::BuildingBlock > > &instruments) |
Extracts grid dates from benchmark instruments. More... | |
std::vector< Date > | getLackingDates (const std::vector< Date > &maturity_dates) |
Extracts lacking dates from benchmark instruments. More... | |
std::vector< CashFlowVector > | createCFsVector (const std::vector< SmartPointer< ir::BuildingBlock > > &instruments, const std::vector< Date > &lacking_dates, Date today) |
Creates IRS contract for lacking dates. More... | |
arma::mat | prepareEquationSystem (const std::vector< CashFlowVector > &cfs_vecs) |
Creates CF matrix defining system of equation. More... | |
Private Attributes | |
std::vector< double > | DFs_ |
Vector of discount factors. More... | |
std::vector< Date > | dates_ |
Vector of grid dates. More... | |
Detailed Description
Interest rate curve estimating algorithm solving equation system [CFij] * [DFj] = [PRIZEi].
Algebraic bootstrapper creates the matrix of [CFij] which is used to create the system of linear equations. By solving the system the discount factors are estimated. Discount factors are used to construct the interest rate curve.
For example: if we want to build curve using following trades: Deposit 6M, FRA 6x12, IRS 2Y below matrix is constructed
where second row represents CF of deposit, third represents CF of FRA and the last one contains CF of IRS. First column contains CF for today, second for 6M and next columns contain CF for 1Y and 2Y.
Then following system of equation is solved:
To solve the equation number of dates when CF occurs must be equal to number of instruments. Sometimes this condition is not satisfied. Usually there are not quotings for IRS11Y, but IRS12Y generates CF occurring on 11Y. This issue is resolved by creating a IRS with maturity equal to lacking date using linear interpolated IRS quote.
- Warning
- AlgebraicBootstrapper does not have multi-curve functionality.
- Todo:
- Multi-curve functionality is not implemented
- Examples:
- algebraicBootstrapperExample.cpp, and bootstrapperComparison.cpp.
Member Function Documentation
|
virtual |
estimates the curve
calculates method estimates the curve and saves the result into the class members
Implements julian::ir::Estimator.
|
virtual |
virtual copy constructor
Implements julian::ir::Estimator.
|
private |
Creates IRS contract for lacking dates.
|
virtual |
returns dates
Method should be called after calling method Estimator::calculate
Implements julian::ir::Estimator.
|
virtual |
returns DFs
Method should be called after calling method Estimator::calculate
Implements julian::ir::Estimator.
|
private |
Extracts grid dates from benchmark instruments.
Grid dates are dates of all CFs associated with benchmark instruments
|
private |
Extracts lacking dates from benchmark instruments.
Lacking dates are grid dates that are not maturity dates. IRS contracts settled on this dates are created using interpolation of market quotings of swaps. This is done to ensure unique solution of system of linear equations that are solved in process of estimating the curve,
|
private |
Extracts maturity dates from benchmark instruments.
|
virtual |
returns name of estimator
Implements julian::ir::Estimator.
|
private |
Creates CF matrix defining system of equation.
For trades: Deposit 6M, FRA 6x12, IRS 2Y following matrix is constructed
where second row represents CF of deposit, thirg represents CG of FRA and the last one contains CF of IRS. First column contains CF for today, second for 6M and next columns contain CF for 1Y and 2Y.
Member Data Documentation
|
private |
Vector of grid dates.
|
private |
Vector of discount factors.
The documentation for this class was generated from the following files:
- C:/Unix/home/OEM/jULIAN/src/marketData/interestRateCurves/estimators/algebraicBootstrapper.hpp
- C:/Unix/home/OEM/jULIAN/src/marketData/interestRateCurves/estimators/algebraicBootstrapper.cpp