Year-on-year inflation-indexed swap. More...
#include <ql/instruments/yearonyearinflationswap.hpp>
Inheritance diagram for YearOnYearInflationSwap:Classes | |
| class | arguments |
| Arguments for YoY swap calculation More... | |
| class | results |
| Results from YoY swap calculation More... | |
Public Types | |
| enum | Type { Receiver = -1, Payer = 1 } |
Public Types inherited from Observer | |
| typedef boost::unordered_set< ext::shared_ptr< Observable > > | set_type |
| typedef set_type::iterator | iterator |
Public Member Functions | |
| YearOnYearInflationSwap (Type type, Real nominal, const Schedule &fixedSchedule, Rate fixedRate, const DayCounter &fixedDayCount, const Schedule &yoySchedule, const ext::shared_ptr< YoYInflationIndex > &yoyIndex, const Period &observationLag, Spread spread, const DayCounter &yoyDayCount, const Calendar &paymentCalendar, BusinessDayConvention paymentConvention=ModifiedFollowing) | |
| virtual Real | fixedLegNPV () const |
| virtual Rate | fairRate () const |
| virtual Real | yoyLegNPV () const |
| virtual Spread | fairSpread () const |
| virtual Type | type () const |
| virtual Real | nominal () const |
| virtual const Schedule & | fixedSchedule () const |
| virtual Rate | fixedRate () const |
| virtual const DayCounter & | fixedDayCount () const |
| virtual const Schedule & | yoySchedule () const |
| virtual const ext::shared_ptr< YoYInflationIndex > & | yoyInflationIndex () const |
| virtual Period | observationLag () const |
| virtual Spread | spread () const |
| virtual const DayCounter & | yoyDayCount () const |
| virtual Calendar | paymentCalendar () const |
| virtual BusinessDayConvention | paymentConvention () const |
| virtual const Leg & | fixedLeg () const |
| virtual const Leg & | yoyLeg () const |
| void | setupArguments (PricingEngine::arguments *args) const |
| void | fetchResults (const PricingEngine::results *) const |
Public Member Functions inherited from Swap | |
| void | deepUpdate () |
| Date | startDate () const |
| 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 |
| Swap (const Leg &firstLeg, const Leg &secondLeg) | |
| Swap (const std::vector< Leg > &legs, const std::vector< bool > &payer) | |
| bool | isExpired () const |
| returns whether the instrument might have value greater than zero. | |
Public Member Functions inherited from Instrument | |
| Real | NPV () const |
| returns the net present value of the instrument. | |
| Real | errorEstimate () const |
| returns the error estimate on the NPV when available. | |
| const Date & | valuationDate () const |
| returns the date the net present value refers to. | |
| template<typename T > | |
| T | result (const std::string &tag) const |
| returns any additional result returned by the pricing engine. | |
| const std::map< std::string, boost::any > & | additionalResults () const |
| returns all additional result returned by the pricing engine. | |
| void | setPricingEngine (const ext::shared_ptr< PricingEngine > &) |
| set the pricing engine to be used. More... | |
Public Member Functions inherited from LazyObject | |
| void | update () |
| void | recalculate () |
| void | freeze () |
| void | unfreeze () |
| void | alwaysForwardNotifications () |
Public Member Functions inherited from Observable | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| void | notifyObservers () |
Public Member Functions inherited from Observer | |
| Observer (const Observer &) | |
| Observer & | operator= (const 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 () |
Additional Inherited Members | |
Protected Member Functions inherited from Swap | |
| Swap (Size legs) | |
Protected Member Functions inherited from Instrument | |
| void | calculate () const |
| virtual void | performCalculations () const |
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, boost::any > | additionalResults_ |
| ext::shared_ptr< PricingEngine > | engine_ |
Protected Attributes inherited from LazyObject | |
| bool | calculated_ |
| bool | frozen_ |
| bool | alwaysForward_ |
Year-on-year inflation-indexed swap.
Quoted as a fixed rate \( K \). At start:
\[ \sum_{i=1}^{M} P_n(0,t_i) N K = \sum_{i=1}^{M} P_n(0,t_i) N \left[ \frac{I(t_i)}{I(t_i-1)} - 1 \right] \]
where \( t_M \) is the maturity time, \( P_n(0,t) \) is the nominal discount factor at time \( t \), \( N \) is the notional, and \( I(t) \) is the inflation index value at time \( t \).
|
virtual |
When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Swap.
|
virtual |
When a derived result structure is defined for an instrument, this method should be overridden to read from it. This is mandatory in case a pricing engine is used.
Reimplemented from Swap.