29#include <ql/termstructures/volatility/swaption/swaptionconstantvol.hpp>
36QuantLib::ext::shared_ptr<FloatingRateCouponPricer>
38 std::string ccy = key;
39 QuantLib::ext::shared_ptr<IborIndex> index;
41 ccy = index->currency().code();
44 Handle<Quote> reversionQuote(QuantLib::ext::make_shared<SimpleQuote>(reversion));
45 Handle<SwaptionVolatilityStructure> vol;
47 vol = Handle<SwaptionVolatilityStructure>(QuantLib::ext::make_shared<ConstantSwaptionVolatility>(
48 0, NullCalendar(), Unadjusted, 0.0, Actual365Fixed(), Normal));
53 string lowerBoundStr =
54 (vol->volatilityType() == ShiftedLognormal) ?
"LowerRateBoundLogNormal" :
"LowerRateBoundNormal";
55 string upperBoundStr =
56 (vol->volatilityType() == ShiftedLognormal) ?
"UpperRateBoundLogNormal" :
"UpperRateBoundNormal";
61 return QuantLib::ext::make_shared<DurationAdjustedCmsCouponTsrPricer>(
62 vol, QuantLib::ext::make_shared<LinearAnnuityMappingBuilder>(reversionQuote), lower, upper);
QuantLib::ext::shared_ptr< Market > market_
std::string engineParameter(const std::string &p, const std::vector< std::string > &qualifiers={}, const bool mandatory=true, const std::string &defaultValue="") const
const string & configuration(const MarketContext &key)
Return a configuration (or the default one if key not found)
QuantLib::ext::shared_ptr< FloatingRateCouponPricer > engineImpl(const string &key) override
coupon pricer builder for duration adjusted cms coupons
bool tryParseIborIndex(const string &s, QuantLib::ext::shared_ptr< IborIndex > &index)
Try to convert std::string to QuantLib::IborIndex.
bool parseBool(const string &s)
Convert text to bool.
Real parseReal(const string &s)
Convert text to Real.
Serializable Credit Default Swap.