algebraicBootstrapper.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_ALGEBRAICBOOTSTRAPPER_HPP
2 #define JULIAN_ALGEBRAICBOOTSTRAPPER_HPP
3 
5 #include <armadillo>
6 
7 namespace julian {
8 namespace ir {
50  public:
52  void calculate(const std::vector<SmartPointer<BuildingBlock> >& instruments, const CurveSettings& settings,
53  SmartPointer<Curve>& discountingCurve, SmartPointer<Curve>& projectionCurve);
54  std::vector<double> getDF() const;
55  std::vector<Date> getDates() const;
56 
57  std::string info() const;
58 
61  private:
62  std::vector<Date> getMaturityDates(const std::vector<SmartPointer<ir::BuildingBlock> >& instruments, const Date& today);
63  void getGridDates(const std::vector<SmartPointer<ir::BuildingBlock> >& instruments);
64  std::vector<Date> getLackingDates(const std::vector<Date>& maturity_dates);
65  std::vector<CashFlowVector> createCFsVector(const std::vector<SmartPointer<ir::BuildingBlock> >& instruments, const std::vector<Date>& lacking_dates, Date today);
66  arma::mat prepareEquationSystem(const std::vector<CashFlowVector>& cfs_vecs);
67 
68  std::vector<double> DFs_;
69  std::vector<Date> dates_;
70  };
71 
72 } // namespace ir
73 } // namespace julian
74 
75 #endif
std::vector< Date > getLackingDates(const std::vector< Date > &maturity_dates)
Extracts lacking dates from benchmark instruments.
Definition: algebraicBootstrapper.cpp:91
Definition: cadHoliday.cpp:3
std::vector< Date > getDates() const
returns dates
Definition: algebraicBootstrapper.cpp:27
Class defines the interface of algorithms that perform estimation of interest rate curve (see Interpo...
Definition: irCurveEstimator.hpp:23
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.
Definition: algebraicBootstrapper.cpp:104
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
std::string info() const
returns name of estimator
Definition: algebraicBootstrapper.cpp:184
File contains interface of algorithms that performs interest rate curve estimations.
AlgebraicBootstrapper * clone() const
virtual copy constructor
Definition: algebraicBootstrapper.cpp:15
void getGridDates(const std::vector< SmartPointer< ir::BuildingBlock > > &instruments)
Extracts grid dates from benchmark instruments.
Definition: algebraicBootstrapper.cpp:70
Structure holding settings of ir::InterpolatedCurve.
Definition: curveSettings.hpp:26
std::vector< double > DFs_
Vector of discount factors.
Definition: algebraicBootstrapper.hpp:68
std::vector< double > getDF() const
returns DFs
Definition: algebraicBootstrapper.cpp:23
void calculate(const std::vector< SmartPointer< BuildingBlock > > &instruments, const CurveSettings &settings, SmartPointer< Curve > &discountingCurve, SmartPointer< Curve > &projectionCurve)
estimates the curve
Definition: algebraicBootstrapper.cpp:34
Class implements a date object.
Definition: date.hpp:27
Interest rate curve estimating algorithm solving equation system [CFij] * [DFj] = [PRIZEi]...
Definition: algebraicBootstrapper.hpp:49
std::vector< Date > getMaturityDates(const std::vector< SmartPointer< ir::BuildingBlock > > &instruments, const Date &today)
Extracts maturity dates from benchmark instruments.
Definition: algebraicBootstrapper.cpp:55
std::vector< Date > dates_
Vector of grid dates.
Definition: algebraicBootstrapper.hpp:69
arma::mat prepareEquationSystem(const std::vector< CashFlowVector > &cfs_vecs)
Creates CF matrix defining system of equation.
Definition: algebraicBootstrapper.cpp:163