19#include <ql/exercise.hpp>
20#include <ql/pricingengines/blackformula.hpp>
21#include <ql/time/calendars/nullcalendar.hpp>
24#include <boost/make_shared.hpp>
29 const Period& maturity,
const Calendar& calendar,
const Real strike,
30 const Handle<QuantExt::PriceTermStructure> priceCurve,
const Handle<Quote> volatility,
31 BlackCalibrationHelper::CalibrationErrorType errorType)
33 maturity_(maturity), calendar_(calendar), strike_(strike) {
38 const Date& exerciseDate,
const Real strike,
39 const Handle<QuantExt::PriceTermStructure> priceCurve,
const Handle<Quote> volatility,
40 BlackCalibrationHelper::CalibrationErrorType errorType)
42 exerciseDate_(exerciseDate), strike_(strike) {
55 QuantLib::ext::shared_ptr<StrikedTypePayoff> payoff(
new PlainVanillaPayoff(
type_,
effStrike_));
56 QuantLib::ext::shared_ptr<Exercise> exercise = QuantLib::ext::make_shared<EuropeanExercise>(
exerciseDate_);
57 option_ = QuantLib::ext::shared_ptr<VanillaOption>(
new VanillaOption(payoff, exercise));
58 BlackCalibrationHelper::performCalculations();
69 const Real stdDev = volatility * std::sqrt(
tau_);
QuantLib::ext::shared_ptr< PricingEngine > engine_
void performCalculations() const override
Handle< QuantExt::PriceTermStructure > priceCurve_
Real blackPrice(Real volatility) const override
Real modelValue() const override
QuantLib::ext::shared_ptr< VanillaOption > option_
FutureOptionHelper(const Period &maturity, const Calendar &calendar, const Real strike, const Handle< QuantExt::PriceTermStructure > priceCurve, const Handle< Quote > volatility, BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError)
calibration helper for Black-Scholes options