23using QuantLib::Period;
34 const QuantLib::ext::shared_ptr<BaseStrike>& strike)
61 if (
type_ == YoYInflationCapFloor::Cap)
63 else if (
type_ == YoYInflationCapFloor::Floor)
66 QL_FAIL(
"Failure in YoYCapFloor::toXML, unsupported YoY cap floor type.");
std::string instrumentType_
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
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 * addChild(XMLDocument &doc, XMLNode *n, const string &name)
QuantLib::YoYInflationCapFloor::Type type() const
QuantLib::YoYInflationCapFloor::Type type_
QuantLib::ext::shared_ptr< BaseStrike > strike_
YoYCapFloor()
Default constructor.
void fromXML(XMLNode *node) override
XMLNode * toXML(XMLDocument &doc) const override
const QuantLib::ext::shared_ptr< BaseStrike > & strike() const
const QuantLib::Period & tenor() const
YoYInflationCapFloor::Type parseYoYInflationCapFloorType(const string &s)
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
class for holding details of a year on year inflation cap floor calibration instrument.
std::string to_string(const LocationInfo &l)
QuantLib::ext::shared_ptr< BaseStrike > parseBaseStrike(const string &strStrike)
Parse a Strike from its string representation, strStrike.
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.
string conversion utilities