20#include <ql/termstructures/volatility/optionlet/constantoptionletvol.hpp>
23#include <boost/make_shared.hpp>
32 Handle<OptionletVolatilityStructure> ovs;
34 ovs = Handle<OptionletVolatilityStructure>(QuantLib::ext::make_shared<ConstantOptionletVolatility>(
35 0, NullCalendar(), Unadjusted, 0.0, Actual365Fixed(), Normal));
39 BlackIborCouponPricer::TimingAdjustment timingAdjustment = BlackIborCouponPricer::Black76;
40 QuantLib::ext::shared_ptr<SimpleQuote> correlation = QuantLib::ext::make_shared<SimpleQuote>(1.0);
44 if (adjStr ==
"Black76")
45 timingAdjustment = BlackIborCouponPricer::Black76;
46 else if (adjStr ==
"BivariateLognormal")
47 timingAdjustment = BlackIborCouponPricer::BivariateLognormal;
49 QL_FAIL(
"timing adjustment parameter (" << adjStr <<
") not recognised.");
53 return QuantLib::ext::make_shared<BlackIborCouponPricer>(ovs, timingAdjustment, Handle<Quote>(correlation));
builder that returns an engine to price capped floored ibor legs
QuantLib::ext::shared_ptr< FloatingRateCouponPricer > engineImpl(const string &index) override
QuantLib::ext::shared_ptr< Market > market_
map< string, string > engineParameters_
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< IborIndex > parseIborIndex(const string &s, const Handle< YieldTermStructure > &h)
Convert std::string to QuantLib::IborIndex.
bool parseBool(const string &s)
Convert text to bool.
Real parseReal(const string &s)
Convert text to Real.
Classes and functions for log message handling.
Serializable Credit Default Swap.