63 const ext::shared_ptr<IborIndex>& iborIndex,
65 const ext::shared_ptr<NotionalRisk>& notionalRisk,
68 const std::vector<Real>& gearings,
69 const std::vector<Spread>& spreads,
70 const std::vector<Rate>& caps,
71 const std::vector<Rate>& floors,
100 const Date& startDate,
101 const Date& maturityDate,
104 const ext::shared_ptr<IborIndex>& iborIndex,
106 const ext::shared_ptr<NotionalRisk>& notionalRisk,
110 const std::vector<Real>& gearings,
111 const std::vector<Spread>& spreads,
112 const std::vector<Rate>& caps,
113 const std::vector<Rate>& floors,
116 const Date& issueDate,
117 const Date& stubDate,
120 :
CatBond(settlementDays, calendar, issueDate, notionalRisk) {
124 Date firstDate, nextToLastDate;
128 nextToLastDate = stubDate;
131 firstDate = stubDate;
132 nextToLastDate =
Date();
138 QL_FAIL(
"stub date (" << stubDate <<
") not allowed with " <<
139 rule <<
" DateGeneration::Rule");
141 QL_FAIL(
"unknown DateGeneration::Rule (" <<
Integer(rule) <<
")");
145 calendar_, accrualConvention, accrualConvention,
147 firstDate, nextToLastDate);
Cash flow vector builders.
void validate() const override
void setupArguments(PricingEngine::arguments *) const override
Natural settlementDays() const
void addRedemptionsToCashflows(const std::vector< Real > &redemptions=std::vector< Real >())
const Calendar & calendar() const
const Leg & cashflows() const
const ext::shared_ptr< CashFlow > & redemption() const
Date maturityDate() const
void fetchResults(const PricingEngine::results *) const override
ext::shared_ptr< NotionalRisk > notionalRisk
void validate() const override
results for a cat bond calculation
Real exhaustionProbability
void setupArguments(PricingEngine::arguments *) const override
ext::shared_ptr< NotionalRisk > notionalRisk_
Real exhaustionProbability_
void fetchResults(const PricingEngine::results *) const override
FloatingCatBond(Natural settlementDays, Real faceAmount, Schedule schedule, const ext::shared_ptr< IborIndex > &iborIndex, const DayCounter &accrualDayCounter, const ext::shared_ptr< NotionalRisk > ¬ionalRisk, BusinessDayConvention paymentConvention=Following, Natural fixingDays=Null< Natural >(), const std::vector< Real > &gearings=std::vector< Real >(1, 1.0), const std::vector< Spread > &spreads=std::vector< Spread >(1, 0.0), const std::vector< Rate > &caps=std::vector< Rate >(), const std::vector< Rate > &floors=std::vector< Rate >(), bool inArrears=false, Real redemption=100.0, const Date &issueDate=Date())
helper class building a sequence of capped/floored ibor-rate coupons
IborLeg & withSpreads(Spread spread)
IborLeg & withPaymentAdjustment(BusinessDayConvention)
IborLeg & withPaymentDayCounter(const DayCounter &)
IborLeg & inArrears(bool flag=true)
IborLeg & withFloors(Rate floor)
IborLeg & withNotionals(Real notional)
IborLeg & withGearings(Real gearing)
IborLeg & withCaps(Rate cap)
IborLeg & withFixingDays(Natural fixingDays)
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
const Date & endDate() const
#define QL_ENSURE(condition, message)
throw an error if the given post-condition is not verified
#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)
Frequency
Frequency of events.
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
QL_INTEGER Integer
integer number
Coupon paying a Libor-type index.
Pair of loss time and amount, sortable by loss time.
ext::shared_ptr< YieldTermStructure > r
global repository for run-time library settings