29 const ext::shared_ptr<CmsCoupon>& underlying,
32 bool isCallATMIncluded,
33 Rate callDigitalPayoff,
36 bool isPutATMIncluded,
37 Rate putDigitalPayoff,
38 const ext::shared_ptr<DigitalReplication>& replication,
40 :
DigitalCoupon(underlying, callStrike, callPosition, isCallATMIncluded,
41 callDigitalPayoff, putStrike, putPosition,
42 isPutATMIncluded, putDigitalPayoff, replication, nakedOption) {}
55 : schedule_(
std::move(schedule)), index_(
std::move(index)) {}
63 const std::vector<Real>& notionals) {
86 const std::vector<Natural>& fixingDays) {
97 const std::vector<Real>& gearings) {
103 spreads_ = std::vector<Spread>(1,spread);
108 const std::vector<Spread>& spreads) {
124 const std::vector<Rate>& strikes) {
145 const std::vector<Rate>& payoffs) {
156 const std::vector<Rate>& strikes) {
177 const std::vector<Rate>& payoffs) {
183 const ext::shared_ptr<DigitalReplication>& replication) {
198 DigitalCmsLeg::operator
Leg()
const {
199 return FloatingDigitalLeg<SwapIndex, CmsCoupon, DigitalCmsCoupon>(
200 schedule_, notionals_, index_, paymentDayCounter_,
201 paymentAdjustment_, fixingDays_,
202 gearings_, spreads_, inArrears_,
203 callStrikes_, longCallOption_,
204 callATM_, callPayoffs_,
205 putStrikes_, longPutOption_,
206 putATM_, putPayoffs_,
207 replication_, nakedOption_);
Cash flow vector builders.
degenerate base class for the Acyclic Visitor pattern
void accept(AcyclicVisitor &) override
DigitalCmsCoupon(const ext::shared_ptr< CmsCoupon > &underlying, Rate callStrike=Null< Rate >(), Position::Type callPosition=Position::Long, bool isCallATMIncluded=false, Rate callDigitalPayoff=Null< Rate >(), Rate putStrike=Null< Rate >(), Position::Type putPosition=Position::Long, bool isPutATMIncluded=false, Rate putDigitalPayoff=Null< Rate >(), const ext::shared_ptr< DigitalReplication > &replication={}, bool nakedOption=false)
helper class building a sequence of digital ibor-rate coupons
DigitalCmsLeg & withPaymentAdjustment(BusinessDayConvention)
BusinessDayConvention paymentAdjustment_
DigitalCmsLeg & withLongPutOption(Position::Type)
DigitalCmsLeg & inArrears(bool flag=true)
std::vector< Rate > putStrikes_
DigitalCmsLeg & withSpreads(Spread spread)
DigitalCmsLeg & withPutATM(bool flag=true)
DigitalCmsLeg & withPutPayoffs(Rate payoff)
DigitalCmsLeg & withGearings(Real gearing)
DigitalCmsLeg & withLongCallOption(Position::Type)
DigitalCmsLeg & withCallATM(bool flag=true)
DigitalCmsLeg & withPaymentDayCounter(const DayCounter &)
std::vector< Rate > callStrikes_
DigitalCmsLeg(Schedule schedule, ext::shared_ptr< SwapIndex > index)
DigitalCmsLeg & withReplication()
std::vector< Real > notionals_
std::vector< Spread > spreads_
std::vector< Rate > callPayoffs_
DigitalCmsLeg & withFixingDays(Natural fixingDays)
DigitalCmsLeg & withNakedOption(bool nakedOption=true)
DigitalCmsLeg & withCallStrikes(Rate strike)
Position::Type longPutOption_
DigitalCmsLeg & withCallPayoffs(Rate payoff)
std::vector< Natural > fixingDays_
ext::shared_ptr< DigitalReplication > replication_
std::vector< Rate > putPayoffs_
DigitalCmsLeg & withNotionals(Real notional)
DigitalCmsLeg & withPutStrikes(Rate strike)
Position::Type longCallOption_
std::vector< Real > gearings_
DayCounter paymentDayCounter_
Visitor for a specific class
virtual void visit(T &)=0
Cms-rate coupon with digital call/put option.
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Real Spread
spreads on interest rates
ext::shared_ptr< QuantLib::Payoff > payoff
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
ext::shared_ptr< BlackVolTermStructure > v