Forward Bond class.
More...
#include <qle/instruments/forwardbond.hpp>
|
| ForwardBond (const QuantLib::ext::shared_ptr< QuantLib::Bond > &underlying, const QuantLib::ext::shared_ptr< Payoff > &payoff, const Date &fwdMaturityDate, const Date &fwdSettlementDate, const bool isPhysicallySettled, const bool settlementDirty, const Real compensationPayment, const Date compensationPaymentDate, const Real bondNotional=1.0) |
| Constructor vanilla forward bond. More...
|
|
| ForwardBond (const QuantLib::ext::shared_ptr< QuantLib::Bond > &underlying, const Real lockRate, const DayCounter &lockRateDayCounter, const bool longInForward, const Date &fwdMaturityDate, const Date &fwdSettlementDate, const bool isPhysicallySettled, const bool settlementDirty, const Real compensationPayment, const Date compensationPaymentDate, const Real bondNotional=1.0, const Real dv01=Null< Real >()) |
| Constructor for tlocks with lock rate. More...
|
|
|
bool | isExpired () const override |
|
void | setupArguments (PricingEngine::arguments *) const override |
|
void | fetchResults (const PricingEngine::results *) const override |
|
Forward Bond class.
Definition at line 41 of file forwardbond.hpp.
◆ ForwardBond() [1/2]
ForwardBond |
( |
const QuantLib::ext::shared_ptr< QuantLib::Bond > & |
underlying, |
|
|
const QuantLib::ext::shared_ptr< Payoff > & |
payoff, |
|
|
const Date & |
fwdMaturityDate, |
|
|
const Date & |
fwdSettlementDate, |
|
|
const bool |
isPhysicallySettled, |
|
|
const bool |
settlementDirty, |
|
|
const Real |
compensationPayment, |
|
|
const Date |
compensationPaymentDate, |
|
|
const Real |
bondNotional = 1.0 |
|
) |
| |
Constructor vanilla forward bond.
◆ ForwardBond() [2/2]
ForwardBond |
( |
const QuantLib::ext::shared_ptr< QuantLib::Bond > & |
underlying, |
|
|
const Real |
lockRate, |
|
|
const DayCounter & |
lockRateDayCounter, |
|
|
const bool |
longInForward, |
|
|
const Date & |
fwdMaturityDate, |
|
|
const Date & |
fwdSettlementDate, |
|
|
const bool |
isPhysicallySettled, |
|
|
const bool |
settlementDirty, |
|
|
const Real |
compensationPayment, |
|
|
const Date |
compensationPaymentDate, |
|
|
const Real |
bondNotional = 1.0 , |
|
|
const Real |
dv01 = Null< Real >() |
|
) |
| |
Constructor for tlocks with lock rate.
◆ isExpired()
◆ setupArguments()
void setupArguments |
( |
PricingEngine::arguments * |
args | ) |
const |
|
override |
Definition at line 48 of file forwardbond.cpp.
48 {
49 ForwardBond::arguments* arguments = dynamic_cast<ForwardBond::arguments*>(args);
50 QL_REQUIRE(arguments != 0, "wrong argument type in forward bond");
63 arguments->dv01 =
dv01_;
64}
DayCounter lockRateDayCounter_
Date compensationPaymentDate_
bool isPhysicallySettled_
boost::optional< bool > longInForward_
Real compensationPayment_
QuantLib::ext::shared_ptr< Payoff > payoff_
QuantLib::ext::shared_ptr< QuantLib::Bond > underlying_
◆ fetchResults()
void fetchResults |
( |
const PricingEngine::results * |
r | ) |
const |
|
override |
Definition at line 73 of file forwardbond.cpp.
73 {
74 Instrument::fetchResults(r);
75 const ForwardBond::results* results = dynamic_cast<const ForwardBond::results*>(r);
76 QL_REQUIRE(results, "wrong result type");
80}
Real underlyingSpotValue_
◆ underlying()
const QuantLib::ext::shared_ptr< QuantLib::Bond > & underlying |
( |
| ) |
|
◆ underlying_
QuantLib::ext::shared_ptr<QuantLib::Bond> underlying_ |
|
private |
◆ payoff_
QuantLib::ext::shared_ptr<Payoff> payoff_ |
|
private |
◆ lockRate_
◆ lockRateDayCounter_
DayCounter lockRateDayCounter_ |
|
private |
◆ longInForward_
boost::optional<bool> longInForward_ |
|
private |
◆ fwdMaturityDate_
◆ fwdSettlementDate_
◆ isPhysicallySettled_
bool isPhysicallySettled_ |
|
private |
◆ settlementDirty_
◆ compensationPayment_
Real compensationPayment_ |
|
private |
◆ compensationPaymentDate_
Date compensationPaymentDate_ |
|
private |
◆ bondNotional_
◆ dv01_
◆ underlyingIncome_
◆ underlyingSpotValue_
Real underlyingSpotValue_ |
|
mutableprivate |
◆ forwardValue_