26#ifndef quantlib_bootstrap_helper_hpp
27#define quantlib_bootstrap_helper_hpp
131 bool updateDates =
true);
159 QL_REQUIRE(
t !=
nullptr,
"null term structure given");
165 return earliestDate_;
170 if (maturityDate_ ==
Date())
171 return latestRelevantDate();
172 return maturityDate_;
177 if (latestRelevantDate_ ==
Date())
179 return latestRelevantDate_;
184 if (pillarDate_==
Date())
191 if (latestDate_ ==
Date())
207 QL_FAIL(
"not a bootstrap-helper visitor");
226 return out <<
"MaturityPillarDate";
228 return out <<
"LastRelevantPillarDate";
230 return out <<
"CustomPillarDate";
240 template <
class Helper>
242 const ext::shared_ptr<Helper>& h1,
243 const ext::shared_ptr<Helper>& h2)
const {
244 return (h1->pillarDate() < h2->pillarDate());
degenerate base class for the Acyclic Visitor pattern
Base helper class for bootstrapping.
virtual Real impliedQuote() const =0
~BootstrapHelper() override=default
const Handle< Quote > & quote() const
virtual void accept(AcyclicVisitor &)
virtual Date earliestDate() const
earliest relevant date
virtual Date pillarDate() const
pillar date
virtual Date latestDate() const
latest date
virtual Date maturityDate() const
instrument's maturity date
virtual Date latestRelevantDate() const
latest relevant date
virtual void setTermStructure(TS *)
sets the term structure to be used for pricing
BootstrapHelper(const std::variant< Spread, Handle< Quote > > "e)
Shared handle to an observable.
Object that notifies its changes to a set of observers.
Object that gets notified when a given observable changes.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Bootstrap helper with date schedule relative to global evaluation date.
RelativeDateBootstrapHelper(const std::variant< Spread, Handle< Quote > > "e, bool updateDates=true)
virtual void initializeDates()=0
DateProxy & evaluationDate()
the date at which pricing is to be performed.
static Settings & instance()
access to the unique instance
Visitor for a specific class
virtual void visit(T &)=0
bool operator()(const ext::shared_ptr< Helper > &h1, const ext::shared_ptr< Helper > &h2) const
date- and time-related classes, typedefs and enumerations
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
#define QL_FAIL(message)
throw an error (possibly with file and line information)
QL_INTEGER Integer
integer number
Real Spread
spreads on interest rates
Globally accessible relinkable pointer.
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
Handle< Quote > handleFromVariant(const std::variant< Real, Handle< Quote > > &value)
observer/observable pattern
ext::shared_ptr< BlackVolTermStructure > v
purely virtual base class for market observables
global repository for run-time library settings
Choice
Alternatives ways of determining the pillar date.
@ CustomDate
last date relevant for instrument pricing
@ LastRelevantDate
instruments maturity date
degenerate base class for the Acyclic Visitor pattern