45 else if (s ==
"CurveAndFlatVol")
48 QL_FAIL(
"CrCirData::CalibrationStrategy " << s <<
" not recognised.");
56 oss <<
"CurveAndFlatVol";
58 QL_FAIL(
"CIR Calibration strategy(" << ((
int)s) <<
") not covered");
65 LOG(
"CIR with attribute (name) = " <<
name_);
72 LOG(
"CIR calibration type = " << calibTypeString);
76 LOG(
"CIR calibration strategy = " << calibStratString);
108 "vector size mismatch in cds option expiries/terms for name " <<
name_);
112 "vector size mismatch in cds option expiries/strikes for name " <<
name_);
122 LOG(
"CrCirData done");
std::vector< std::string > & optionStrikes()
CalibrationType calibrationType_
CalibrationStrategy calibrationStrategy_
std::vector< std::string > optionTerms_
std::vector< std::string > optionExpiries_
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
std::vector< std::string > & optionTerms()
bool operator==(const CrCirData &rhs)
std::vector< std::string > & optionExpiries()
bool operator!=(const CrCirData &rhs)
std::vector< std::string > optionStrikes_
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static void addAttribute(XMLDocument &doc, XMLNode *node, const string &attrName, const string &attrValue)
static string getAttribute(XMLNode *node, const string &attrName)
static void addGenericChildAsList(XMLDocument &doc, XMLNode *n, const string &name, const vector< T > &values, const string &attrName="", const string &attr="")
static void addGenericChild(XMLDocument &doc, XMLNode *n, const char *name, const T &value)
Adds <Name>p1,p2,p3</Name>
static Real getChildValueAsDouble(XMLNode *node, const string &name, bool mandatory=false, double defaultValue=0.0)
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 > getChildrenValuesAsStrings(XMLNode *node, const string &name, bool mandatory=false)
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Classes and functions for log message handling.
#define LOG(text)
Logging Macro (Level = Notice)
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
CalibrationType parseCalibrationType(const string &s)
Convert calibration type string into enumerated class value.
CrCirData::CalibrationStrategy parseCirCalibrationStrategy(const string &s)
Size size(const ValueType &v)
Serializable Credit Default Swap.