#include <qle/pricingengines/midpointindexcdsengine.hpp>
|
| MidPointIndexCdsEngine (const Handle< DefaultProbabilityTermStructure > &, Real recoveryRate, const Handle< YieldTermStructure > &discountCurve, boost::optional< bool > includeSettlementDateFlows=boost::none) |
|
| MidPointIndexCdsEngine (const std::vector< Handle< DefaultProbabilityTermStructure > > &, const std::vector< Real > &underlyingRecoveryRate, const Handle< YieldTermStructure > &discountCurve, boost::optional< bool > includeSettlementDateFlows=boost::none) |
|
void | calculate () const override |
|
Definition at line 33 of file midpointindexcdsengine.hpp.
◆ MidPointIndexCdsEngine() [1/2]
MidPointIndexCdsEngine |
( |
const Handle< DefaultProbabilityTermStructure > & |
probability, |
|
|
Real |
recoveryRate, |
|
|
const Handle< YieldTermStructure > & |
discountCurve, |
|
|
boost::optional< bool > |
includeSettlementDateFlows = boost::none |
|
) |
| |
Definition at line 25 of file midpointindexcdsengine.cpp.
30 registerWith(discountCurve_);
32}
Handle< DefaultProbabilityTermStructure > probability_
const bool useUnderlyingCurves_
◆ MidPointIndexCdsEngine() [2/2]
MidPointIndexCdsEngine |
( |
const std::vector< Handle< DefaultProbabilityTermStructure > > & |
underlyingProbability, |
|
|
const std::vector< Real > & |
underlyingRecoveryRate, |
|
|
const Handle< YieldTermStructure > & |
discountCurve, |
|
|
boost::optional< bool > |
includeSettlementDateFlows = boost::none |
|
) |
| |
Definition at line 34 of file midpointindexcdsengine.cpp.
40 registerWith(discountCurve_);
43}
const std::vector< Handle< DefaultProbabilityTermStructure > > underlyingProbability_
const std::vector< Real > underlyingRecoveryRate_
◆ calculate()
Definition at line 81 of file midpointindexcdsengine.cpp.
81 {
82 QL_REQUIRE(!discountCurve_.empty(), "no discount term structure set");
83 Date refDate;
86 "number of underlyings (" <<
arguments_.underlyingNotionals.size()
88 << ")");
92 } else {
93 QL_REQUIRE(!
probability_.empty(),
"no probability term structure set");
95 }
96
98}
const Instrument::results * results_
Swap::arguments * arguments_
◆ survivalProbability()
Real survivalProbability |
( |
const Date & |
d | ) |
const |
|
overrideprivate |
Definition at line 45 of file midpointindexcdsengine.cpp.
45 {
48 Real
sum = 0.0, sumNotional = 0.0;
51 sumNotional +=
arguments_.underlyingNotionals[i];
52 }
53 return sum / sumNotional;
54}
Real sum(const Cash &c, const Cash &d)
◆ defaultProbability()
Real defaultProbability |
( |
const Date & |
d1, |
|
|
const Date & |
d2 |
|
) |
| const |
|
overrideprivate |
◆ expectedLoss()
Real expectedLoss |
( |
const Date & |
defaultDate, |
|
|
const Date & |
d1, |
|
|
const Date & |
d2, |
|
|
const Real |
notional |
|
) |
| const |
|
overrideprivate |
◆ probability_
Handle<DefaultProbabilityTermStructure> probability_ |
|
private |
◆ recoveryRate_
◆ underlyingProbability_
const std::vector<Handle<DefaultProbabilityTermStructure> > underlyingProbability_ |
|
private |
◆ underlyingRecoveryRate_
const std::vector<Real> underlyingRecoveryRate_ |
|
private |
◆ useUnderlyingCurves_
const bool useUnderlyingCurves_ |
|
private |