24#include <boost/make_shared.hpp>
29#include <ql/pricingengines/barrier/fdblackscholesbarrierengine.hpp>
30#include <ql/processes/blackscholesprocess.hpp>
52 virtual string keyImpl(
const Currency& forCcy,
const Currency& domCcy,
const Date& paymentDate)
override {
56 QuantLib::ext::shared_ptr<GeneralizedBlackScholesProcess>
58 const string pair = forCcy.code() + domCcy.code();
60 if (!timePoints.empty()) {
61 vol = Handle<BlackVolTermStructure>(
62 QuantLib::ext::make_shared<QuantExt::BlackMonotoneVarVolTermStructure>(vol, timePoints));
63 vol->enableExtrapolation();
65 return QuantLib::ext::make_shared<GeneralizedBlackScholesProcess>(
67 market_->discountCurve(forCcy.code(),
84 virtual QuantLib::ext::shared_ptr<PricingEngine>
engineImpl(
const Currency& forCcy,
const Currency& domCcy,
const Date& paymentDate)
override {
86 return QuantLib::ext::make_shared<QuantExt::AnalyticDoubleBarrierEngine>(gbsp, paymentDate);
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 Barrier Options.
virtual QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const Currency &forCcy, const Currency &domCcy, const Date &paymentDate) override
FxDoubleBarrierOptionAnalyticEngineBuilder()
Engine Builder for European FX Double Barrier Options.
FxDoubleBarrierOptionEngineBuilder(const string &model, const string &engine)
QuantLib::ext::shared_ptr< GeneralizedBlackScholesProcess > getBlackScholesProcess(const Currency &forCcy, const Currency &domCcy, const std::vector< Time > &timePoints={})
virtual string keyImpl(const Currency &forCcy, const Currency &domCcy, const Date &paymentDate) override
std::string to_string(const LocationInfo &l)
Serializable Credit Default Swap.
Map text representations to QuantLib/QuantExt types.
string conversion utilities