35#include <ql/pricingengines/blackformula.hpp>
36#include <ql/termstructures/volatility/inflation/yoyinflationoptionletvolatilitystructure.hpp>
42 const Handle<YieldTermStructure>& nominalTermStructure)
43 : nominalTermStructure_(std::move(nominalTermStructure)) {
48 const Handle<YoYOptionletVolatilitySurface>& capletVol,
const Handle<YieldTermStructure>& nominalTermStructure)
49 : capletVol_(capletVol), nominalTermStructure_(nominalTermStructure) {
55 QL_REQUIRE(!capletVol.empty(),
"empty capletVol handle");
79 QL_FAIL(
"you must implement this to get a vol-dependent price");
83 QL_REQUIRE(
discount_ != Null<Real>(),
"no nominal term structure provided");
89 if (fixingDate <= Settings::instance().evaluationDate()) {
92 if (optionType == Option::Call) {
99 return std::max(a - b, 0.0);
103 Real stdDev = std::sqrt(
capletVolatility()->totalVariance(fixingDate, effStrike));
110 if (fixing == Null<Rate>())
119 QL_REQUIRE(
coupon_,
"year-on-year inflation coupon needed");
122 paymentDate_ =
coupon_->date();
139 QL_REQUIRE(
discount_ != Null<Real>(),
"no nominal term structure provided");
158 return blackFormula(optionType, effStrike, forward, stdDev);
162 Real forward, Real stdDev)
const {
164 return blackFormula(optionType, effStrike + 1.0, forward + 1.0, stdDev);
168 Real forward, Real stdDev)
const {
169 return bachelierBlackFormula(optionType, effStrike, forward, stdDev);
Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const override
Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const override
Real optionletPriceImp(Option::Type, Real strike, Real forward, Real stdDev) const override
Coupon paying a YoY-inflation type index
virtual Rate indexFixing() const override
Real gearing() const
index gearing, i.e. multiplicative coefficient for the index
Spread spread() const
spread paid over the fixing of the underlying index
virtual Date fixingDate() const override
virtual void initialize(const InflationCoupon &) override
virtual Real capletPrice(Rate effectiveCap) const override
virtual Rate floorletRate(Rate effectiveFloor) const override
NonStandardYoYInflationCouponPricer(const Handle< YieldTermStructure > &nominalTermStructure)
virtual Rate adjustedFixing(Rate fixing=Null< Rate >()) const
Handle< YieldTermStructure > nominalTermStructure_
virtual Real optionletPrice(Option::Type optionType, Real effStrike) const
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
virtual Rate swapletRate() const override
virtual Real floorletPrice(Rate effectiveFloor) const override
virtual Real swapletPrice() const override
virtual void setCapletVolatility(const Handle< YoYOptionletVolatilitySurface > &capletVol)
Handle< YoYOptionletVolatilitySurface > capletVol_
data
virtual Rate capletRate(Rate effectiveCap) const override
const NonStandardYoYInflationCoupon * coupon_
pricer for the generalized (nonstandard) yoy coupon the payoff of the coupon is: N * (alpha * I_t/I_s...