24#include <boost/make_shared.hpp>
29#include <ql/pricingengines//barrier/analyticdoublebarrierengine.hpp>
30#include <ql/pricingengines/barrier/fdblackscholesbarrierengine.hpp>
31#include <ql/processes/blackscholesprocess.hpp>
51 virtual string keyImpl(
const string& assetName,
const Currency& ccy,
const Date& expiryDate)
override {
55 QuantLib::ext::shared_ptr<GeneralizedBlackScholesProcess>
getBlackScholesProcess(
const string& assetName,
const Currency& ccy,
56 const std::vector<Time>& timePoints = {}) {
59 if (!timePoints.empty()) {
60 vol = Handle<BlackVolTermStructure>(
61 QuantLib::ext::make_shared<QuantExt::BlackMonotoneVarVolTermStructure>(vol, timePoints));
62 vol->enableExtrapolation();
64 return QuantLib::ext::make_shared<GeneralizedBlackScholesProcess>(
80 virtual QuantLib::ext::shared_ptr<PricingEngine>
engineImpl(
const string& assetName,
const Currency& ccy,
const Date& expiryDate)
override {
82 return QuantLib::ext::make_shared<QuantLib::AnalyticDoubleBarrierEngine>(gbsp);
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)
virtual QuantLib::ext::shared_ptr< PricingEngine > engineImpl(const string &assetName, const Currency &ccy, const Date &expiryDate) override
EquityDoubleBarrierOptionAnalyticEngineBuilder()
Engine Builder for Equity Double Barrier Options.
virtual string keyImpl(const string &assetName, const Currency &ccy, const Date &expiryDate) override
QuantLib::ext::shared_ptr< GeneralizedBlackScholesProcess > getBlackScholesProcess(const string &assetName, const Currency &ccy, const std::vector< Time > &timePoints={})
EquityDoubleBarrierOptionEngineBuilder(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