34 : probability_(
std::move(probability)), recoveryRate_(recoveryRate),
35 termStructure_(
std::move(termStructure)), volatility_(
std::move(volatility)) {
47 "Underlying CDS should start after option maturity");
69 stdDev, riskyAnnuity);
73 Real frontEndProtection =
78 results_.value += frontEndProtection;
Black credit default swap option engine.
Handle< Quote > volatility()
Handle< Quote > volatility_
BlackCdsOptionEngine(Handle< DefaultProbabilityTermStructure >, Real recoveryRate, Handle< YieldTermStructure > termStructure, Handle< Quote > vol)
Handle< DefaultProbabilityTermStructure > probability_
void calculate() const override
Handle< YieldTermStructure > termStructure_
Handle< YieldTermStructure > termStructure()
ext::shared_ptr< CreditDefaultSwap > swap
Time yearFraction(const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
CdsOption::results results_
CdsOption::arguments arguments_
Shared handle to an observable.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
ext::shared_ptr< Exercise > exercise
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Option exercise classes and payoff function.
Real Time
continuous quantity with 1-year units
QL_INTEGER Integer
integer number
Real blackFormula(Option::Type optionType, Real strike, Real forward, Real stdDev, Real discount, Real displacement)
purely virtual base class for market observables
Interest-rate term structure.