25#include <ql/termstructures/yieldtermstructure.hpp>
37 const QuantLib::Handle<QuantExt::CreditVolCurve>&
volatility);
43 const std::vector<QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>>&
probabilities,
46 const QuantLib::Handle<QuantExt::CreditVolCurve>&
volatility,
47 QuantLib::Real indexRecovery = QuantLib::Null<QuantLib::Real>());
51 const std::vector<QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>>&
probabilities()
const;
52 const std::vector<QuantLib::Real>&
recoveries()
const;
55 const QuantLib::Handle<QuantExt::CreditVolCurve>
volatility()
const;
71 QuantLib::Real
fep()
const;
74 std::vector<QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure>>
probabilities_;
Base class for index CDS option engines.
std::vector< QuantLib::Real > recoveries_
virtual void doCalc() const =0
Engine specific calculation.
IndexCdsOptionBaseEngine(const std::vector< QuantLib::Handle< QuantLib::DefaultProbabilityTermStructure > > &probabilities, const std::vector< QuantLib::Real > &recoveries, const Handle< YieldTermStructure > &discountSwapCurrency, const Handle< YieldTermStructure > &discountTradeCollateral, const QuantLib::Handle< QuantExt::CreditVolCurve > &volatility, QuantLib::Real indexRecovery=QuantLib::Null< QuantLib::Real >())
const std::vector< QuantLib::Handle< QuantLib::DefaultProbabilityTermStructure > > & probabilities() const
std::vector< QuantLib::Real > notionals_
Store the underlying index CDS notional(s) during calculation.
QuantLib::Handle< QuantLib::YieldTermStructure > discountTradeCollateral_
void calculate() const override
QuantLib::Real fep() const
Calculate the discounted value of the front end protection.
const std::vector< QuantLib::Real > & recoveries() const
const QuantLib::Handle< QuantLib::YieldTermStructure > discountTradeCollateral() const
const QuantLib::Handle< QuantExt::CreditVolCurve > volatility() const
QuantLib::Real indexRecovery_
Assumed index recovery used in the flat strike spread curve calculation if provided.
QuantLib::Handle< QuantLib::YieldTermStructure > discountSwapCurrency_
QuantLib::Handle< QuantExt::CreditVolCurve > volatility_
IndexCdsOptionBaseEngine(const QuantLib::Handle< QuantLib::DefaultProbabilityTermStructure > &probability, QuantLib::Real recovery, const Handle< YieldTermStructure > &discountSwapCurrency, const Handle< YieldTermStructure > &discountTradeCollateral, const QuantLib::Handle< QuantExt::CreditVolCurve > &volatility)
Constructor taking a default probability term structure bootstrapped from the index spreads.
const QuantLib::Handle< QuantLib::YieldTermStructure > discountSwapCurrency() const
void registerWithMarket()
Register with market data.
std::vector< QuantLib::Handle< QuantLib::DefaultProbabilityTermStructure > > probabilities_
Store inputs.
Index CDS option instrument.