21#include <ql/event.hpp>
26 const std::vector<LegType>& legTypes,
const bool settlesAccrual,
27 const Real fixedRecoveryRate,
28 const QuantExt::CreditDefaultSwap::ProtectionPaymentTime& defaultPaymentTime,
29 const Currency& currency)
30 : legs_(legs), legPayers_(legPayers), legTypes_(legTypes), settlesAccrual_(settlesAccrual),
31 fixedRecoveryRate_(fixedRecoveryRate), defaultPaymentTime_(defaultPaymentTime), currency_(currency) {
33 <<
") must match legPayers size ("
35 QL_REQUIRE(
legs_.size() ==
legTypes_.size(),
"CreditLinkedSwap: legs size (" <<
legs_.size()
36 <<
") must match legTypes size ("
44 QL_REQUIRE(a !=
nullptr,
"CreditLinkedSwap::setupArguments(): wrong argument type");
57 for (
auto const& l :
legs_) {
58 for (
auto const& c : l) {
std::vector< LegType > legTypes_
std::vector< bool > legPayers_
bool isExpired() const override
CreditLinkedSwap(const std::vector< Leg > &legs, const std::vector< bool > &legPayers, const std::vector< LegType > &legTypes, const bool settlesAccrual, const Real fixedRecoveryRate, const QuantExt::CreditDefaultSwap::ProtectionPaymentTime &defaultPaymentTime, const Currency ¤cy)
QuantExt::CreditDefaultSwap::ProtectionPaymentTime defaultPaymentTime_
void setupArguments(QuantLib::PricingEngine::arguments *) const override
credit linked swap instrument
std::vector< bool > legPayers
QuantExt::CreditDefaultSwap::ProtectionPaymentTime defaultPaymentTime
std::vector< LegType > legTypes