28 const ext::shared_ptr<InflationCouponPricer>& p) {
29 for (
const auto& i : leg) {
30 ext::shared_ptr<InflationCoupon> c = ext::dynamic_pointer_cast<InflationCoupon>(i);
39 : nominalTermStructure_(
std::move(nominalTermStructure)) {
46 : capletVol_(
std::move(capletVol)), nominalTermStructure_(
std::move(nominalTermStructure)) {
85 QL_FAIL(
"you must implement this to get a vol-dependent price");
90 Real effStrike)
const {
97 Real effStrike)
const {
109 return std::max(a -
b, 0.0);
Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const override
Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const override
Date date() const override
Time accrualPeriod() const
accrual period as fraction of year
Shared handle to an observable.
bool empty() const
checks if the contained shared pointer points to anything
Base inflation-coupon class.
virtual Date fixingDate() const
fixing date
virtual Rate indexFixing() const
fixing of the underlying index, as observed by the coupon
template class providing a null value for a given type.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const override
Coupon paying a YoY-inflation type index
Real gearing() const
index gearing, i.e. multiplicative coefficient for the index
Spread spread() const
spread paid over the fixing of the underlying index
void initialize(const InflationCoupon &) override
Real capletPrice(Rate effectiveCap) const override
Rate floorletRate(Rate effectiveFloor) const override
virtual Rate adjustedFixing(Rate fixing=Null< Rate >()) const
Handle< YieldTermStructure > nominalTermStructure_
virtual Real optionletPrice(Option::Type optionType, Real effStrike) const
const YoYInflationCoupon * coupon_
virtual Handle< YoYOptionletVolatilitySurface > capletVolatility() const
virtual Real optionletRate(Option::Type optionType, Real effStrike) const
virtual Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const
YoYInflationCouponPricer()=default
Rate swapletRate() const override
Real floorletPrice(Rate effectiveFloor) const override
Real swapletPrice() const override
virtual void setCapletVolatility(const Handle< YoYOptionletVolatilitySurface > &capletVol)
Handle< YoYOptionletVolatilitySurface > capletVol_
data
Rate capletRate(Rate effectiveCap) const override
#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)
ext::function< Real(Real)> b
Real bachelierBlackFormula(Option::Type optionType, Real strike, Real forward, Real stdDev, Real discount)
void setCouponPricer(const Leg &leg, const ext::shared_ptr< FloatingRateCouponPricer > &pricer)
Real blackFormula(Option::Type optionType, Real strike, Real forward, Real stdDev, Real discount, Real displacement)
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
yoy inflation volatility structures