42#ifndef quantext_lognormal_cmsspread_pricer_hpp
43#define quantext_lognormal_cmsspread_pricer_hpp
45#include <ql/cashflows/cmscoupon.hpp>
46#include <ql/experimental/coupons/cmsspreadcoupon.hpp>
47#include <ql/experimental/coupons/swapspreadindex.hpp>
48#include <ql/math/distributions/normaldistribution.hpp>
49#include <ql/math/integrals/gaussianquadratures.hpp>
56class YieldTermStructure;
66 const Handle<CorrelationTermStructure>&
correlation = Handle<CorrelationTermStructure>())
68 "CmsSpreadPricer2 doesn't support 'correlation()', instead use 'correlation(Time, Strike)'"))),
109 const Handle<QuantExt::CorrelationTermStructure>&
correlation,
110 const Handle<YieldTermStructure>& couponDiscountCurve = Handle<YieldTermStructure>(),
111 const Size IntegrationPoints = 16,
112 const boost::optional<VolatilityType> volatilityType = boost::none,
113 const Real shift1 = Null<Real>(),
const Real shift2 = Null<Real>());
118 virtual Real
capletPrice(Rate effectiveCap)
const override;
119 virtual Rate
capletRate(Rate effectiveCap)
const override;
120 virtual Real
floorletPrice(Rate effectiveFloor)
const override;
121 virtual Rate
floorletRate(Rate effectiveFloor)
const override;
148 QuantLib::ext::shared_ptr<SwapSpreadIndex>
index_;
150 QuantLib::ext::shared_ptr<CumulativeNormalDistribution>
cnd_;
166 QuantLib::ext::shared_ptr<CmsCoupon>
c1_,
c2_;
base pricer for vanilla CMS spread coupons with a correlation surface
CmsSpreadCouponPricer2(const Handle< CorrelationTermStructure > &correlation=Handle< CorrelationTermStructure >())
Real correlation(Time t, Real strike=1) const
Handle< CorrelationTermStructure > correlationCurve_
void setCorrelationCurve(const Handle< CorrelationTermStructure > &correlation=Handle< CorrelationTermStructure >())
A dummy quote class that throws an exception when value is called.
CMS spread - coupon pricer.
virtual Real capletPrice(Rate effectiveCap) const override
virtual Rate floorletRate(Rate effectiveFloor) const override
QuantLib::ext::shared_ptr< CmsCoupon > c1_
void initialize(const FloatingRateCoupon &coupon) override
QuantLib::ext::shared_ptr< GaussianQuadrature > integrator_
Real integrand_normal(const Real) const
QuantLib::ext::shared_ptr< CmsCoupon > c2_
QuantLib::ext::shared_ptr< CmsCouponPricer > cmsPricer_
bool inheritedVolatilityType_
QuantLib::ext::shared_ptr< SwapSpreadIndex > index_
QuantLib::ext::shared_ptr< CumulativeNormalDistribution > cnd_
Handle< YieldTermStructure > couponDiscountCurve_
const CmsSpreadCoupon * coupon_
virtual Rate swapletRate() const override
virtual Real floorletPrice(Rate effectiveFloor) const override
virtual Real swapletPrice() const override
Real integrand(const Real) const
Real optionletPrice(Option::Type optionType, Real strike) const
virtual Rate capletRate(Rate effectiveCap) const override
Term structure of correlations.
throws exception when called