20#include <boost/algorithm/string/case_conv.hpp>
21#include <boost/lexical_cast.hpp>
34 QL_FAIL(
"Parameter type not covered by <<");
39 if (boost::algorithm::to_upper_copy(s) ==
"CONSTANT")
41 else if (boost::algorithm::to_upper_copy(s) ==
"PIECEWISE")
44 QL_FAIL(
"Parameter type " << s <<
" not recognized");
48 if (boost::algorithm::to_upper_copy(s) ==
"BOOTSTRAP")
50 else if (boost::algorithm::to_upper_copy(s) ==
"BESTFIT")
52 else if (boost::algorithm::to_upper_copy(s) ==
"NONE")
55 QL_FAIL(
"Calibration type " << s <<
" not recognized");
66 QL_FAIL(
"Calibration type not covered");
71 if (boost::algorithm::to_upper_copy(s) ==
"COTERMINALATM")
73 else if (boost::algorithm::to_upper_copy(s) ==
"COTERMINALDEALSTRIKE")
75 else if (boost::algorithm::to_upper_copy(s) ==
"UNDERLYINGATM")
77 else if (boost::algorithm::to_upper_copy(s) ==
"UNDERLYINGDEALSTRIKE")
79 else if (boost::algorithm::to_upper_copy(s) ==
"NONE")
82 QL_FAIL(
"Calibration strategy " << s <<
" not recognized");
87 oss <<
"COTERMINALATM";
89 oss <<
"COTERMINALDEALSTRIKE";
91 oss <<
"UNDERLYINGATM";
93 oss <<
"UNDERLYINGDEALSTRIKE";
97 QL_FAIL(
"Calibration strategy not covered");
125 QuantLib::ext::shared_ptr<QuantLib::IborIndex> index;
CalibrationType calibrationType_
virtual std::string ccy() const
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
virtual void clear()
Clear list of calibration instruments.
virtual void reset()
Reset member variables to defaults.
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static void addGenericChild(XMLDocument &doc, XMLNode *n, const char *name, const T &value)
Adds <Name>p1,p2,p3</Name>
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
bool tryParseIborIndex(const string &s, QuantLib::ext::shared_ptr< IborIndex > &index)
Try to convert std::string to QuantLib::IborIndex.
Map text representations to QuantLib/QuantExt types.
Generic interest rate model data.
Classes and functions for log message handling.
#define LOG(text)
Logging Macro (Level = Notice)
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
CalibrationType
Supported calibration types.
ParamType
Supported calibration parameter type.
CalibrationType parseCalibrationType(const string &s)
Convert calibration type string into enumerated class value.
CalibrationStrategy parseCalibrationStrategy(const string &s)
Convert calibration strategy string into enumerated class value.
ParamType parseParamType(const string &s)
Convert parameter type string into enumerated class value.
CalibrationStrategy
Supported calibration strategies.
Serializable Credit Default Swap.