QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
DigitalCmsLeg Class Reference

helper class building a sequence of digital ibor-rate coupons More...

#include <ql/cashflows/digitalcmscoupon.hpp>

+ Collaboration diagram for DigitalCmsLeg:

Public Member Functions

 DigitalCmsLeg (Schedule schedule, ext::shared_ptr< SwapIndex > index)
 
DigitalCmsLegwithNotionals (Real notional)
 
DigitalCmsLegwithNotionals (const std::vector< Real > &notionals)
 
DigitalCmsLegwithPaymentDayCounter (const DayCounter &)
 
DigitalCmsLegwithPaymentAdjustment (BusinessDayConvention)
 
DigitalCmsLegwithFixingDays (Natural fixingDays)
 
DigitalCmsLegwithFixingDays (const std::vector< Natural > &fixingDays)
 
DigitalCmsLegwithGearings (Real gearing)
 
DigitalCmsLegwithGearings (const std::vector< Real > &gearings)
 
DigitalCmsLegwithSpreads (Spread spread)
 
DigitalCmsLegwithSpreads (const std::vector< Spread > &spreads)
 
DigitalCmsLeginArrears (bool flag=true)
 
DigitalCmsLegwithCallStrikes (Rate strike)
 
DigitalCmsLegwithCallStrikes (const std::vector< Rate > &strikes)
 
DigitalCmsLegwithLongCallOption (Position::Type)
 
DigitalCmsLegwithCallATM (bool flag=true)
 
DigitalCmsLegwithCallPayoffs (Rate payoff)
 
DigitalCmsLegwithCallPayoffs (const std::vector< Rate > &payoffs)
 
DigitalCmsLegwithPutStrikes (Rate strike)
 
DigitalCmsLegwithPutStrikes (const std::vector< Rate > &strikes)
 
DigitalCmsLegwithLongPutOption (Position::Type)
 
DigitalCmsLegwithPutATM (bool flag=true)
 
DigitalCmsLegwithPutPayoffs (Rate payoff)
 
DigitalCmsLegwithPutPayoffs (const std::vector< Rate > &payoffs)
 
DigitalCmsLegwithReplication (const ext::shared_ptr< DigitalReplication > &)
 
DigitalCmsLegwithReplication ()
 
DigitalCmsLegwithNakedOption (bool nakedOption=true)
 
 operator Leg () const
 

Private Attributes

Schedule schedule_
 
ext::shared_ptr< SwapIndexindex_
 
std::vector< Realnotionals_
 
DayCounter paymentDayCounter_
 
BusinessDayConvention paymentAdjustment_ = Following
 
std::vector< NaturalfixingDays_
 
std::vector< Realgearings_
 
std::vector< Spreadspreads_
 
bool inArrears_ = false
 
std::vector< RatecallStrikes_
 
std::vector< RatecallPayoffs_
 
Position::Type longCallOption_ = Position::Long
 
bool callATM_ = false
 
std::vector< RateputStrikes_
 
std::vector< RateputPayoffs_
 
Position::Type longPutOption_ = Position::Long
 
bool putATM_ = false
 
ext::shared_ptr< DigitalReplicationreplication_
 
bool nakedOption_
 

Detailed Description

helper class building a sequence of digital ibor-rate coupons

Definition at line 59 of file digitalcmscoupon.hpp.

Constructor & Destructor Documentation

◆ DigitalCmsLeg()

DigitalCmsLeg ( Schedule  schedule,
ext::shared_ptr< SwapIndex index 
)

Definition at line 54 of file digitalcmscoupon.cpp.

Member Function Documentation

◆ withNotionals() [1/2]

DigitalCmsLeg & withNotionals ( Real  notional)

Definition at line 57 of file digitalcmscoupon.cpp.

◆ withNotionals() [2/2]

DigitalCmsLeg & withNotionals ( const std::vector< Real > &  notionals)

Definition at line 62 of file digitalcmscoupon.cpp.

◆ withPaymentDayCounter()

DigitalCmsLeg & withPaymentDayCounter ( const DayCounter dayCounter)

Definition at line 68 of file digitalcmscoupon.cpp.

◆ withPaymentAdjustment()

DigitalCmsLeg & withPaymentAdjustment ( BusinessDayConvention  convention)

Definition at line 74 of file digitalcmscoupon.cpp.

◆ withFixingDays() [1/2]

DigitalCmsLeg & withFixingDays ( Natural  fixingDays)

Definition at line 80 of file digitalcmscoupon.cpp.

◆ withFixingDays() [2/2]

DigitalCmsLeg & withFixingDays ( const std::vector< Natural > &  fixingDays)

Definition at line 85 of file digitalcmscoupon.cpp.

◆ withGearings() [1/2]

DigitalCmsLeg & withGearings ( Real  gearing)

Definition at line 91 of file digitalcmscoupon.cpp.

◆ withGearings() [2/2]

DigitalCmsLeg & withGearings ( const std::vector< Real > &  gearings)

Definition at line 96 of file digitalcmscoupon.cpp.

◆ withSpreads() [1/2]

DigitalCmsLeg & withSpreads ( Spread  spread)

Definition at line 102 of file digitalcmscoupon.cpp.

◆ withSpreads() [2/2]

DigitalCmsLeg & withSpreads ( const std::vector< Spread > &  spreads)

Definition at line 107 of file digitalcmscoupon.cpp.

◆ inArrears()

DigitalCmsLeg & inArrears ( bool  flag = true)

Definition at line 113 of file digitalcmscoupon.cpp.

◆ withCallStrikes() [1/2]

DigitalCmsLeg & withCallStrikes ( Rate  strike)

Definition at line 118 of file digitalcmscoupon.cpp.

◆ withCallStrikes() [2/2]

DigitalCmsLeg & withCallStrikes ( const std::vector< Rate > &  strikes)

Definition at line 123 of file digitalcmscoupon.cpp.

◆ withLongCallOption()

DigitalCmsLeg & withLongCallOption ( Position::Type  type)

Definition at line 129 of file digitalcmscoupon.cpp.

◆ withCallATM()

DigitalCmsLeg & withCallATM ( bool  flag = true)

Definition at line 134 of file digitalcmscoupon.cpp.

◆ withCallPayoffs() [1/2]

DigitalCmsLeg & withCallPayoffs ( Rate  payoff)

Definition at line 139 of file digitalcmscoupon.cpp.

◆ withCallPayoffs() [2/2]

DigitalCmsLeg & withCallPayoffs ( const std::vector< Rate > &  payoffs)

Definition at line 144 of file digitalcmscoupon.cpp.

◆ withPutStrikes() [1/2]

DigitalCmsLeg & withPutStrikes ( Rate  strike)

Definition at line 150 of file digitalcmscoupon.cpp.

◆ withPutStrikes() [2/2]

DigitalCmsLeg & withPutStrikes ( const std::vector< Rate > &  strikes)

Definition at line 155 of file digitalcmscoupon.cpp.

◆ withLongPutOption()

DigitalCmsLeg & withLongPutOption ( Position::Type  type)

Definition at line 161 of file digitalcmscoupon.cpp.

◆ withPutATM()

DigitalCmsLeg & withPutATM ( bool  flag = true)

Definition at line 166 of file digitalcmscoupon.cpp.

◆ withPutPayoffs() [1/2]

DigitalCmsLeg & withPutPayoffs ( Rate  payoff)

Definition at line 171 of file digitalcmscoupon.cpp.

◆ withPutPayoffs() [2/2]

DigitalCmsLeg & withPutPayoffs ( const std::vector< Rate > &  payoffs)

Definition at line 176 of file digitalcmscoupon.cpp.

◆ withReplication() [1/2]

DigitalCmsLeg & withReplication ( const ext::shared_ptr< DigitalReplication > &  replication)

Definition at line 182 of file digitalcmscoupon.cpp.

◆ withReplication() [2/2]

DigitalCmsLeg & withReplication ( )
Deprecated:
Use the overload that passes a replication instead. Deprecated in version 1.32.

Definition at line 188 of file digitalcmscoupon.cpp.

◆ withNakedOption()

DigitalCmsLeg & withNakedOption ( bool  nakedOption = true)

Definition at line 193 of file digitalcmscoupon.cpp.

◆ operator Leg()

operator Leg ( ) const

Definition at line 198 of file digitalcmscoupon.cpp.

Member Data Documentation

◆ schedule_

Schedule schedule_
private

Definition at line 95 of file digitalcmscoupon.hpp.

◆ index_

ext::shared_ptr<SwapIndex> index_
private

Definition at line 96 of file digitalcmscoupon.hpp.

◆ notionals_

std::vector<Real> notionals_
private

Definition at line 97 of file digitalcmscoupon.hpp.

◆ paymentDayCounter_

DayCounter paymentDayCounter_
private

Definition at line 98 of file digitalcmscoupon.hpp.

◆ paymentAdjustment_

BusinessDayConvention paymentAdjustment_ = Following
private

Definition at line 99 of file digitalcmscoupon.hpp.

◆ fixingDays_

std::vector<Natural> fixingDays_
private

Definition at line 100 of file digitalcmscoupon.hpp.

◆ gearings_

std::vector<Real> gearings_
private

Definition at line 101 of file digitalcmscoupon.hpp.

◆ spreads_

std::vector<Spread> spreads_
private

Definition at line 102 of file digitalcmscoupon.hpp.

◆ inArrears_

bool inArrears_ = false
private

Definition at line 103 of file digitalcmscoupon.hpp.

◆ callStrikes_

std::vector<Rate> callStrikes_
private

Definition at line 104 of file digitalcmscoupon.hpp.

◆ callPayoffs_

std::vector<Rate> callPayoffs_
private

Definition at line 104 of file digitalcmscoupon.hpp.

◆ longCallOption_

Position::Type longCallOption_ = Position::Long
private

Definition at line 105 of file digitalcmscoupon.hpp.

◆ callATM_

bool callATM_ = false
private

Definition at line 106 of file digitalcmscoupon.hpp.

◆ putStrikes_

std::vector<Rate> putStrikes_
private

Definition at line 107 of file digitalcmscoupon.hpp.

◆ putPayoffs_

std::vector<Rate> putPayoffs_
private

Definition at line 107 of file digitalcmscoupon.hpp.

◆ longPutOption_

Position::Type longPutOption_ = Position::Long
private

Definition at line 108 of file digitalcmscoupon.hpp.

◆ putATM_

bool putATM_ = false
private

Definition at line 109 of file digitalcmscoupon.hpp.

◆ replication_

ext::shared_ptr<DigitalReplication> replication_
private

Definition at line 110 of file digitalcmscoupon.hpp.

◆ nakedOption_

bool nakedOption_
private

Definition at line 111 of file digitalcmscoupon.hpp.