33 const ext::shared_ptr<IborIndex>& liborIndex,
37 const ext::shared_ptr<BMAIndex>& bmaIndex,
39 :
Swap(2), type_(type), nominal_(nominal),
40 liborFraction_(liborFraction), liborSpread_(liborSpread) {
60 for (
Size j=0; j<2; ++j) {
61 for (
auto& i :
legs_[j])
75 QL_FAIL(
"Unknown BMA-swap type");
117 static Spread basisPoint = 1.0e-4;
122 "result not available (null libor NPV)");
127 static Spread basisPoint = 1.0e-4;
coupon paying a weighted average of BMA-index fixings
swap paying Libor against BMA coupons
helper class building a sequence of average BMA coupons
AverageBMALeg & withPaymentDayCounter(const DayCounter &)
AverageBMALeg & withPaymentAdjustment(BusinessDayConvention)
AverageBMALeg & withNotionals(Real notional)
Real liborFraction() const
Spread fairLiborSpread() const
Rate fairLiborFraction() const
const Leg & bmaLeg() const
Type type() const
"Payer" or "Receiver" refers to the BMA leg
Spread liborSpread() const
const Leg & liborLeg() const
BMASwap(Type type, Real nominal, Schedule liborSchedule, Rate liborFraction, Rate liborSpread, const ext::shared_ptr< IborIndex > &liborIndex, const DayCounter &liborDayCount, Schedule bmaSchedule, const ext::shared_ptr< BMAIndex > &bmaIndex, const DayCounter &bmaDayCount)
helper class building a sequence of capped/floored ibor-rate coupons
IborLeg & withSpreads(Spread spread)
IborLeg & withPaymentAdjustment(BusinessDayConvention)
IborLeg & withPaymentDayCounter(const DayCounter &)
IborLeg & withNotionals(Real notional)
IborLeg & withGearings(Real gearing)
IborLeg & withFixingDays(Natural fixingDays)
Real NPV() const
returns the net present value of the instrument.
void calculate() const override
template class providing a null value for a given type.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
BusinessDayConvention businessDayConvention() const
std::vector< Real > legNPV_
std::vector< Real > legBPS_
std::vector< Real > payer_
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
#define QL_FAIL(message)
throw an error (possibly with file and line information)
BusinessDayConvention
Business Day conventions.
Real Spread
spreads on interest rates
std::size_t Size
size of a container
Coupon paying a Libor-type index.
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.