25 :
Swap(env, legData,
"InflationSwap") {}
28 :
Swap(env, leg0, leg1,
"InflationSwap") {}
32 bool hasInflationLeg =
false;
33 for (Size i = 0; i <
legData.size(); i++)
34 if (
legData[i].legType() ==
"CPI" ||
legData[i].legType() ==
"YY") {
35 hasInflationLeg =
true;
38 QL_REQUIRE(hasInflationLeg,
"InflationSwap must have at least one inflation leg (e.g. CPI, YY)");
43 DLOG(
"InflationSwap::build() called for " <<
id());
58 else if (std::find_if(
legData_.begin(),
legData_.end(), [](
const LegData& d) { return d.legType() ==
"YY"; }) !=
Serializable object holding generic trade data, reporting dimensions.
void setIsdaTaxonomyFields() override
void checkInflationSwap(const vector< LegData > &legData)
InflationSwap()
Default constructor.
virtual void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Trade interface.
Serializable object holding leg data.
Serializable Swap, Single and Cross Currency.
const vector< LegData > & legData() const
vector< LegData > legData_
virtual void setIsdaTaxonomyFields()
virtual void build(const QuantLib::ext::shared_ptr< EngineFactory > &) override
Build QuantLib/QuantExt instrument, link pricing engine.
std::map< std::string, boost::any > additionalData_
Cross Currency Swap data model and serialization.
#define DLOG(text)
Logging Macro (Level = Debug)
Serializable Credit Default Swap.