24#ifndef quantlib_pricers_G2_swaption_hpp
25#define quantlib_pricers_G2_swaption_hpp
27#include <ql/pricingengines/genericmodelengine.hpp>
28#include <ql/models/shortrate/twofactormodels/g2.hpp>
29#include <ql/pricingengines/swap/discountingswapengine.hpp>
52 "cash-settled swaptions not priced with G2 engine");
59 swap.setPricingEngine(ext::make_shared<DiscountingSwapEngine>(
model_->termStructure(),
false));
61 std::fabs(
swap.floatingLegBPS() /
swap.fixedLegBPS());
62 Rate fixedRate =
swap.fixedRate() - correction;
Two-additive-factor gaussian model class.
Swaption priced by means of the Black formula
void calculate() const override
G2SwaptionEngine(const ext::shared_ptr< G2 > &model, Real range, Size intervals)
Base class for some pricing engine on a particular model.
bool empty() const
checks if the contained shared pointer points to anything
Plain-vanilla swap: fix vs ibor leg.
Real Spread
spreads on interest rates
std::size_t Size
size of a container
void swap(Array &v, Array &w) noexcept