26#include <boost/make_shared.hpp>
32#include <ql/processes/blackscholesprocess.hpp>
52 virtual string keyImpl(
const Currency& forCcy,
const Currency& domCcy,
const Date& payDate,
53 const bool flipResults)
override {
54 return forCcy.code() + domCcy.code() +
ore::data::to_string(payDate) + (flipResults ?
"_1" :
"_0");
57 QuantLib::ext::shared_ptr<GeneralizedBlackScholesProcess>
59 const string pair = forCcy.code() + domCcy.code();
61 if (!timePoints.empty()) {
62 vol = Handle<BlackVolTermStructure>(
63 QuantLib::ext::make_shared<QuantExt::BlackMonotoneVarVolTermStructure>(vol, timePoints));
64 vol->enableExtrapolation();
66 return QuantLib::ext::make_shared<GeneralizedBlackScholesProcess>(
68 market_->discountCurve(forCcy.code(),
85 virtual QuantLib::ext::shared_ptr<PricingEngine>
engineImpl(
const Currency& forCcy,
const Currency& domCcy,
const Date& payDate,
86 const bool flipResults)
override {
89 engine_ =
"AnalyticDoubleBarrierBinaryEngine";
90 return QuantLib::ext::make_shared<QuantExt::AnalyticDoubleBarrierBinaryEngine>(gbsp, payDate, flipResults);
Abstract template engine builder class.
Abstract template EngineBuilder class that can cache engines and coupon pricers.
QuantLib::ext::shared_ptr< Market > market_
const string & engine() const
Return the engine name.
const string & model() const
Return the model name.
const string & configuration(const MarketContext &key)
Return a configuration (or the default one if key not found)
Analytical Engine Builder for FX Double Touch Options.
virtual QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const Currency &forCcy, const Currency &domCcy, const Date &payDate, const bool flipResults) override
FxDoubleTouchOptionAnalyticEngineBuilder()
Abstract Engine Builder for FX Double Touch Options.
virtual string keyImpl(const Currency &forCcy, const Currency &domCcy, const Date &payDate, const bool flipResults) override
QuantLib::ext::shared_ptr< GeneralizedBlackScholesProcess > getBlackScholesProcess(const Currency &forCcy, const Currency &domCcy, const std::vector< Time > &timePoints={})
FxDoubleTouchOptionEngineBuilder(const string &model, const string &engine)
std::string to_string(const LocationInfo &l)
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.
string conversion utilities