YearOnYearInflationSwap Class Reference

#include <ql/instruments/yearonyearinflationswap.hpp>

Inheritance diagram for YearOnYearInflationSwap:

List of all members.


Detailed Description

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 $.

Note:
The allowAmbiguousPayments parameter is to allow for payment arithmetic being ambiguous. If the maturity is in, say, 30.01 years according to the day-counter and roll rules, does this mean that there is a payment in 0.01 years? If allowAmbiguousPayments is false, the ambiguousPaymentPeriod parameter sets the period within which the answer is no.

Public Member Functions

 YearOnYearInflationSwap (const Date &start, const Date &maturity, const Period &lag, Rate fixedRate, const Calendar &calendar, BusinessDayConvention convention, const DayCounter &dayCounter, const Handle< YieldTermStructure > &yieldTS, const Handle< YoYInflationTermStructure > &inflationTS, bool allowAmbiguousPayments=false, const Period &ambiguousPaymentPeriod=Period(1, Months))
Instrument interface
bool isExpired () const
 returns whether the instrument is still tradable.
InflationSwap interface
Rate fairRate () const
 the rate $ \tilde{K} $ such that NPV = 0.
Inspectors
Rate fixedRate () const
 $ K $ in the above formula.
std::vector< DatepaymentDates () const

Protected Member Functions

Instrument interface
void setupExpired () const
void performCalculations () const

Protected Attributes

Rate fixedRate_
Handle< YoYInflationTermStructureinflationTS_
bool allowAmbiguousPayments_
Period ambiguousPaymentPeriod_
std::vector< DatepaymentDates_
Rate fairRate_

Member Function Documentation

void setupExpired (  )  const [protected, virtual]

This method must leave the instrument in a consistent state when the expiration condition is met.

Reimplemented from Instrument.

void performCalculations (  )  const [protected, virtual]

In case a pricing engine is not used, this method must be overridden to perform the actual calculations and set any needed results. In case a pricing engine is used, the default implementation can be used.

Reimplemented from Instrument.