24#include <ql/errors.hpp>
32 const string& curveID,
const string& curveDescription,
const string& nominalTermStructure,
const Type type,
33 const vector<string>& swapQuotes,
const string& conventions,
const bool extrapolate,
const Calendar&
calendar,
34 const DayCounter& dayCounter,
const Period& lag,
const Frequency& frequency,
const Real baseRate,
35 const Real tolerance,
const bool useLastAvailableFixingAsBaseDate,
const Date& seasonalityBaseDate,
36 const Frequency& seasonalityFrequency,
37 const vector<string>& seasonalityFactors,
const vector<double>& overrideSeasonalityFactors)
38 :
CurveConfig(curveID, curveDescription), swapQuotes_(swapQuotes), nominalTermStructure_(nominalTermStructure),
39 type_(type), conventions_(conventions), extrapolate_(extrapolate), calendar_(
calendar), dayCounter_(dayCounter),
40 lag_(lag), frequency_(frequency), baseRate_(baseRate), tolerance_(tolerance),
41 useLastAvailableFixingAsBaseDate_(useLastAvailableFixingAsBaseDate),
42 seasonalityBaseDate_(seasonalityBaseDate), seasonalityFrequency_(seasonalityFrequency),
43 seasonalityFactors_(seasonalityFactors), overrideSeasonalityFactors_(overrideSeasonalityFactors) {
64 }
else if (
type ==
"YY") {
67 QL_FAIL(
"Type " <<
type <<
" not recognized");
101 if (seasonalityNode !=
nullptr) {
124 QL_FAIL(
"Unknown Type in InflationCurveConfig::toXML()");
149 std::ostringstream dateStr, sFreq;
Base curve configuration.
map< CurveSpec::CurveType, set< string > > requiredCurveIds_
void populateRequiredCurveIds()
const Type & type() const
const Period & lag() const
Frequency seasonalityFrequency_
const string & nominalTermStructure() const
Date seasonalityBaseDate_
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
const vector< string > & seasonalityFactors() const
vector< string > swapQuotes_
vector< string > seasonalityFactors_
const vector< string > & swapQuotes()
vector< double > overrideSeasonalityFactors_
string nominalTermStructure_
bool useLastAvailableFixingAsBaseDate_
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static void addChildren(XMLDocument &doc, XMLNode *n, const string &names, const string &name, const vector< T > &values)
static void checkNode(XMLNode *n, const string &expectedName)
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
static bool getChildValueAsBool(XMLNode *node, const string &name, bool mandatory=false, bool defaultValue=true)
static XMLNode * getChildNode(XMLNode *n, const string &name="")
static vector< string > getChildrenValues(XMLNode *node, const string &names, const string &name, bool mandatory=false)
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
QuantLib::ext::shared_ptr< CurveSpec > parseCurveSpec(const string &s)
function to convert a string into a curve spec
Calendar parseCalendar(const string &s)
Convert text to QuantLib::Calendar.
Date parseDate(const string &s)
Convert std::string to QuantLib::Date.
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
Frequency parseFrequency(const string &s)
Convert text to QuantLib::Frequency.
Real parseReal(const string &s)
Convert text to Real.
DayCounter parseDayCounter(const string &s)
Convert text to QuantLib::DayCounter.
std::string to_string(const LocationInfo &l)
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.
string conversion utilities