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
DigitalCmsSpreadLeg Class Reference

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

#include <ql/experimental/coupons/digitalcmsspreadcoupon.hpp>

+ Collaboration diagram for DigitalCmsSpreadLeg:

Public Member Functions

 DigitalCmsSpreadLeg (Schedule schedule, ext::shared_ptr< SwapSpreadIndex > index)
 
DigitalCmsSpreadLegwithNotionals (Real notional)
 
DigitalCmsSpreadLegwithNotionals (const std::vector< Real > &notionals)
 
DigitalCmsSpreadLegwithPaymentDayCounter (const DayCounter &)
 
DigitalCmsSpreadLegwithPaymentAdjustment (BusinessDayConvention)
 
DigitalCmsSpreadLegwithFixingDays (Natural fixingDays)
 
DigitalCmsSpreadLegwithFixingDays (const std::vector< Natural > &fixingDays)
 
DigitalCmsSpreadLegwithGearings (Real gearing)
 
DigitalCmsSpreadLegwithGearings (const std::vector< Real > &gearings)
 
DigitalCmsSpreadLegwithSpreads (Spread spread)
 
DigitalCmsSpreadLegwithSpreads (const std::vector< Spread > &spreads)
 
DigitalCmsSpreadLeginArrears (bool flag=true)
 
DigitalCmsSpreadLegwithCallStrikes (Rate strike)
 
DigitalCmsSpreadLegwithCallStrikes (const std::vector< Rate > &strikes)
 
DigitalCmsSpreadLegwithLongCallOption (Position::Type)
 
DigitalCmsSpreadLegwithCallATM (bool flag=true)
 
DigitalCmsSpreadLegwithCallPayoffs (Rate payoff)
 
DigitalCmsSpreadLegwithCallPayoffs (const std::vector< Rate > &payoffs)
 
DigitalCmsSpreadLegwithPutStrikes (Rate strike)
 
DigitalCmsSpreadLegwithPutStrikes (const std::vector< Rate > &strikes)
 
DigitalCmsSpreadLegwithLongPutOption (Position::Type)
 
DigitalCmsSpreadLegwithPutATM (bool flag=true)
 
DigitalCmsSpreadLegwithPutPayoffs (Rate payoff)
 
DigitalCmsSpreadLegwithPutPayoffs (const std::vector< Rate > &payoffs)
 
DigitalCmsSpreadLegwithReplication (const ext::shared_ptr< DigitalReplication > &)
 
DigitalCmsSpreadLegwithReplication ()
 
DigitalCmsSpreadLegwithNakedOption (bool nakedOption=true)
 
 operator Leg () const
 

Private Attributes

Schedule schedule_
 
ext::shared_ptr< SwapSpreadIndexindex_
 
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 57 of file digitalcmsspreadcoupon.hpp.

Constructor & Destructor Documentation

◆ DigitalCmsSpreadLeg()

DigitalCmsSpreadLeg ( Schedule  schedule,
ext::shared_ptr< SwapSpreadIndex index 
)

Definition at line 52 of file digitalcmsspreadcoupon.cpp.

Member Function Documentation

◆ withNotionals() [1/2]

DigitalCmsSpreadLeg & withNotionals ( Real  notional)

Definition at line 56 of file digitalcmsspreadcoupon.cpp.

◆ withNotionals() [2/2]

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

Definition at line 61 of file digitalcmsspreadcoupon.cpp.

◆ withPaymentDayCounter()

DigitalCmsSpreadLeg & withPaymentDayCounter ( const DayCounter dayCounter)

Definition at line 67 of file digitalcmsspreadcoupon.cpp.

◆ withPaymentAdjustment()

DigitalCmsSpreadLeg & withPaymentAdjustment ( BusinessDayConvention  convention)

Definition at line 73 of file digitalcmsspreadcoupon.cpp.

◆ withFixingDays() [1/2]

DigitalCmsSpreadLeg & withFixingDays ( Natural  fixingDays)

Definition at line 79 of file digitalcmsspreadcoupon.cpp.

◆ withFixingDays() [2/2]

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

Definition at line 84 of file digitalcmsspreadcoupon.cpp.

◆ withGearings() [1/2]

DigitalCmsSpreadLeg & withGearings ( Real  gearing)

Definition at line 90 of file digitalcmsspreadcoupon.cpp.

◆ withGearings() [2/2]

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

Definition at line 95 of file digitalcmsspreadcoupon.cpp.

◆ withSpreads() [1/2]

DigitalCmsSpreadLeg & withSpreads ( Spread  spread)

Definition at line 101 of file digitalcmsspreadcoupon.cpp.

◆ withSpreads() [2/2]

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

Definition at line 106 of file digitalcmsspreadcoupon.cpp.

◆ inArrears()

DigitalCmsSpreadLeg & inArrears ( bool  flag = true)

Definition at line 112 of file digitalcmsspreadcoupon.cpp.

◆ withCallStrikes() [1/2]

DigitalCmsSpreadLeg & withCallStrikes ( Rate  strike)

Definition at line 117 of file digitalcmsspreadcoupon.cpp.

◆ withCallStrikes() [2/2]

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

Definition at line 122 of file digitalcmsspreadcoupon.cpp.

◆ withLongCallOption()

DigitalCmsSpreadLeg & withLongCallOption ( Position::Type  type)

Definition at line 128 of file digitalcmsspreadcoupon.cpp.

◆ withCallATM()

DigitalCmsSpreadLeg & withCallATM ( bool  flag = true)

Definition at line 133 of file digitalcmsspreadcoupon.cpp.

◆ withCallPayoffs() [1/2]

DigitalCmsSpreadLeg & withCallPayoffs ( Rate  payoff)

Definition at line 138 of file digitalcmsspreadcoupon.cpp.

◆ withCallPayoffs() [2/2]

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

Definition at line 143 of file digitalcmsspreadcoupon.cpp.

◆ withPutStrikes() [1/2]

DigitalCmsSpreadLeg & withPutStrikes ( Rate  strike)

Definition at line 149 of file digitalcmsspreadcoupon.cpp.

◆ withPutStrikes() [2/2]

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

Definition at line 154 of file digitalcmsspreadcoupon.cpp.

◆ withLongPutOption()

DigitalCmsSpreadLeg & withLongPutOption ( Position::Type  type)

Definition at line 160 of file digitalcmsspreadcoupon.cpp.

◆ withPutATM()

DigitalCmsSpreadLeg & withPutATM ( bool  flag = true)

Definition at line 165 of file digitalcmsspreadcoupon.cpp.

◆ withPutPayoffs() [1/2]

DigitalCmsSpreadLeg & withPutPayoffs ( Rate  payoff)

Definition at line 170 of file digitalcmsspreadcoupon.cpp.

◆ withPutPayoffs() [2/2]

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

Definition at line 175 of file digitalcmsspreadcoupon.cpp.

◆ withReplication() [1/2]

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

Definition at line 181 of file digitalcmsspreadcoupon.cpp.

◆ withReplication() [2/2]

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

Definition at line 187 of file digitalcmsspreadcoupon.cpp.

◆ withNakedOption()

DigitalCmsSpreadLeg & withNakedOption ( bool  nakedOption = true)

Definition at line 192 of file digitalcmsspreadcoupon.cpp.

◆ operator Leg()

operator Leg ( ) const

Definition at line 197 of file digitalcmsspreadcoupon.cpp.

Member Data Documentation

◆ schedule_

Schedule schedule_
private

Definition at line 93 of file digitalcmsspreadcoupon.hpp.

◆ index_

ext::shared_ptr<SwapSpreadIndex> index_
private

Definition at line 94 of file digitalcmsspreadcoupon.hpp.

◆ notionals_

std::vector<Real> notionals_
private

Definition at line 95 of file digitalcmsspreadcoupon.hpp.

◆ paymentDayCounter_

DayCounter paymentDayCounter_
private

Definition at line 96 of file digitalcmsspreadcoupon.hpp.

◆ paymentAdjustment_

BusinessDayConvention paymentAdjustment_ = Following
private

Definition at line 97 of file digitalcmsspreadcoupon.hpp.

◆ fixingDays_

std::vector<Natural> fixingDays_
private

Definition at line 98 of file digitalcmsspreadcoupon.hpp.

◆ gearings_

std::vector<Real> gearings_
private

Definition at line 99 of file digitalcmsspreadcoupon.hpp.

◆ spreads_

std::vector<Spread> spreads_
private

Definition at line 100 of file digitalcmsspreadcoupon.hpp.

◆ inArrears_

bool inArrears_ = false
private

Definition at line 101 of file digitalcmsspreadcoupon.hpp.

◆ callStrikes_

std::vector<Rate> callStrikes_
private

Definition at line 102 of file digitalcmsspreadcoupon.hpp.

◆ callPayoffs_

std::vector<Rate> callPayoffs_
private

Definition at line 102 of file digitalcmsspreadcoupon.hpp.

◆ longCallOption_

Position::Type longCallOption_ = Position::Long
private

Definition at line 103 of file digitalcmsspreadcoupon.hpp.

◆ callATM_

bool callATM_ = false
private

Definition at line 104 of file digitalcmsspreadcoupon.hpp.

◆ putStrikes_

std::vector<Rate> putStrikes_
private

Definition at line 105 of file digitalcmsspreadcoupon.hpp.

◆ putPayoffs_

std::vector<Rate> putPayoffs_
private

Definition at line 105 of file digitalcmsspreadcoupon.hpp.

◆ longPutOption_

Position::Type longPutOption_ = Position::Long
private

Definition at line 106 of file digitalcmsspreadcoupon.hpp.

◆ putATM_

bool putATM_ = false
private

Definition at line 107 of file digitalcmsspreadcoupon.hpp.

◆ replication_

ext::shared_ptr<DigitalReplication> replication_
private

Definition at line 108 of file digitalcmsspreadcoupon.hpp.

◆ nakedOption_

bool nakedOption_
private

Definition at line 109 of file digitalcmsspreadcoupon.hpp.