Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
IndexCreditDefaultSwap Class Reference

#include <qle/instruments/indexcreditdefaultswap.hpp>

+ Inheritance diagram for IndexCreditDefaultSwap:
+ Collaboration diagram for IndexCreditDefaultSwap:

Classes

class  arguments
 
class  engine
 
class  results
 

Public Member Functions

 IndexCreditDefaultSwap (Protection::Side side, Real notional, std::vector< Real > underlyingNotionals, Rate spread, const Schedule &schedule, BusinessDayConvention paymentConvention, const DayCounter &dayCounter, bool settlesAccrual=true, ProtectionPaymentTime protectionPaymentTime=atDefault, const Date &protectionStart=Date(), const QuantLib::ext::shared_ptr< Claim > &claim=QuantLib::ext::shared_ptr< Claim >(), const DayCounter &lastPeriodDayCounter=DayCounter(), bool rebatesAccrual=true, const Date &tradeDate=Date(), Natural cashSettlementDays=3)
 
 IndexCreditDefaultSwap (Protection::Side side, Real notional, std::vector< Real > underlyingNotionals, Rate upfront, Rate spread, const Schedule &schedule, BusinessDayConvention paymentConvention, const DayCounter &dayCounter, bool settlesAccrual=true, ProtectionPaymentTime protectionPaymentTime=atDefault, const Date &protectionStart=Date(), const Date &upfrontDate=Date(), const QuantLib::ext::shared_ptr< Claim > &claim=QuantLib::ext::shared_ptr< Claim >(), const DayCounter &lastPeriodDayCounter=DayCounter(), bool rebatesAccrual=true, const Date &tradeDate=Date(), Natural cashSettlementDays=3)
 
Inspectors
const std::vector< Real > & underlyingNotionals () const
 

Protected Member Functions

Additional interface
virtual QuantLib::ext::shared_ptr< PricingEngine > buildPricingEngine (const Handle< DefaultProbabilityTermStructure > &p, Real r, const Handle< YieldTermStructure > &d, PricingModel model=Midpoint) const override
 

Instrument interface

std::vector< Real > underlyingNotionals_
 
void setupArguments (PricingEngine::arguments *) const override
 

Detailed Description

Definition at line 42 of file indexcreditdefaultswap.hpp.

Constructor & Destructor Documentation

◆ IndexCreditDefaultSwap() [1/2]

IndexCreditDefaultSwap ( Protection::Side  side,
Real  notional,
std::vector< Real >  underlyingNotionals,
Rate  spread,
const Schedule &  schedule,
BusinessDayConvention  paymentConvention,
const DayCounter &  dayCounter,
bool  settlesAccrual = true,
ProtectionPaymentTime  protectionPaymentTime = atDefault,
const Date &  protectionStart = Date(),
const QuantLib::ext::shared_ptr< Claim > &  claim = QuantLib::ext::shared_ptr<Claim>(),
const DayCounter &  lastPeriodDayCounter = DayCounter(),
bool  rebatesAccrual = true,
const Date &  tradeDate = Date(),
Natural  cashSettlementDays = 3 
)

Definition at line 48 of file indexcreditdefaultswap.hpp.

58 : QuantLib::CreditDefaultSwap(side, notional, spread, schedule, paymentConvention, dayCounter, settlesAccrual,
59 protectionPaymentTime, protectionStart, claim, lastPeriodDayCounter, rebatesAccrual,
60 tradeDate, cashSettlementDays),
const std::vector< Real > & underlyingNotionals() const

◆ IndexCreditDefaultSwap() [2/2]

IndexCreditDefaultSwap ( Protection::Side  side,
Real  notional,
std::vector< Real >  underlyingNotionals,
Rate  upfront,
Rate  spread,
const Schedule &  schedule,
BusinessDayConvention  paymentConvention,
const DayCounter &  dayCounter,
bool  settlesAccrual = true,
ProtectionPaymentTime  protectionPaymentTime = atDefault,
const Date &  protectionStart = Date(),
const Date &  upfrontDate = Date(),
const QuantLib::ext::shared_ptr< Claim > &  claim = QuantLib::ext::shared_ptr<Claim>(),
const DayCounter &  lastPeriodDayCounter = DayCounter(),
bool  rebatesAccrual = true,
const Date &  tradeDate = Date(),
Natural  cashSettlementDays = 3 
)

Definition at line 63 of file indexcreditdefaultswap.hpp.

73 : QuantLib::CreditDefaultSwap(side, notional, upfront, spread, schedule, paymentConvention, dayCounter, settlesAccrual,
74 protectionPaymentTime, protectionStart, upfrontDate, claim, lastPeriodDayCounter,
75 rebatesAccrual, tradeDate, cashSettlementDays),

Member Function Documentation

◆ underlyingNotionals()

const std::vector< Real > & underlyingNotionals ( ) const

Definition at line 81 of file indexcreditdefaultswap.hpp.

81{ return underlyingNotionals_; }

◆ setupArguments()

void setupArguments ( PricingEngine::arguments *  args) const
override

Definition at line 24 of file indexcreditdefaultswap.cpp.

24 {
25 CreditDefaultSwap::setupArguments(args);
26 IndexCreditDefaultSwap::arguments* arguments = dynamic_cast<IndexCreditDefaultSwap::arguments*>(args);
27 QL_REQUIRE(arguments != 0, "wrong argument type");
28 arguments->underlyingNotionals = underlyingNotionals_;
29}

◆ buildPricingEngine()

QuantLib::ext::shared_ptr< PricingEngine > buildPricingEngine ( const Handle< DefaultProbabilityTermStructure > &  p,
Real  r,
const Handle< YieldTermStructure > &  d,
PricingModel  model = Midpoint 
) const
overrideprotectedvirtual

Definition at line 32 of file indexcreditdefaultswap.cpp.

33 {
34 return QuantLib::ext::make_shared<MidPointIndexCdsEngine>(p, r, d, true);
35}

Member Data Documentation

◆ underlyingNotionals_

std::vector<Real> underlyingNotionals_
protected

Definition at line 91 of file indexcreditdefaultswap.hpp.