25#ifndef quantlib_conundrum_pricer_hpp
26#define quantlib_conundrum_pricer_hpp
34 class YieldTermStructure;
42 Real deflator)
const = 0;
51 const ext::shared_ptr<SwaptionVolatilityStructure>&
61 ext::shared_ptr<SmileSection>
smile_;
67 [[deprecated(
"Renamed to MarketQuotedOptionPricer")]]
88 static ext::shared_ptr<GFunction>
92 static ext::shared_ptr<GFunction>
94 static ext::shared_ptr<GFunction>
187 return out <<
"Standard";
189 return out <<
"ExactYield";
191 return out <<
"ParallelShifts";
193 return out <<
"NonParallelShifts";
195 QL_FAIL(
"unknown option type");
228 Real strike)
const = 0;
261 Real precision = 1.0e-6,
279 const ext::shared_ptr<YieldTermStructure>& rateCurve,
280 ext::shared_ptr<GFunction> gFunction,
Real optionletPrice(Option::Type optionType, Real strike) const override
Real swapletPrice() const override
base pricer for vanilla CMS coupons
base floating-rate coupon class
Real firstDerivative(Real x) override
Real operator()(Real x) override
std::vector< Time > accruals_
Real secondDerivative(Real x) override
Real firstDerivative(Real x) override
Real operator()(Real x) override
GFunctionStandard(Size q, Real delta, Size swapLength)
Real secondDerivative(Real x) override
virtual Real operator()(const Real &x) const
void setSwapRateValue(Real x)
const GFunctionWithShifts & gFunctionWithShifts() const
virtual ~ObjectiveFunction()=default
const GFunctionWithShifts & o_
Real derivative(const Real &x) const
ObjectiveFunction(const GFunctionWithShifts &o, const Real Rs)
Handle< Quote > meanReversion_
Real firstDerivative(Real x) override
Real operator()(Real x) override
std::vector< Time > accruals_
Real shapeOfShift(Real s) const
Real der2Rs_derX2(Real x)
std::vector< Time > shapedSwapPaymentTimes_
ext::shared_ptr< ObjectiveFunction > objectiveFunction_
Real secondDerivative(Real x) override
Real calibrationOfShift(Real Rs)
std::vector< Real > swapPaymentDiscounts_
static ext::shared_ptr< GFunction > newGFunctionExactYield(const CmsCoupon &coupon)
GFunctionFactory()=delete
static ext::shared_ptr< GFunction > newGFunctionStandard(Size q, Real delta, Size swapLength)
static ext::shared_ptr< GFunction > newGFunctionWithShifts(const CmsCoupon &coupon, const Handle< Quote > &meanReversion)
virtual ~GFunction()=default
virtual Real operator()(Real x)=0
virtual Real secondDerivative(Real x)=0
virtual Real firstDerivative(Real x)=0
ext::shared_ptr< GFunction > gFunction_
const CmsCoupon * coupon_
void setMeanReversion(const Handle< Quote > &meanReversion) override
Real capletPrice(Rate effectiveCap) const override
Rate floorletRate(Rate effectiveFloor) const override
Handle< Quote > meanReversion_
void initialize(const FloatingRateCoupon &coupon) override
virtual Real optionletPrice(Option::Type optionType, Real strike) const =0
ext::shared_ptr< VanillaOptionPricer > vanillaOptionPricer_
GFunctionFactory::YieldCurveModel modelOfYieldCurve_
ext::shared_ptr< YieldTermStructure > rateCurve_
Real swapletPrice() const override=0
Rate swapletRate() const override
Real floorletPrice(Rate effectiveFloor) const override
Real meanReversion() const override
Rate capletRate(Rate effectiveCap) const override
Shared handle to an observable.
ext::shared_ptr< SwaptionVolatilityStructure > volatilityStructure_
ext::shared_ptr< SmileSection > smile_
Real operator()(Real strike, Option::Type optionType, Real deflator) const override
ext::shared_ptr< GFunction > gFunction_
Real functionF(Real x) const
void setStrike(Real strike)
Real firstDerivativeOfF(Real x) const
const Option::Type optionType_
Real operator()(Real x) const override
Real secondDerivativeOfF(Real x) const
const ext::shared_ptr< VanillaOptionPricer > vanillaOptionPricer_
virtual Real operator()(Real x) const =0
virtual ~Function()=default
Real optionletPrice(Option::Type optionType, Rate strike) const override
Real resetLowerLimit(Real stdDeviationsForLowerLimit) const
Real stdDeviations() const
const Real hardUpperLimit_
const Real requiredStdDeviations_
const Real refiningIntegrationTolerance_
Real stdDeviationsForUpperLimit_
Real resetUpperLimit(Real stdDeviationsForUpperLimit) const
Real integrate(Real a, Real b, const ConundrumIntegrand &Integrand) const
Real stdDeviationsForLowerLimit_
Real swapletPrice() const override
Real refineIntegration(Real integralValue, const ConundrumIntegrand &integrand) const
Size unregisterWith(const ext::shared_ptr< Observable > &)
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
virtual ~VanillaOptionPricer()=default
virtual Real operator()(Real strike, Option::Type optionType, Real deflator) const =0
#define QL_FAIL(message)
throw an error (possibly with file and line information)
ext::function< Real(Real)> b
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
Real Spread
spreads on interest rates
std::size_t Size
size of a container
MarketQuotedOptionPricer BlackVanillaOptionPricer
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
Payoffs for various options.
ext::shared_ptr< YieldTermStructure > q