Logo
Reference manual - version qle_version
Public Member Functions | List of all members
DiscountingRiskyBondEngineMultiState Class Reference

#include <qle/pricingengines/discountingriskybondenginemultistate.hpp>

+ Inheritance diagram for DiscountingRiskyBondEngineMultiState:

Public Member Functions

 DiscountingRiskyBondEngineMultiState (const Handle< YieldTermStructure > &discountCurve, const std::vector< Handle< DefaultProbabilityTermStructure >> &defaultCurves, const std::vector< Handle< Quote >> &recoveryRates, const Size mainResultState, const Handle< Quote > &securitySpread, Period timestepPeriod, const boost::optional< bool > includeSettlementDateFlows=boost::none)
 
void calculate () const
 
Real calculateNpv (const Size state) const
 
Real calculateDefaultValue () const
 
Handle< YieldTermStructure > discountCurve () const
 
const std::vector< Handle< DefaultProbabilityTermStructure > > & defaultCurves () const
 
const std::vector< Handle< Quote > > & recoveryRates () const
 
Handle< Quote > securitySpread () const
 
- Public Member Functions inherited from DiscountingRiskyBondEngine
 DiscountingRiskyBondEngine (const Handle< YieldTermStructure > &discountCurve, const Handle< DefaultProbabilityTermStructure > &defaultCurve, const Handle< Quote > &recoveryRate, const Handle< Quote > &securitySpread, Period timestepPeriod, boost::optional< bool > includeSettlementDateFlows=boost::none)
 
 DiscountingRiskyBondEngine (const Handle< YieldTermStructure > &discountCurve, const Handle< Quote > &securitySpread, Period timestepPeriod, boost::optional< bool > includeSettlementDateFlows=boost::none)
 alternative constructor (does not require default curve or recovery rate)
 
void calculate () const override
 
BondNPVCalculationResults calculateNpv (const Date &npvDate, const Date &settlementDate, const Leg &cashflows, boost::optional< bool > includeSettlementDateFlows=boost::none, const Handle< YieldTermStructure > &incomeCurve=Handle< YieldTermStructure >(), const bool conditionalOnSurvival=true, const bool additionalResults=true) const
 
Handle< YieldTermStructure > discountCurve () const
 
Handle< DefaultProbabilityTermStructure > defaultCurve () const
 
Handle< Quote > recoveryRate () const
 
Handle< Quote > securitySpread () const
 

Additional Inherited Members

- Protected Attributes inherited from DiscountingRiskyBondEngine
Handle< YieldTermStructure > discountCurve_
 
Handle< DefaultProbabilityTermStructure > defaultCurve_
 
Handle< Quote > recoveryRate_
 
Handle< Quote > securitySpread_
 
Period timestepPeriod_
 
boost::optional< bool > includeSettlementDateFlows_
 

Detailed Description

The engine takes a vector of default curves and recovery rates. For the given main result state it will produce the same results as the MidPointCdsEngine. In addition a result with label "stateNPV" is produced containing the NPV for each given default curve / recovery rate and an additional entry with a default value w.r.t. the last given recovery rate in the vector.