Year-on-year inflation-indexed swap. More...
#include <ql/instruments/yearonyearinflationswap.hpp>
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 } |
![]() | |
typedef std::set< boost::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 boost::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 boost::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 |
![]() | |
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 |
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. | |
![]() | |
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 boost::shared_ptr< PricingEngine > &) |
set the pricing engine to be used. More... | |
![]() | |
void | update () |
void | recalculate () |
void | freeze () |
void | unfreeze () |
void | alwaysForwardNotifications () |
![]() | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
void | notifyObservers () |
![]() | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
std::pair< iterator, bool > | registerWith (const boost::shared_ptr< Observable > &) |
void | registerWithObservables (const boost::shared_ptr< Observer > &) |
Size | unregisterWith (const boost::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | deepUpdate () |
Additional Inherited Members | |
![]() | |
Swap (Size legs) | |
![]() | |
void | calculate () const |
virtual void | performCalculations () const |
![]() | |
![]() | |
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_ |
![]() | |
boost::shared_ptr< PricingEngine > | engine_ |
Real | NPV_ |
Real | errorEstimate_ |
Date | valuationDate_ |
std::map< std::string, boost::any > | additionalResults_ |
![]() | |
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.