#include <qle/cashflows/durationadjustedcmscoupon.hpp>
|
| | DurationAdjustedCmsCoupon (const Date &paymentDate, Real nominal, const Date &startDate, const Date &endDate, Natural fixingDays, const QuantLib::ext::shared_ptr< SwapIndex > &index, Size duration=0, Real gearing=1.0, Spread spread=0.0, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date(), const DayCounter &dayCounter=DayCounter(), bool isInArrears=false, const Date &exCouponDate=Date()) |
| |
| const QuantLib::ext::shared_ptr< SwapIndex > & | swapIndex () const |
| |
| Size | duration () const |
| |
| Real | durationAdjustment () const |
| |
| Rate | indexFixing () const override |
| |
| void | accept (AcyclicVisitor &) override |
| |
◆ DurationAdjustedCmsCoupon()
| DurationAdjustedCmsCoupon |
( |
const Date & |
paymentDate, |
|
|
Real |
nominal, |
|
|
const Date & |
startDate, |
|
|
const Date & |
endDate, |
|
|
Natural |
fixingDays, |
|
|
const QuantLib::ext::shared_ptr< SwapIndex > & |
index, |
|
|
Size |
duration = 0, |
|
|
Real |
gearing = 1.0, |
|
|
Spread |
spread = 0.0, |
|
|
const Date & |
refPeriodStart = Date(), |
|
|
const Date & |
refPeriodEnd = Date(), |
|
|
const DayCounter & |
dayCounter = DayCounter(), |
|
|
bool |
isInArrears = false, |
|
|
const Date & |
exCouponDate = Date() |
|
) |
| |
Definition at line 27 of file durationadjustedcmscoupon.cpp.
34 refPeriodStart, refPeriodEnd, dayCounter, isInArrears, exCouponDate),
const QuantLib::ext::shared_ptr< SwapIndex > & swapIndex() const
QuantLib::ext::shared_ptr< SwapIndex > swapIndex_
◆ swapIndex()
| const QuantLib::ext::shared_ptr< SwapIndex > & swapIndex |
( |
| ) |
const |
◆ duration()
◆ durationAdjustment()
| Real durationAdjustment |
( |
| ) |
const |
Definition at line 38 of file durationadjustedcmscoupon.cpp.
38 {
40 return 1.0;
41 } else {
43 Real tmp = 0.0;
45 tmp += 1.0 / std::pow(1.0 + swapRate, static_cast<Real>(i + 1));
46 }
47 return tmp;
48 }
49}
QuantLib::Date fixingDate(const QuantLib::Date &d, const QuantLib::Period obsLag, const QuantLib::Frequency freq, bool interpolated)
◆ indexFixing()
| Rate indexFixing |
( |
| ) |
const |
|
override |
◆ accept()
| void accept |
( |
AcyclicVisitor & |
v | ) |
|
|
override |
Definition at line 53 of file durationadjustedcmscoupon.cpp.
53 {
54 Visitor<DurationAdjustedCmsCoupon>* v1 = dynamic_cast<Visitor<DurationAdjustedCmsCoupon>*>(&v);
55 if (v1 != 0)
56 v1->visit(*this);
57 else
58 FloatingRateCoupon::accept(v);
59}
◆ swapIndex_
| QuantLib::ext::shared_ptr<SwapIndex> swapIndex_ |
|
private |
◆ duration_