23#ifndef quantext_synthetic_cdo_hpp
24#define quantext_synthetic_cdo_hpp
26#include <ql/qldefines.hpp>
28#ifndef QL_PATCH_SOLARIS
30#include <ql/default.hpp>
31#include <ql/instrument.hpp>
32#include <ql/time/schedule.hpp>
35#include <ql/cashflows/fixedratecoupon.hpp>
36#include <ql/termstructures/yieldtermstructure.hpp>
37#include <ql/instruments/creditdefaultswap.hpp>
123 SyntheticCDO(
const QuantLib::ext::shared_ptr<QuantExt::Basket>&
basket, Protection::Side side,
const Schedule& schedule,
124 Rate upfrontRate, Rate runningRate,
const DayCounter& dayCounter,
125 BusinessDayConvention paymentConvention,
bool settlesAccrual =
true,
126 const QuantLib::CreditDefaultSwap::ProtectionPaymentTime protectionPaymentTime =
127 QuantLib::CreditDefaultSwap::ProtectionPaymentTime::atDefault,
128 Date protectionStart = Date(), Date upfrontDate = Date(),
129 boost::optional<Real> notional = boost::none,
131 const DayCounter& lastPeriodDayCounter = DayCounter());
134 const QuantLib::ext::shared_ptr<QuantExt::Basket>&
basket()
const {
return basket_; }
155 return QuantLib::ext::dynamic_pointer_cast<FixedRateCoupon>(
normalizedLeg_.back())->accrualEndDate();
161 Real
implicitCorrelation(
const std::vector<Real>& recoveries,
const Handle<YieldTermStructure>& discountCurve,
162 Real targetNPV = 0., Real accuracy = 1.0e-3)
const;
171 void fetchResults(
const PricingEngine::results*)
const override;
177 QuantLib::ext::shared_ptr<QuantExt::Basket>
basket_;
207 QuantLib::ext::shared_ptr<QuantExt::Basket>
basket;
226 void reset()
override;
basket of issuers and related notionals
QuantLib::ext::shared_ptr< QuantExt::Basket > basket
QuantLib::CreditDefaultSwap::ProtectionPaymentTime protectionPaymentTime
QuantLib::ext::shared_ptr< CashFlow > upfrontPayment
void validate() const override
QuantLib::ext::shared_ptr< CashFlow > accrualRebate
QuantLib::ext::shared_ptr< CashFlow > accrualRebateCurrent
BusinessDayConvention paymentConvention
Real accrualRebateCurrentValue
std::vector< Real > expectedTrancheLoss
Synthetic Collateralized Debt Obligation.
Real upfrontPremiumValue_
QuantLib::ext::shared_ptr< CashFlow > accrualRebateCurrent_
std::vector< Real > expectedTrancheLoss() const
Rate fairUpfrontPremium() const
QuantLib::CreditDefaultSwap::ProtectionPaymentTime protectionPaymentTime_
QuantLib::ext::shared_ptr< QuantExt::Basket > basket_
const QuantLib::ext::shared_ptr< QuantExt::Basket > & basket() const
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
const Date & maturity() const
Last protection date.
Real implicitCorrelation(const std::vector< Real > &recoveries, const Handle< YieldTermStructure > &discountCurve, Real targetNPV=0., Real accuracy=1.0e-3) const
Rate protectionValue() const
Real protectionLegNPV() const
QuantLib::ext::shared_ptr< CashFlow > accrualRebate_
BusinessDayConvention paymentConvention_
Real premiumLegNPV() const
Real recoveryRate() const
Returns the recovery rate for fixed recovery CDO, otherwise returns Null<Real>()
void setupExpired() const override
const Real leverageFactor_
void fetchResults(const PricingEngine::results *) const override
Rate premiumValue() const
Real leverageFactor() const
std::vector< Real > expectedTrancheLoss_
Real remainingNotional() const
QuantLib::ext::shared_ptr< CashFlow > upfrontPayment_