29 const Real couponRate)
30 : side_(
Protection::Buyer), nominal_(1.0), tenor_(tenor),
31 couponTenor_(3 *
Months), couponRate_(couponRate), upfrontRate_(0.0),
36 const Real couponRate)
37 : side_(
Protection::Buyer), nominal_(1.0), termDate_(termDate),
38 couponTenor_(3 *
Months), couponRate_(couponRate), upfrontRate_(0.0),
43 ext::shared_ptr<CreditDefaultSwap>
swap = *
this;
47 MakeCreditDefaultSwap::operator ext::shared_ptr<CreditDefaultSwap>()
const {
54 protectionStart = tradeDate;
56 protectionStart = tradeDate + 1;
64 end = tradeDate + *tenor_;
73 ext::shared_ptr<CreditDefaultSwap> cds =
74 ext::make_shared<CreditDefaultSwap>(
75 side_, nominal_, upfrontRate_, couponRate_, schedule,
Following,
76 dayCounter_,
true,
true, protectionStart, upfrontDate,
77 ext::shared_ptr<Claim>(), lastPeriodDayCounter_,
true, tradeDate, cashSettlementDays_);
130 const ext::shared_ptr<PricingEngine> &engine) {
ext::shared_ptr< PricingEngine > engine_
Actual/360 day count convention.
Date advance(const Date &, Integer n, TimeUnit unit, BusinessDayConvention convention=Following, bool endOfMonth=false) const
MakeCreditDefaultSwap & withLastPeriodDayCounter(DayCounter &)
MakeCreditDefaultSwap & withTradeDate(const Date &tradeDate)
MakeCreditDefaultSwap & withDayCounter(DayCounter &)
MakeCreditDefaultSwap & withCouponTenor(Period)
MakeCreditDefaultSwap & withNominal(Real)
Natural cashSettlementDays_
MakeCreditDefaultSwap(const Period &tenor, Real couponRate)
MakeCreditDefaultSwap & withDateGenerationRule(DateGeneration::Rule rule)
DateGeneration::Rule rule_
MakeCreditDefaultSwap & withCashSettlementDays(Natural cashSettlementDays)
MakeCreditDefaultSwap & withPricingEngine(const ext::shared_ptr< PricingEngine > &)
ext::shared_ptr< PricingEngine > engine_
MakeCreditDefaultSwap & withSide(Protection::Side)
DayCounter lastPeriodDayCounter_
MakeCreditDefaultSwap & withUpfrontRate(Real)
template class providing a null value for a given type.
DateProxy & evaluationDate()
the date at which pricing is to be performed.
static Settings & instance()
access to the unique instance
unsigned QL_INTEGER Natural
positive integer
Helper class to instantiate standard market cds.
Date cdsMaturity(const Date &tradeDate, const Period &tenor, DateGeneration::Rule rule)
void swap(Array &v, Array &w) noexcept
information on a default-protection contract