27CBO::CBO(
const QuantLib::ext::shared_ptr<BondBasket>& basket,
const Schedule& schedule,
28 Rate seniorFee,
const DayCounter& feeDayCounter,
const std::vector<Tranche>& tranches,
29 Rate subordinatedFee, Rate equityKicker,
const Currency& ccy,
30 const std::string& investedTrancheName)
31 : basket_(basket), schedule_(schedule), seniorFee_(seniorFee), feeDayCounter_(feeDayCounter),
32 tranches_(tranches), subordinatedFee_(subordinatedFee), equityKicker_(equityKicker), ccy_(ccy),
33 investedTrancheName_(investedTrancheName) {
34 QL_REQUIRE(
basket->bonds().size() > 0,
"basket is empty");
35 QL_REQUIRE(tranches.size() > 0,
"no tranches specified");
82 if (
schedule_.dates().back() <= Settings::instance().evaluationDate())
90 QL_REQUIRE(
arguments != 0,
"wrong argument type");
104 Instrument::fetchResults(r);
107 QL_REQUIRE(
results != 0,
"wrong result type");
119 Instrument::setupExpired();
131 QL_REQUIRE(
basket && !
basket->bonds().empty(),
"no basket given");
132 QL_REQUIRE(
seniorFee != Null<Real>(),
"no senior fee given");
133 QL_REQUIRE(!
feeDayCounter.empty(),
"no fee day counter given");
137 Instrument::results::reset();
collateralized bond obligation instrument
QuantLib::ext::shared_ptr< BondBasket > basket
std::vector< Tranche > tranches
std::string investedTrancheName
void validate() const override
std::vector< CashflowTable > trancheCashflows
std::vector< Real > trancheValueStd
std::vector< Real > trancheValue
Real basketValueStd() const
std::string investedTrancheName_
QuantLib::ext::shared_ptr< BondBasket > basket_
std::vector< Real > trancheValue_
QuantLib::ext::shared_ptr< BondBasket > basket() const
std::vector< Real > trancheValue() const
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
std::vector< Real > trancheValueStd_
std::vector< CashflowTable > trancheCashflows_
std::vector< Tranche > tranches_
void setupExpired() const override
DayCounter feeDayCounter_
void fetchResults(const PricingEngine::results *) const override
const std::vector< CashflowTable > & trancheCashflows() const
CBO(const QuantLib::ext::shared_ptr< BondBasket > &basket, const QuantLib::Schedule &schedule, Rate seniorFee, const DayCounter &feeDayCounter, const std::vector< Tranche > &tranches, Rate subordinatedFee, Rate equityKicker, const Currency &ccy, const std::string &investedTrancheName)
std::vector< Real > trancheValueStd() const