QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
Equity total return swap. More...
#include <ql/instruments/equitytotalreturnswap.hpp>
Public Member Functions | |
EquityTotalReturnSwap (Type type, Real nominal, Schedule schedule, ext::shared_ptr< EquityIndex > equityIndex, const ext::shared_ptr< IborIndex > &interestRateIndex, DayCounter dayCounter, Rate margin, Real gearing=1.0, Calendar paymentCalendar=Calendar(), BusinessDayConvention paymentConvention=Unadjusted, Natural paymentDelay=0) | |
EquityTotalReturnSwap (Type type, Real nominal, Schedule schedule, ext::shared_ptr< EquityIndex > equityIndex, const ext::shared_ptr< OvernightIndex > &interestRateIndex, DayCounter dayCounter, Rate margin, Real gearing=1.0, Calendar paymentCalendar=Calendar(), BusinessDayConvention paymentConvention=Unadjusted, Natural paymentDelay=0) | |
Inspectors | |
Type | type () const |
Real | nominal () const |
const ext::shared_ptr< EquityIndex > & | equityIndex () const |
const ext::shared_ptr< InterestRateIndex > & | interestRateIndex () const |
const Schedule & | schedule () const |
const DayCounter & | dayCounter () const |
Rate | margin () const |
Real | gearing () const |
const Calendar & | paymentCalendar () const |
BusinessDayConvention | paymentConvention () const |
Natural | paymentDelay () const |
const Leg & | equityLeg () const |
const Leg & | interestRateLeg () const |
Public Member Functions inherited from Swap | |
void | deepUpdate () override |
Size | numberOfLegs () const |
const std::vector< Leg > & | legs () const |
virtual Date | startDate () const |
virtual Date | maturityDate () const |
Real | legBPS (Size j) const |
Real | legNPV (Size j) const |
DiscountFactor | startDiscounts (Size j) const |
DiscountFactor | endDiscounts (Size j) const |
DiscountFactor | npvDateDiscount () const |
const Leg & | leg (Size j) const |
bool | payer (Size j) const |
bool | isExpired () const override |
returns whether the instrument might have value greater than zero. More... | |
void | setupArguments (PricingEngine::arguments *) const override |
void | fetchResults (const PricingEngine::results *) const override |
Swap (const Leg &firstLeg, const Leg &secondLeg) | |
Swap (const std::vector< Leg > &legs, const std::vector< bool > &payer) | |
Public Member Functions inherited from Instrument | |
Instrument () | |
Real | NPV () const |
returns the net present value of the instrument. More... | |
Real | errorEstimate () const |
returns the error estimate on the NPV when available. More... | |
const Date & | valuationDate () const |
returns the date the net present value refers to. More... | |
template<typename T > | |
T | result (const std::string &tag) const |
returns any additional result returned by the pricing engine. More... | |
const std::map< std::string, ext::any > & | additionalResults () const |
returns all additional result returned by the pricing engine. More... | |
void | setPricingEngine (const ext::shared_ptr< PricingEngine > &) |
set the pricing engine to be used. More... | |
Public Member Functions inherited from LazyObject | |
LazyObject () | |
~LazyObject () override=default | |
void | update () override |
bool | isCalculated () const |
void | forwardFirstNotificationOnly () |
void | alwaysForwardNotifications () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | update ()=0 |
virtual void | deepUpdate () |
Results | |
ext::shared_ptr< EquityIndex > | equityIndex_ |
ext::shared_ptr< InterestRateIndex > | interestRateIndex_ |
Type | type_ |
Real | nominal_ |
Schedule | schedule_ |
DayCounter | dayCounter_ |
Rate | margin_ |
Real | gearing_ |
Calendar | paymentCalendar_ |
BusinessDayConvention | paymentConvention_ |
Natural | paymentDelay_ |
Real | equityLegNPV () const |
Real | interestRateLegNPV () const |
Real | fairMargin () const |
EquityTotalReturnSwap (ext::shared_ptr< EquityIndex > equityIndex, ext::shared_ptr< InterestRateIndex > interestRateIndex, Type type, Real nominal, Schedule schedule, DayCounter dayCounter, Rate margin, Real gearing=1.0, Calendar paymentCalendar=Calendar(), BusinessDayConvention paymentConvention=Unadjusted, Natural paymentDelay=0) | |
Additional Inherited Members | |
Public Types inherited from Swap | |
enum | Type { Receiver = -1 , Payer = 1 } |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Protected Member Functions inherited from Swap | |
void | setupExpired () const override |
Swap (Size legs) | |
Protected Member Functions inherited from Instrument | |
void | calculate () const override |
void | performCalculations () const override |
Protected Member Functions inherited from LazyObject | |
Protected Attributes inherited from Swap | |
std::vector< Leg > | legs_ |
std::vector< Real > | payer_ |
std::vector< Real > | legNPV_ |
std::vector< Real > | legBPS_ |
std::vector< DiscountFactor > | startDiscounts_ |
std::vector< DiscountFactor > | endDiscounts_ |
DiscountFactor | npvDateDiscount_ |
Protected Attributes inherited from Instrument | |
Real | NPV_ |
Real | errorEstimate_ |
Date | valuationDate_ |
std::map< std::string, ext::any > | additionalResults_ |
ext::shared_ptr< PricingEngine > | engine_ |
Protected Attributes inherited from LazyObject | |
bool | calculated_ = false |
bool | frozen_ = false |
bool | alwaysForward_ |
Equity total return swap.
It exchanges a total return of an equity index for a set of floating cash flows linked to either Ibor or overnight index. The equity leg future value (FV) is:
\[ FV^{equity} = N \left[ \frac{I(t, T_{M})}{I(T_{0})} -1 \right], \]
where \( N \) is the swap notional, \( I(T_{0}) \) is the value of the equity index on the start date and \( I(t, T_{M}) \) is the value of the equity index at maturity. The floating leg payments are linked to either an Ibor or an overnight index. In case of an overnight index the interest rate fixings are compounded over the accrual period.
Swap type (payer of receiver) refers to the equity leg.
Definition at line 54 of file equitytotalreturnswap.hpp.
EquityTotalReturnSwap | ( | Type | type, |
Real | nominal, | ||
Schedule | schedule, | ||
ext::shared_ptr< EquityIndex > | equityIndex, | ||
const ext::shared_ptr< IborIndex > & | interestRateIndex, | ||
DayCounter | dayCounter, | ||
Rate | margin, | ||
Real | gearing = 1.0 , |
||
Calendar | paymentCalendar = Calendar() , |
||
BusinessDayConvention | paymentConvention = Unadjusted , |
||
Natural | paymentDelay = 0 |
||
) |
EquityTotalReturnSwap | ( | Type | type, |
Real | nominal, | ||
Schedule | schedule, | ||
ext::shared_ptr< EquityIndex > | equityIndex, | ||
const ext::shared_ptr< OvernightIndex > & | interestRateIndex, | ||
DayCounter | dayCounter, | ||
Rate | margin, | ||
Real | gearing = 1.0 , |
||
Calendar | paymentCalendar = Calendar() , |
||
BusinessDayConvention | paymentConvention = Unadjusted , |
||
Natural | paymentDelay = 0 |
||
) |
|
private |
Type type | ( | ) | const |
Definition at line 82 of file equitytotalreturnswap.hpp.
Real nominal | ( | ) | const |
Definition at line 83 of file equitytotalreturnswap.hpp.
const ext::shared_ptr< EquityIndex > & equityIndex | ( | ) | const |
Definition at line 84 of file equitytotalreturnswap.hpp.
const ext::shared_ptr< InterestRateIndex > & interestRateIndex | ( | ) | const |
Definition at line 85 of file equitytotalreturnswap.hpp.
const Schedule & schedule | ( | ) | const |
Definition at line 86 of file equitytotalreturnswap.hpp.
const DayCounter & dayCounter | ( | ) | const |
Definition at line 87 of file equitytotalreturnswap.hpp.
Rate margin | ( | ) | const |
Definition at line 88 of file equitytotalreturnswap.hpp.
Real gearing | ( | ) | const |
Definition at line 89 of file equitytotalreturnswap.hpp.
const Calendar & paymentCalendar | ( | ) | const |
Definition at line 90 of file equitytotalreturnswap.hpp.
BusinessDayConvention paymentConvention | ( | ) | const |
Definition at line 91 of file equitytotalreturnswap.hpp.
Natural paymentDelay | ( | ) | const |
Definition at line 92 of file equitytotalreturnswap.hpp.
const Leg & equityLeg | ( | ) | const |
const Leg & interestRateLeg | ( | ) | const |
Real equityLegNPV | ( | ) | const |
Definition at line 177 of file equitytotalreturnswap.cpp.
Real interestRateLegNPV | ( | ) | const |
Definition at line 181 of file equitytotalreturnswap.cpp.
Real fairMargin | ( | ) | const |
|
private |
Definition at line 118 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 119 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 120 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 121 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 122 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 123 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 124 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 125 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 126 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 127 of file equitytotalreturnswap.hpp.
|
private |
Definition at line 128 of file equitytotalreturnswap.hpp.