29 const ext::shared_ptr<IborCoupon>& 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 DigitalIborLeg::operator
Leg()
const {
199 return FloatingDigitalLeg<IborIndex, IborCoupon, DigitalIborCoupon>(
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
DigitalIborCoupon(const ext::shared_ptr< IborCoupon > &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)
void accept(AcyclicVisitor &) override
helper class building a sequence of digital ibor-rate coupons
BusinessDayConvention paymentAdjustment_
DigitalIborLeg & withNakedOption(bool nakedOption=true)
std::vector< Rate > putStrikes_
DigitalIborLeg & withPaymentDayCounter(const DayCounter &)
DigitalIborLeg & withGearings(Real gearing)
DigitalIborLeg & withPutStrikes(Rate strike)
DigitalIborLeg(Schedule schedule, ext::shared_ptr< IborIndex > index)
std::vector< Rate > callStrikes_
DigitalIborLeg & withSpreads(Spread spread)
std::vector< Real > notionals_
std::vector< Spread > spreads_
std::vector< Rate > callPayoffs_
DigitalIborLeg & withFixingDays(Natural fixingDays)
DigitalIborLeg & withReplication()
DigitalIborLeg & inArrears(bool flag=true)
DigitalIborLeg & withCallATM(bool flag=true)
DigitalIborLeg & withLongPutOption(Position::Type)
DigitalIborLeg & withCallStrikes(Rate strike)
Position::Type longPutOption_
DigitalIborLeg & withPutATM(bool flag=true)
std::vector< Natural > fixingDays_
DigitalIborLeg & withPutPayoffs(Rate payoff)
ext::shared_ptr< DigitalReplication > replication_
std::vector< Rate > putPayoffs_
DigitalIborLeg & withCallPayoffs(Rate payoff)
DigitalIborLeg & withNotionals(Real notional)
Position::Type longCallOption_
std::vector< Real > gearings_
DigitalIborLeg & withLongCallOption(Position::Type)
DigitalIborLeg & withPaymentAdjustment(BusinessDayConvention)
DayCounter paymentDayCounter_
Visitor for a specific class
virtual void visit(T &)=0
Ibor-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