26#ifndef quantlib_bootstrap_helper_hpp
27#define quantlib_bootstrap_helper_hpp
152 :
quote_(
std::move(quote)), termStructure_(nullptr) {
162 QL_REQUIRE(
t !=
nullptr,
"null term structure given");
168 return earliestDate_;
173 if (maturityDate_ ==
Date())
174 return latestRelevantDate();
175 return maturityDate_;
180 if (latestRelevantDate_ ==
Date())
182 return latestRelevantDate_;
187 if (pillarDate_==
Date())
194 if (latestDate_ ==
Date())
210 QL_FAIL(
"not a bootstrap-helper visitor");
232 return out <<
"MaturityPillarDate";
234 return out <<
"LastRelevantPillarDate";
236 return out <<
"CustomPillarDate";
246 template <
class Helper>
248 const ext::shared_ptr<Helper>& h1,
249 const ext::shared_ptr<Helper>& h2)
const {
250 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
BootstrapHelper(Real quote)
BootstrapHelper(Handle< Quote > quote)
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
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 Handle< Quote > "e)
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
Globally accessible relinkable pointer.
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
RelinkableHandle< Quote > makeQuoteHandle(Real value)
observer/observable pattern
ext::shared_ptr< BlackVolTermStructure > v
purely virtual base class for market observables
global repository for run-time library settings
Choice
Enumeration for pillar determination alternatives.
@ CustomDate
last date relevant for instrument pricing
@ LastRelevantDate
instruments maturity date
degenerate base class for the Acyclic Visitor pattern