#include <qle/instruments/cbo.hpp>
|
|
| 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) |
|
|
QuantLib::ext::shared_ptr< BondBasket > | basket () const |
|
|
bool | isExpired () const override |
|
void | setupArguments (PricingEngine::arguments *) const override |
|
void | fetchResults (const PricingEngine::results *) const override |
|
Definition at line 51 of file cbo.hpp.
◆ CBO()
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 |
|
) |
| |
- Parameters
-
basket | Underlying bond basket |
schedule | CBO schedule |
seniorFee | Senior fee rate to be paid before any cash flow goes to the tranches |
feeDayCounter | Fee day counter |
tranches | Tranche description |
subordinatedFee | Subordinated fee rate to be paid late in the waterfal |
equityKicker | Equity kicker |
ccy | CBOs currency |
investedTrancheName | invested trancheName |
Definition at line 27 of file cbo.cpp.
34 QL_REQUIRE(
basket->bonds().size() > 0,
"basket is empty");
35 QL_REQUIRE(tranches.size() > 0, "no tranches specified");
36}
std::string investedTrancheName_
QuantLib::ext::shared_ptr< BondBasket > basket_
QuantLib::ext::shared_ptr< BondBasket > basket() const
std::vector< Tranche > tranches_
DayCounter feeDayCounter_
◆ basket()
QuantLib::ext::shared_ptr< BondBasket > basket |
( |
| ) |
const |
◆ isExpired()
Definition at line 81 of file cbo.cpp.
81 {
82 if (
schedule_.dates().back() <= Settings::instance().evaluationDate())
83 return true;
84 else
85 return false;
86}
◆ setupArguments()
void setupArguments |
( |
PricingEngine::arguments * |
args | ) |
const |
|
override |
Definition at line 88 of file cbo.cpp.
88 {
89 CBO::arguments* arguments = dynamic_cast<CBO::arguments*>(args);
90 QL_REQUIRE(arguments != 0, "wrong argument type");
98 arguments->ccy =
ccy_;
100
101}
◆ fetchResults()
void fetchResults |
( |
const PricingEngine::results * |
r | ) |
const |
|
override |
Definition at line 103 of file cbo.cpp.
103 {
104 Instrument::fetchResults(r);
105
106 const CBO::results* results = dynamic_cast<const CBO::results*>(r);
107 QL_REQUIRE(results != 0, "wrong result type");
108
116}
std::vector< Real > trancheValue_
std::vector< Real > trancheValueStd_
std::vector< CashflowTable > trancheCashflows_
◆ basketValue()
Real basketValue |
( |
| ) |
const |
◆ trancheValue()
std::vector< Real > trancheValue |
( |
| ) |
const |
◆ feeValue()
◆ subfeeValue()
Rate subfeeValue |
( |
| ) |
const |
◆ basketValueStd()
Real basketValueStd |
( |
| ) |
const |
◆ trancheValueStd()
std::vector< Real > trancheValueStd |
( |
| ) |
const |
◆ feeValueStd()
Real feeValueStd |
( |
| ) |
const |
◆ subfeeValueStd()
Rate subfeeValueStd |
( |
| ) |
const |
◆ trancheCashflows()
◆ setupExpired()
void setupExpired |
( |
| ) |
const |
|
overrideprivate |
Definition at line 118 of file cbo.cpp.
118 {
119 Instrument::setupExpired();
123
128}
◆ basket_
◆ schedule_
◆ seniorFee_
◆ feeDayCounter_
DayCounter feeDayCounter_ |
|
private |
◆ tranches_
◆ subordinatedFee_
◆ equityKicker_
◆ ccy_
◆ investedTrancheName_
std::string investedTrancheName_ |
|
private |
◆ basketValue_
◆ trancheValue_
std::vector<Real> trancheValue_ |
|
mutableprivate |
◆ feeValue_
◆ subfeeValue_
◆ basketValueStd_
◆ trancheValueStd_
std::vector<Real> trancheValueStd_ |
|
mutableprivate |
◆ feeValueStd_
◆ subfeeValueStd_
◆ trancheCashflows_