constrainedSmoother.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_IRCONSTRAINEDSMOOTHER_HPP
2 #define JULIAN_IRCONSTRAINEDSMOOTHER_HPP
3 
7 #include <dates/date.hpp>
8 #include <dates/tenor.hpp>
9 
10 namespace julian {
11 namespace ir {
12 
31  public:
32  ConstrainedSmoother(SmartPointer<SmootherCostFunction> cf, const std::vector<double>& lT, const std::vector<double>& uT, int number_of_iterations);
33  ConstrainedSmoother(SmartPointer<SmootherCostFunction> cf, double tolerance, int number_of_iterations);
34 
35  virtual void calculate(const std::vector<SmartPointer<BuildingBlock> >& instruments, const CurveSettings& settings,
36  SmartPointer<ir::Curve>& discounting_curve, SmartPointer<ir::Curve>& projection_curve);
37  virtual std::vector<double> getDF() const;
38  virtual std::vector<Date> getDates() const;
39  virtual ConstrainedSmoother* clone() const;
40 
41  virtual std::string info() const;
42 
43  virtual ~ConstrainedSmoother(){};
44 
45  private:
48 
50  std::vector<double> lower_tolerance_;
54  std::vector<double> upper_tolerance_;
56  double tolerance_;
60  std::vector<double> DFs_;
61  std::vector<Date> dates_;
62  };
63 } // namespace ir
64 } // namespace julian
65 
66 #endif /* IRCONSTRAINEDSMOOTHER_HPP */
virtual void calculate(const std::vector< SmartPointer< BuildingBlock > > &instruments, const CurveSettings &settings, SmartPointer< ir::Curve > &discounting_curve, SmartPointer< ir::Curve > &projection_curve)
Estimates the curve.
Definition: constrainedSmoother.cpp:40
arma::mat calculateParRates(const SmartPointer< ir::Curve > &, const SmartPointer< ir::Curve > &, const SmartPointer< ir::Curve > &, const std::vector< SmartPointer< BuildingBlock > > &)
Calculates the vector of par rates for instruments.
Definition: constrainedSmoother.cpp:173
File containing definition of interest rates curve building block.
Class implements.
Definition: constrainedSmoother.hpp:30
Definition: cadHoliday.cpp:3
virtual ConstrainedSmoother * clone() const
Virtual Copy Constructor.
Definition: constrainedSmoother.cpp:113
Class defines the interface of algorithms that perform estimation of interest rate curve (see Interpo...
Definition: irCurveEstimator.hpp:23
arma::mat calculateJacobian(SmartPointer< ir::Curve >, SmartPointer< ir::Curve >, InterpolatedCurve, const std::vector< SmartPointer< BuildingBlock > > &)
Method used by SQP algorithm to calculate Jacobian for constrains&#39; approximation. ...
Definition: constrainedSmoother.cpp:126
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
std::vector< Date > dates_
Grid dates of resulting curve.
Definition: constrainedSmoother.hpp:61
File contains interface of cost function used by interest rate curve smoothers.
File contains definition of date class.
virtual std::string info() const
Returns estimator&#39;s name.
Definition: constrainedSmoother.cpp:119
std::vector< double > lower_tolerance_
Lower tolerances for par rate generated by curve.
Definition: constrainedSmoother.hpp:50
File contains interface of algorithms that performs interest rate curve estimations.
double tolerance_
Tolerance for par rate generated by curve.
Definition: constrainedSmoother.hpp:56
std::vector< double > upper_tolerance_
Upper tolerances for par rate generated by curve.
Definition: constrainedSmoother.hpp:54
ConstrainedSmoother(SmartPointer< SmootherCostFunction > cf, const std::vector< double > &lT, const std::vector< double > &uT, int number_of_iterations)
Constructor.
Definition: constrainedSmoother.cpp:19
The object models the interest rate curve.
Definition: interpolatedCurve.hpp:42
Structure holding settings of ir::InterpolatedCurve.
Definition: curveSettings.hpp:26
virtual std::vector< double > getDF() const
Returns estimated DF.
Definition: constrainedSmoother.cpp:101
File contains definition of tenor class.
virtual std::vector< Date > getDates() const
Returns grid dates of the curve.
Definition: constrainedSmoother.cpp:107
SmartPointer< SmootherCostFunction > cost_function_
Cost Function.
Definition: constrainedSmoother.hpp:49
int number_of_iterations_
Number of iterations of Sequential Quadratic Programming.
Definition: constrainedSmoother.hpp:55
std::vector< double > DFs_
Vector holding the Discount Factors being result of estimation.
Definition: constrainedSmoother.hpp:60