29 QuantLib::Date latestPaymentDate = Date::minDate();
32 latestPaymentDate = std::max(latestPaymentDate, d.payDate);
34 return latestPaymentDate;
45 if (depr_amount_node !=
nullptr) {
47 if (!amountStr.empty()) {
50 QL_REQUIRE(depr_ccy_node,
"PremiumAmount (" << amount <<
") given, but no PremiumCurrency");
51 QL_REQUIRE(depr_date_node,
"PremiumAmount (" << amount <<
") given, but no PremiumPayDate");
54 QL_REQUIRE(!ccyStr.empty(),
"PremiumAmount (" << amount <<
") given, but no PremiumCurrency");
55 QL_REQUIRE(!dateStr.empty(),
"PremiumAmount (" << amount <<
") given, but no PremiumPayDate");
64 QL_REQUIRE(
premiumData_.empty(),
"Single PremiumAmount and Premiums node are not allowed simultaneously. Move "
65 "the single premium to the Premiums node instead.");
std::vector< PremiumDatum > premiumData_
QuantLib::Date latestPremiumDate() const
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static vector< XMLNode * > getChildrenNodes(XMLNode *node, const string &name)
Returns all the children with a given 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 XMLNode * getChildNode(XMLNode *n, const string &name="")
static string getNodeValue(XMLNode *node)
Get a node's value.
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Date parseDate(const string &s)
Convert std::string to QuantLib::Date.
Real parseReal(const string &s)
Convert text to Real.
Filter close_enough(const RandomVariable &x, const RandomVariable &y)
std::string to_string(const LocationInfo &l)
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.
string conversion utilities