#include <qle/pricingengines/indexcdsoptionbaseengine.hpp>
◆ IndexCdsOptionBaseEngine() [1/2]
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.
◆ IndexCdsOptionBaseEngine() [2/2]
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 >() |
|
) |
| |
Constructor taking a vector of default probability term structures bootstrapped from the index constituent spread curves and a vector of associated recovery rates.
◆ probabilities()
const vector< Handle< DefaultProbabilityTermStructure > > & probabilities |
( |
| ) |
const |
Definition at line 69 of file indexcdsoptionbaseengine.cpp.
69 {
71}
std::vector< QuantLib::Handle< QuantLib::DefaultProbabilityTermStructure > > probabilities_
Store inputs.
◆ recoveries()
const vector< Real > & recoveries |
( |
| ) |
const |
◆ discountSwapCurrency()
const Handle< YieldTermStructure > discountSwapCurrency |
( |
| ) |
const |
◆ discountTradeCollateral()
const Handle< YieldTermStructure > discountTradeCollateral |
( |
| ) |
const |
◆ volatility()
◆ calculate()
Definition at line 85 of file indexcdsoptionbaseengine.cpp.
85 {
86
87
89
90
95 <<
") and notionals (" <<
notionals_.size() <<
").");
96 } else {
98 }
99
100
101 cds.NPV();
102 results_.additionalResults = cds.additionalResults();
103
104
106}
const Instrument::results * results_
virtual void doCalc() const =0
Engine specific calculation.
std::vector< QuantLib::Real > notionals_
Store the underlying index CDS notional(s) during calculation.
Swap::arguments * arguments_
◆ doCalc()
virtual void doCalc |
( |
| ) |
const |
|
protectedpure virtual |
◆ registerWithMarket()
void registerWithMarket |
( |
| ) |
|
|
protected |
◆ fep()
Calculate the discounted value of the front end protection.
Definition at line 108 of file indexcdsoptionbaseengine.cpp.
108 {
109
110
111 const Date& exerciseDate =
arguments_.exercise->dates().front();
112
113
115
116
120 }
122
123
126
127
130
132}
QuantLib::Real fep() const
Calculate the discounted value of the front end protection.
◆ probabilities_
std::vector<QuantLib::Handle<QuantLib::DefaultProbabilityTermStructure> > probabilities_ |
|
protected |
◆ recoveries_
std::vector<QuantLib::Real> recoveries_ |
|
protected |
◆ discountSwapCurrency_
QuantLib::Handle<QuantLib::YieldTermStructure> discountSwapCurrency_ |
|
protected |
◆ discountTradeCollateral_
QuantLib::Handle<QuantLib::YieldTermStructure> discountTradeCollateral_ |
|
protected |
◆ volatility_
◆ indexRecovery_
QuantLib::Real indexRecovery_ |
|
protected |
◆ notionals_
std::vector<QuantLib::Real> notionals_ |
|
mutableprotected |