23#include <boost/algorithm/string/predicate.hpp>
31 if ((p.units() == QuantLib::Months && p.length() == 3) || (p.units() == QuantLib::Weeks && p.length() == 13)) {
33 }
else if ((p.units() == QuantLib::Months && p.length() == 6) || (p.units() == QuantLib::Weeks && p.length() == 26)) {
35 }
else if ((p.units() == QuantLib::Days && p.length() == 1) || p == 1 * QuantLib::Weeks) {
39 }
else if ((p.units() == QuantLib::Months && p.length() == 1) || (p.units() == QuantLib::Weeks && p.length() == 2) ||
40 (p.units() == QuantLib::Weeks && p.length() == 4) || (p.units() == QuantLib::Days && p.length() >= 28 && p.length() <= 31)) {
45 }
else if ((p.units() == QuantLib::Months && p.length() == 12) || (p.units() == QuantLib::Years && p.length() == 1) ||
46 (p.units() == QuantLib::Weeks && p.length() == 52)) {
55 QL_REQUIRE(!
label2.empty(),
"Could not determine SIMM Label2 for period " << p);
61 if (boost::algorithm::starts_with(irIndex->name(),
"BMA")) {
65 }
else if (irIndex->familyName() ==
"Prime") {
67 }
else if(QuantLib::ext::dynamic_pointer_cast<QuantExt::TermRateIndex>(irIndex) !=
nullptr) {
72 QL_REQUIRE(!
label2.empty(),
"Could not determine SIMM Label2 for index " << irIndex->name());
virtual std::string label2(const QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > &irIndex) const
CRIF configuration interface.
string periodToLabels2(const QuantLib::Period &p)