27 const ext::shared_ptr<CmsSpreadCoupon>& underlying,
30 bool isCallATMIncluded,
31 Rate callDigitalPayoff,
34 bool isPutATMIncluded,
35 Rate putDigitalPayoff,
36 const ext::shared_ptr<DigitalReplication>& replication,
38 :
DigitalCoupon(underlying, callStrike, callPosition, isCallATMIncluded,
39 callDigitalPayoff, putStrike, putPosition,
40 isPutATMIncluded, putDigitalPayoff, replication, nakedOption) {}
53 ext::shared_ptr<SwapSpreadIndex> index)
54 : schedule_(
std::move(schedule)), index_(
std::move(index)) {}
62 const std::vector<Real>& notionals) {
85 const std::vector<Natural>& fixingDays) {
96 const std::vector<Real>& gearings) {
102 spreads_ = std::vector<Spread>(1,spread);
107 const std::vector<Spread>& spreads) {
123 const std::vector<Rate>& strikes) {
144 const std::vector<Rate>& payoffs) {
155 const std::vector<Rate>& strikes) {
176 const std::vector<Rate>& payoffs) {
182 const ext::shared_ptr<DigitalReplication>& replication) {
197 DigitalCmsSpreadLeg::operator
Leg()
const {
198 return FloatingDigitalLeg<SwapSpreadIndex, CmsSpreadCoupon, DigitalCmsSpreadCoupon>(
199 schedule_, notionals_, index_, paymentDayCounter_,
200 paymentAdjustment_, fixingDays_,
201 gearings_, spreads_, inArrears_,
202 callStrikes_, longCallOption_,
203 callATM_, callPayoffs_,
204 putStrikes_, longPutOption_,
205 putATM_, putPayoffs_,
206 replication_, nakedOption_);
Cash flow vector builders.
degenerate base class for the Acyclic Visitor pattern
void accept(AcyclicVisitor &) override
DigitalCmsSpreadCoupon(const ext::shared_ptr< CmsSpreadCoupon > &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
DigitalCmsSpreadLeg & inArrears(bool flag=true)
DigitalCmsSpreadLeg & withPutATM(bool flag=true)
DigitalCmsSpreadLeg & withCallATM(bool flag=true)
BusinessDayConvention paymentAdjustment_
DigitalCmsSpreadLeg & withNakedOption(bool nakedOption=true)
std::vector< Rate > putStrikes_
DigitalCmsSpreadLeg & withCallStrikes(Rate strike)
DigitalCmsSpreadLeg & withPutPayoffs(Rate payoff)
DigitalCmsSpreadLeg & withPutStrikes(Rate strike)
DigitalCmsSpreadLeg & withGearings(Real gearing)
DigitalCmsSpreadLeg & withSpreads(Spread spread)
std::vector< Rate > callStrikes_
DigitalCmsSpreadLeg & withCallPayoffs(Rate payoff)
DigitalCmsSpreadLeg & withLongPutOption(Position::Type)
std::vector< Real > notionals_
std::vector< Spread > spreads_
std::vector< Rate > callPayoffs_
DigitalCmsSpreadLeg & withNotionals(Real notional)
Position::Type longPutOption_
std::vector< Natural > fixingDays_
DigitalCmsSpreadLeg & withFixingDays(Natural fixingDays)
DigitalCmsSpreadLeg & withLongCallOption(Position::Type)
DigitalCmsSpreadLeg & withPaymentAdjustment(BusinessDayConvention)
ext::shared_ptr< DigitalReplication > replication_
std::vector< Rate > putPayoffs_
Position::Type longCallOption_
DigitalCmsSpreadLeg & withReplication()
DigitalCmsSpreadLeg & withPaymentDayCounter(const DayCounter &)
std::vector< Real > gearings_
DayCounter paymentDayCounter_
DigitalCmsSpreadLeg(Schedule schedule, ext::shared_ptr< SwapSpreadIndex > index)
Visitor for a specific class
virtual void visit(T &)=0
Cms-spread-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