Bond TRS class.
More...
#include <qle/instruments/bondtotalreturnswap.hpp>
|
| BondTRS (const QuantLib::ext::shared_ptr< QuantExt::BondIndex > &bondIndex, const Real bondNotional, const Real initialPrice, const std::vector< Leg > &fundingLeg, const bool payTotalReturnLeg, const std::vector< Date > &valuationDates, const std::vector< Date > &paymentDates, const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fxIndex=nullptr, bool payBondCashFlowsImmediately=false, const Currency &fundingCurrency=Currency(), const Currency &bondCurrency=Currency()) |
| Constructor. More...
|
|
|
bool | isExpired () const override |
|
void | setupArguments (PricingEngine::arguments *) const override |
|
Bond TRS class.
Definition at line 37 of file bondtotalreturnswap.hpp.
◆ engine
◆ results
◆ BondTRS()
BondTRS |
( |
const QuantLib::ext::shared_ptr< QuantExt::BondIndex > & |
bondIndex, |
|
|
const Real |
bondNotional, |
|
|
const Real |
initialPrice, |
|
|
const std::vector< Leg > & |
fundingLeg, |
|
|
const bool |
payTotalReturnLeg, |
|
|
const std::vector< Date > & |
valuationDates, |
|
|
const std::vector< Date > & |
paymentDates, |
|
|
const QuantLib::ext::shared_ptr< QuantExt::FxIndex > & |
fxIndex = nullptr , |
|
|
bool |
payBondCashFlowsImmediately = false , |
|
|
const Currency & |
fundingCurrency = Currency() , |
|
|
const Currency & |
bondCurrency = Currency() |
|
) |
| |
Constructor.
Definition at line 27 of file bondtotalreturnswap.cpp.
36
37 QL_REQUIRE(
bondIndex,
"BondTRS: no bond index given");
39
42
44
46 "BondTRS: fx index required if funding ccy ("
48
51 "BondTRS: fx index '" <<
fxIndex_->name() <<
"' currencies must match bond ccy / funding ccy ("
53 }
54 }
55
57 for (auto const& c : l)
58 registerWith(c);
59 }
60 QL_REQUIRE(
valuationDates.size() > 1,
"valuation dates size > 1 required");
61
64}
bool payBondCashFlowsImmediately_
const QuantLib::ext::shared_ptr< QuantExt::BondIndex > & bondIndex() const
QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndex_
std::vector< Leg > fundingLeg_
bool payBondCashFlowsImmediately() const
const std::vector< Date > & valuationDates() const
const std::vector< Leg > & fundingLeg() const
std::vector< Date > valuationDates_
const std::vector< Date > & paymentDates() const
bool payTotalReturnLeg() const
Currency fundingCurrency_
std::vector< Date > paymentDates_
const QuantLib::ext::shared_ptr< QuantExt::FxIndex > & fxIndex() const
QuantLib::ext::shared_ptr< QuantExt::BondIndex > bondIndex_
Real initialPrice() const
Real bondNotional() const
◆ isExpired()
◆ setupArguments()
void setupArguments |
( |
PricingEngine::arguments * |
args | ) |
const |
|
override |
Definition at line 68 of file bondtotalreturnswap.cpp.
68 {
69 BondTRS::arguments* arguments = dynamic_cast<BondTRS::arguments*>(args);
70 QL_REQUIRE(arguments, "BondTRS instrument: wrong argument type in bond total return swap");
82}
◆ bondIndex()
◆ fxIndex()
◆ bondNotional()
Real bondNotional |
( |
| ) |
const |
◆ fundingLeg()
const std::vector< Leg > & fundingLeg |
( |
| ) |
const |
◆ initialPrice()
Real initialPrice |
( |
| ) |
const |
◆ payTotalReturnLeg()
bool payTotalReturnLeg |
( |
| ) |
const |
◆ returnLeg()
const Leg & returnLeg |
( |
| ) |
const |
◆ payBondCashFlowsImmediately()
bool payBondCashFlowsImmediately |
( |
| ) |
const |
◆ valuationDates()
const std::vector< Date > & valuationDates |
( |
| ) |
const |
◆ paymentDates()
const std::vector< Date > & paymentDates |
( |
| ) |
const |
◆ bondIndex_
◆ bondNotional_
◆ initialPrice_
◆ fundingLeg_
std::vector<Leg> fundingLeg_ |
|
private |
◆ payTotalReturnLeg_
◆ fxIndex_
◆ payBondCashFlowsImmediately_
bool payBondCashFlowsImmediately_ |
|
private |
◆ fundingCurrency_
Currency fundingCurrency_ |
|
private |
◆ bondCurrency_
◆ valuationDates_
std::vector<Date> valuationDates_ |
|
private |
◆ paymentDates_
std::vector<Date> paymentDates_ |
|
private |
◆ returnLeg_