22#include <ql/errors.hpp>
30 : settlementDays_(0), businessDayConvention_(Following), extrapolate_(true), adjustForLosses_(true) {}
33 const string& curveDescription,
34 const vector<string>& detachmentPoints,
35 const vector<string>& terms,
38 BusinessDayConvention businessDayConvention,
39 DayCounter dayCounter,
41 const string& quoteName,
42 const Date& startDate,
43 const Period& indexTerm,
44 boost::optional<DateGeneration::Rule> rule,
47 detachmentPoints_(detachmentPoints),
49 settlementDays_(settlementDays),
51 businessDayConvention_(businessDayConvention),
52 dayCounter_(dayCounter),
53 extrapolate_(extrapolate),
54 quoteName_(quoteName.empty() ? curveID : quoteName),
55 startDate_(startDate),
56 indexTerm_(indexTerm),
58 adjustForLosses_(adjustForLosses) {}
62 string base =
"CDS_INDEX/BASE_CORRELATION/" +
quoteName_ +
"/";
65 quotes_.push_back(base + t +
"/" + dp);
Base Correlation curve configuration classes.
vector< string > detachmentPoints_
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
const vector< string > & quotes() override
Return all the market quotes required for this config.
BaseCorrelationCurveConfig()
Default constructor.
QuantLib::Date startDate_
boost::optional< QuantLib::DateGeneration::Rule > rule_
QuantLib::Period indexTerm_
BusinessDayConvention businessDayConvention_
Base curve configuration.
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static void addGenericChildAsList(XMLDocument &doc, XMLNode *n, const string &name, const vector< T > &values, const string &attrName="", const string &attr="")
static void checkNode(XMLNode *n, const string &expectedName)
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
static XMLNode * getChildNode(XMLNode *n, const string &name="")
static string getNodeValue(XMLNode *node)
Get a node's value.
static vector< string > getChildrenValuesAsStrings(XMLNode *node, const string &name, bool mandatory=false)
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
DateGeneration::Rule parseDateGenerationRule(const string &s)
Convert text to QuantLib::DateGeneration::Rule.
Calendar parseCalendar(const string &s)
Convert text to QuantLib::Calendar.
Date parseDate(const string &s)
Convert std::string to QuantLib::Date.
BusinessDayConvention parseBusinessDayConvention(const string &s)
Convert text to QuantLib::BusinessDayConvention.
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
bool parseBool(const string &s)
Convert text to bool.
Integer parseInteger(const string &s)
Convert text to QuantLib::Integer.
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