31#include <ql/patterns/visitor.hpp>
32#include <ql/types.hpp>
33#include <ql/termstructures/bootstraphelper.hpp>
35#include <boost/none.hpp>
36#include <boost/optional.hpp>
37#include <ql/shared_ptr.hpp>
46using QuantLib::AcyclicVisitor;
107 virtual void accept(AcyclicVisitor&);
123 pair<string, bool>
quote(
const string&
name,
bool opt =
false) {
return make_pair(
name, opt); }
130 QuantLib::Pillar::Choice
pillarChoice_ = QuantLib::Pillar::LastRelevantDate;
162 virtual void accept(AcyclicVisitor&)
override;
199 virtual void accept(AcyclicVisitor&)
override;
241 virtual void accept(AcyclicVisitor&)
override;
283 virtual void accept(AcyclicVisitor&)
override;
332 virtual void accept(AcyclicVisitor&)
override;
375 virtual void accept(AcyclicVisitor&)
override;
416 virtual void accept(AcyclicVisitor&)
override;
441 const std::vector<Real>&
weights);
459 virtual void accept(AcyclicVisitor&)
override;
504 void accept(QuantLib::AcyclicVisitor& v)
override;
546 virtual void accept(AcyclicVisitor&)
override;
568 const boost::optional<string>&
rfrIndex,
const boost::optional<Real>&
spread);
586 virtual void accept(AcyclicVisitor&)
override;
631 virtual void accept(AcyclicVisitor&)
override;
694 const vector<string>&
quotes()
override;
Class for holding bootstrap configurations.
Average OIS yield curve segment.
string projectionCurveID_
AverageOISYieldCurveSegment()
Default constructor.
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
const string & projectionCurveID() const
virtual XMLNode * toXML(XMLDocument &doc) const override
virtual ~AverageOISYieldCurveSegment()
Default destructor.
Bond yield shifted yield curve segment.
const bool extrapolateFlat() const
BondYieldShiftedYieldCurveSegment()
Default constructor.
const map< string, string > & iborIndexCurves() const
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
boost::optional< Real > bondYield_
boost::optional< Real > spread_
const string & referenceCurveID() const
map< string, string > iborIndexCurves_
virtual ~BondYieldShiftedYieldCurveSegment()
Default destructor.
Cross Currency yield curve segment.
string foreignDiscountCurveID_
const string & domesticProjectionCurveID() const
virtual ~CrossCcyYieldCurveSegment()
Default destructor.
CrossCcyYieldCurveSegment()
Default constructor.
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
const string & foreignDiscountCurveID() const
string foreignProjectionCurveID_
string domesticProjectionCurveID_
const string & foreignProjectionCurveID() const
const string & spotRateID() const
Base curve configuration.
const string & curveDescription() const
const string & curveID() const
Direct yield curve segment.
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
virtual ~DirectYieldCurveSegment()
Default destructor.
DirectYieldCurveSegment()
Default constructor.
Discount ratio yield curve segment.
std::string baseCurveCurrency_
DiscountRatioYieldCurveSegment()
Default constructor.
void accept(QuantLib::AcyclicVisitor &v) override
const string & baseCurveCurrency() const
const string & denominatorCurveCurrency() const
std::string denominatorCurveId_
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
std::string denominatorCurveCurrency_
const string & numeratorCurveId() const
std::string numeratorCurveId_
const string & numeratorCurveCurrency() const
const string & denominatorCurveId() const
std::string numeratorCurveCurrency_
const string & baseCurveId() const
FittedBond yield curve segment.
const bool extrapolateFlat() const
FittedBondYieldCurveSegment()
Default constructor.
const map< string, string > & iborIndexCurves() const
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
map< string, string > iborIndexCurves_
Ibor Fallback yield curve segment.
const boost::optional< Real > & spread() const
boost::optional< string > rfrIndex_
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
boost::optional< Real > spread_
const string & iborIndex() const
IborFallbackCurveSegment()
Default constructor.
const boost::optional< string > & rfrIndex() const
const string & rfrCurve() const
Simple yield curve segment.
string projectionCurveID_
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
const string & projectionCurveID() const
virtual XMLNode * toXML(XMLDocument &doc) const override
virtual ~SimpleYieldCurveSegment()
Default destructor.
SimpleYieldCurveSegment()
Default constructor.
Tenor Basis yield curve segment.
virtual ~TenorBasisYieldCurveSegment()
Default destructor.
TenorBasisYieldCurveSegment()
Default constructor.
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
string payProjectionCurveID_
const string & payProjectionCurveID() const
virtual XMLNode * toXML(XMLDocument &doc) const override
string receiveProjectionCurveID_
const string & receiveProjectionCurveID() const
Weighted average yield curve segment.
const string & referenceCurveID2() const
string referenceCurveID2_
string referenceCurveID1_
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
virtual ~WeightedAverageYieldCurveSegment()
Default destructor.
const string & referenceCurveID1() const
WeightedAverageYieldCurveSegment()
Default constructor.
Small XML Document wrapper class.
Base class for all serializable classes.
Yield Curve configuration.
void populateRequiredCurveIds()
const string & currency() const
string & interpolationMethod()
const string & discountCurveID() const
YieldCurveConfig()
Default constructor.
Size & mixedInterpolationCutoff()
virtual void fromXML(XMLNode *node) override
BootstrapConfig bootstrapConfig_
const string & zeroDayCounter() const
bool extrapolation() const
virtual XMLNode * toXML(XMLDocument &doc) const override
void setBootstrapConfig(const BootstrapConfig &bootstrapConfig)
Size mixedInterpolationCutoff() const
const vector< string > & quotes() override
Return all the market quotes required for this config.
string & interpolationVariable()
const BootstrapConfig & bootstrapConfig() const
virtual ~YieldCurveConfig()
Default destructor.
string interpolationVariable_
Size mixedInterpolationCutoff_
const vector< QuantLib::ext::shared_ptr< YieldCurveSegment > > & curveSegments() const
string interpolationMethod_
string & zeroDayCounter()
vector< QuantLib::ext::shared_ptr< YieldCurveSegment > > curveSegments_
const string & interpolationVariable() const
const string & interpolationMethod() const
Base class for yield curve segments.
QuantLib::Pillar::Choice pillarChoice_
Type
supported segment types
virtual void accept(AcyclicVisitor &)
const vector< pair< string, bool > > & quotes() const
const string & conventionsID() const
vector< pair< string, bool > > quotes_
Quote and optional flag pair.
virtual ~YieldCurveSegment()
Default destructor.
YieldCurveSegment()
Default constructor.
const QuantLib::Pillar::Choice pillarChoice() const
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
const string & typeID() const
pair< string, bool > quote(const string &name, bool opt=false)
Utility to build a quote, optional flag defaults to false.
Yield plus default curves segment.
YieldPlusDefaultYieldCurveSegment()
Default constructor.
const std::vector< Real > & weights()
std::vector< std::string > defaultCurveIDs_
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
virtual ~YieldPlusDefaultYieldCurveSegment()
Default destructor.
std::vector< Real > weights_
const string & referenceCurveID() const
const std::vector< std::string > & defaultCurveIDs()
Zero Spreaded yield curve segment.
virtual void accept(AcyclicVisitor &) override
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
const string & referenceCurveID() const
ZeroSpreadedYieldCurveSegment()
Default constructor.
virtual ~ZeroSpreadedYieldCurveSegment()
Default destructor.
Base curve configuration classes.
std::map< string, QuantLib::ext::shared_ptr< YieldCurveConfig > > YieldCurveConfigMap
Serializable Credit Default Swap.