24#ifndef quantlib_pricers_G2_swaption_hpp
25#define quantlib_pricers_G2_swaption_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
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Two-factor additive Gaussian Model G2++.
Generic option engine based on a model.
Real Spread
spreads on interest rates
std::size_t Size
size of a container
void swap(Array &v, Array &w) noexcept