26#ifndef quantlib_piecewise_yield_curve_hpp
27#define quantlib_piecewise_yield_curve_hpp
58 template <
class Traits,
class Interpolator,
59 template <
class>
class Bootstrap = IterativeBootstrap>
61 :
public Traits::template curve<Interpolator>::type,
64 typedef typename Traits::template curve<Interpolator>::type
base_curve;
74 const Date& referenceDate,
75 std::vector<ext::shared_ptr<typename Traits::helper> > instruments,
78 const std::vector<Date>& jumpDates = {},
79 const Interpolator& i = {},
81 :
base_curve(referenceDate, dayCounter, jumps, jumpDates, i),
88 std::vector<ext::shared_ptr<typename Traits::helper> > instruments,
90 const Interpolator& i,
93 referenceDate, dayCounter, {}, {}, i),
100 std::vector<ext::shared_ptr<typename Traits::helper> > instruments,
113 std::vector<ext::shared_ptr<typename Traits::helper> > instruments,
116 const std::vector<Date>& jumpDates = {},
117 const Interpolator& i = {},
119 :
base_curve(settlementDays, calendar, dayCounter, jumps, jumpDates, i),
127 std::vector<ext::shared_ptr<typename Traits::helper> > instruments,
129 const Interpolator& i,
145 const std::vector<ext::shared_ptr<typename Traits::helper> >&
149 :
base_curve(settlementDays, calendar, dayCounter),
161 const std::vector<Time>&
times()
const;
162 const std::vector<Date>&
dates()
const;
163 const std::vector<Real>&
data()
const;
164 std::vector<std::pair<Date, Real> >
nodes()
const;
194 template <
class C,
class I,
template <
class>
class B>
197 return base_curve::maxDate();
200 template <
class C,
class I,
template <
class>
class B>
203 return base_curve::times();
206 template <
class C,
class I,
template <
class>
class B>
209 return base_curve::dates();
212 template <
class C,
class I,
template <
class>
class B>
215 return base_curve::data();
218 template <
class C,
class I,
template <
class>
class B>
219 inline std::vector<std::pair<Date, Real> >
222 return base_curve::nodes();
225 template <
class C,
class I,
template <
class>
class B>
235 this->updated_ =
false;
239 template <
class C,
class I,
template <
class>
class B>
243 return base_curve::discountImpl(
t);
246 template <
class C,
class I,
template <
class>
class B>
249 bootstrap_.calculate();
Shared handle to an observable.
Framework for calculation on demand and result caching.
Piecewise yield term structure.
void performCalculations() const override
PiecewiseYieldCurve(Natural settlementDays, const Calendar &calendar, const std::vector< ext::shared_ptr< typename Traits::helper > > &instruments, const DayCounter &dayCounter, const bootstrap_type &bootstrap)
PiecewiseYieldCurve(const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps={}, const std::vector< Date > &jumpDates={}, const Interpolator &i={}, bootstrap_type bootstrap={})
PiecewiseYieldCurve(const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, bootstrap_type bootstrap)
PiecewiseYieldCurve< Traits, Interpolator, Bootstrap > this_curve
Traits::template curve< Interpolator >::type base_curve
Bootstrap< this_curve > bootstrap_
PiecewiseYieldCurve(Natural settlementDays, const Calendar &calendar, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const Interpolator &i, bootstrap_type bootstrap=bootstrap_type())
const std::vector< Date > & dates() const
const std::vector< Real > & data() const
std::vector< std::pair< Date, Real > > nodes() const
Interpolator interpolator_type
const std::vector< Time > & times() const
std::vector< ext::shared_ptr< typename Traits::helper > > instruments_
DiscountFactor discountImpl(Time) const override
Date maxDate() const override
PiecewiseYieldCurve(Natural settlementDays, const Calendar &calendar, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const std::vector< Handle< Quote > > &jumps={}, const std::vector< Date > &jumpDates={}, const Interpolator &i={}, bootstrap_type bootstrap={})
friend class Bootstrap< this_curve >
PiecewiseYieldCurve(const Date &referenceDate, std::vector< ext::shared_ptr< typename Traits::helper > > instruments, const DayCounter &dayCounter, const Interpolator &i, bootstrap_type bootstrap=bootstrap_type())
Bootstrap< this_curve > bootstrap_type
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
unsigned QL_INTEGER Natural
positive integer
universal piecewise-term-structure boostrapper.
framework for calculation on demand and result caching
localised-term-structure bootstrapper for most curve types.