22#include <ql/pricingengines/capfloor/bacheliercapfloorengine.hpp>
23#include <ql/pricingengines/capfloor/blackcapfloorengine.hpp>
25#include <boost/make_shared.hpp>
35 switch (ovs->volatilityType()) {
36 case ShiftedLognormal:
37 LOG(
"Build BlackCapFloorEngine for index " << index);
38 return QuantLib::ext::make_shared<BlackCapFloorEngine>(yts, ovs, ovs->displacement());
41 LOG(
"Build BachelierCapFloorEngine for index " << index);
42 return QuantLib::ext::make_shared<BachelierCapFloorEngine>(yts, ovs);
45 QL_FAIL(
"Caplet volatility type, " << ovs->volatilityType() <<
", not covered in EngineFactory");
builder that returns an engine to price a cap or floor on IBOR instrument
QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const std::string &index) override
QuantLib::ext::shared_ptr< Market > market_
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.
Classes and functions for log message handling.
#define LOG(text)
Logging Macro (Level = Notice)
Serializable Credit Default Swap.