QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
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 <digitalcmsspreadcoupon.hpp>

+ Collaboration diagram for DigitalCmsSpreadLeg:

Public Member Functions

 DigitalCmsSpreadLeg (Schedule schedule, ext::shared_ptr< SwapSpreadIndex > index)
 
DigitalCmsSpreadLeg & withNotionals (Real notional)
 
DigitalCmsSpreadLeg & withNotionals (const std::vector< Real > &notionals)
 
DigitalCmsSpreadLeg & withPaymentDayCounter (const DayCounter &)
 
DigitalCmsSpreadLeg & withPaymentAdjustment (BusinessDayConvention)
 
DigitalCmsSpreadLeg & withFixingDays (Natural fixingDays)
 
DigitalCmsSpreadLeg & withFixingDays (const std::vector< Natural > &fixingDays)
 
DigitalCmsSpreadLeg & withGearings (Real gearing)
 
DigitalCmsSpreadLeg & withGearings (const std::vector< Real > &gearings)
 
DigitalCmsSpreadLeg & withSpreads (Spread spread)
 
DigitalCmsSpreadLeg & withSpreads (const std::vector< Spread > &spreads)
 
DigitalCmsSpreadLeg & inArrears (bool flag=true)
 
DigitalCmsSpreadLeg & withCallStrikes (Rate strike)
 
DigitalCmsSpreadLeg & withCallStrikes (const std::vector< Rate > &strikes)
 
DigitalCmsSpreadLeg & withLongCallOption (Position::Type)
 
DigitalCmsSpreadLeg & withCallATM (bool flag=true)
 
DigitalCmsSpreadLeg & withCallPayoffs (Rate payoff)
 
DigitalCmsSpreadLeg & withCallPayoffs (const std::vector< Rate > &payoffs)
 
DigitalCmsSpreadLeg & withPutStrikes (Rate strike)
 
DigitalCmsSpreadLeg & withPutStrikes (const std::vector< Rate > &strikes)
 
DigitalCmsSpreadLeg & withLongPutOption (Position::Type)
 
DigitalCmsSpreadLeg & withPutATM (bool flag=true)
 
DigitalCmsSpreadLeg & withPutPayoffs (Rate payoff)
 
DigitalCmsSpreadLeg & withPutPayoffs (const std::vector< Rate > &payoffs)
 
DigitalCmsSpreadLeg & withReplication (const ext::shared_ptr< DigitalReplication > &)
 
DigitalCmsSpreadLeg & withNakedOption (bool nakedOption=true)
 
 operator Leg () const
 

Private Attributes

Schedule schedule_
 
ext::shared_ptr< SwapSpreadIndex > index_
 
std::vector< Real > notionals_
 
DayCounter paymentDayCounter_
 
BusinessDayConvention paymentAdjustment_ = Following
 
std::vector< Natural > fixingDays_
 
std::vector< Real > gearings_
 
std::vector< Spread > spreads_
 
bool inArrears_ = false
 
std::vector< Rate > callStrikes_
 
std::vector< Rate > callPayoffs_
 
Position::Type longCallOption_ = Position::Long
 
bool callATM_ = false
 
std::vector< Rate > putStrikes_
 
std::vector< Rate > putPayoffs_
 
Position::Type longPutOption_ = Position::Long
 
bool putATM_ = false
 
ext::shared_ptr< DigitalReplication > replication_
 
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()

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

Definition at line 181 of file digitalcmsspreadcoupon.cpp.

◆ withNakedOption()

DigitalCmsSpreadLeg & withNakedOption ( bool  nakedOption = true)

Definition at line 187 of file digitalcmsspreadcoupon.cpp.

◆ operator Leg()

operator Leg ( ) const

Definition at line 192 of file digitalcmsspreadcoupon.cpp.

Member Data Documentation

◆ schedule_

Schedule schedule_
private

Definition at line 88 of file digitalcmsspreadcoupon.hpp.

◆ index_

ext::shared_ptr<SwapSpreadIndex> index_
private

Definition at line 89 of file digitalcmsspreadcoupon.hpp.

◆ notionals_

std::vector<Real> notionals_
private

Definition at line 90 of file digitalcmsspreadcoupon.hpp.

◆ paymentDayCounter_

DayCounter paymentDayCounter_
private

Definition at line 91 of file digitalcmsspreadcoupon.hpp.

◆ paymentAdjustment_

BusinessDayConvention paymentAdjustment_ = Following
private

Definition at line 92 of file digitalcmsspreadcoupon.hpp.

◆ fixingDays_

std::vector<Natural> fixingDays_
private

Definition at line 93 of file digitalcmsspreadcoupon.hpp.

◆ gearings_

std::vector<Real> gearings_
private

Definition at line 94 of file digitalcmsspreadcoupon.hpp.

◆ spreads_

std::vector<Spread> spreads_
private

Definition at line 95 of file digitalcmsspreadcoupon.hpp.

◆ inArrears_

bool inArrears_ = false
private

Definition at line 96 of file digitalcmsspreadcoupon.hpp.

◆ callStrikes_

std::vector<Rate> callStrikes_
private

Definition at line 97 of file digitalcmsspreadcoupon.hpp.

◆ callPayoffs_

std::vector<Rate> callPayoffs_
private

Definition at line 97 of file digitalcmsspreadcoupon.hpp.

◆ longCallOption_

Position::Type longCallOption_ = Position::Long
private

Definition at line 98 of file digitalcmsspreadcoupon.hpp.

◆ callATM_

bool callATM_ = false
private

Definition at line 99 of file digitalcmsspreadcoupon.hpp.

◆ putStrikes_

std::vector<Rate> putStrikes_
private

Definition at line 100 of file digitalcmsspreadcoupon.hpp.

◆ putPayoffs_

std::vector<Rate> putPayoffs_
private

Definition at line 100 of file digitalcmsspreadcoupon.hpp.

◆ longPutOption_

Position::Type longPutOption_ = Position::Long
private

Definition at line 101 of file digitalcmsspreadcoupon.hpp.

◆ putATM_

bool putATM_ = false
private

Definition at line 102 of file digitalcmsspreadcoupon.hpp.

◆ replication_

ext::shared_ptr<DigitalReplication> replication_
private

Definition at line 103 of file digitalcmsspreadcoupon.hpp.

◆ nakedOption_

bool nakedOption_
private

Definition at line 104 of file digitalcmsspreadcoupon.hpp.