### A free/open-source library for quantitative finance

Public Member Functions | Protected Member Functions | Protected Attributes
YoYCapFloorTermPriceSurface Class Reference

Abstract base class, inheriting from InflationTermStructure. More...

`#include <ql/experimental/inflation/yoycapfloortermpricesurface.hpp>`

Inheritance diagram for YoYCapFloorTermPriceSurface:
[legend]

List of all members.

## Public Member Functions

YoYCapFloorTermPriceSurface (Natural fixingDays, const Period &yyLag, const boost::shared_ptr< YoYInflationIndex > &yii, Rate baseRate, const Handle< YieldTermStructure > &nominal, const DayCounter &dc, const Calendar &cal, const BusinessDayConvention &bdc, const std::vector< Rate > &cStrikes, const std::vector< Rate > &fStrikes, const std::vector< Period > &cfMaturities, const Matrix &cPrice, const Matrix &fPrice)

virtual std::pair< std::vector < Time >, std::vector< Rate > > | atmYoYSwapTimeRates () const =0
| atm yoy swaps from put-call parity on cap/floor data
virtual std::pair< std::vector < Date >, std::vector< Rate > > | atmYoYSwapDateRates () const =0
virtual boost::shared_ptr < YoYInflationTermStructure > | YoYTS () const =0
| derived from yoy swap rates
boost::shared_ptr < YoYInflationIndex > | yoyIndex () const
| index yoy is based on
virtual Date | yoyOptionDateFromTenor (const Period &p) const
virtual BusinessDayConvention | businessDayConvention () const
| inspectors
virtual Natural | fixingDays () const
virtual Real | price (const Date &d, const Rate k) const =0
virtual Real | capPrice (const Date &d, const Rate k) const =0
virtual Real | floorPrice (const Date &d, const Rate k) const =0
virtual Rate | atmYoYSwapRate (const Date &d, bool extrapolate=true) const =0
virtual Rate | atmYoYRate (const Date &d, const Period &obsLag=Period(-1, Days), bool extrapolate=true) const =0
virtual Real | price (const Period &d, const Rate k) const
virtual Real | capPrice (const Period &d, const Rate k) const
virtual Real | floorPrice (const Period &d, const Rate k) const
virtual Rate | atmYoYSwapRate (const Period &d, bool extrapolate=true) const
virtual Rate | atmYoYRate (const Period &d, const Period &obsLag=Period(-1, Days), bool extrapolate=true) const
virtual std::vector< Rate > | strikes () const
virtual std::vector< Rate > | capStrikes () const
virtual std::vector< Rate > | floorStrikes () const
virtual std::vector< Period > | maturities () const
virtual Rate | minStrike () const
virtual Rate | maxStrike () const
virtual Date | minMaturity () const
virtual Date | maxMaturity () const

## Protected Member Functions

virtual bool | checkStrike (Rate K)
virtual bool | checkMaturity (const Date &d)

## Protected Attributes

Natural | fixingDays_
BusinessDayConvention | bdc_
boost::shared_ptr < YoYInflationIndex > | yoyIndex_
std::vector< Rate > | cStrikes_
std::vector< Rate > | fStrikes_
std::vector< Period > | cfMaturities_
std::vector< Real > | cfMaturityTimes_
Matrix | cPrice_
Matrix | fPrice_
std::vector< Rate > | cfStrikes_
boost::shared_ptr < YoYInflationTermStructure > | yoy_
std::pair< std::vector< Time > , std::vector< Rate > > | atmYoYSwapTimeRates_
std::pair< std::vector< Date > , std::vector< Rate > > | atmYoYSwapDateRates_

## Detailed Description

Abstract base class, inheriting from InflationTermStructure.

Since this can create a yoy term structure it does take a YoY index.

Possible enhancements:
  deal with index interpolation.

## Member Function Documentation

virtual std::pair<std::vector<Time>, std::vector<Rate> > atmYoYSwapTimeRates | ( |  | ) | const`[pure virtual]`

atm yoy swaps from put-call parity on cap/floor data

uses interpolation (on surface price data), yearly maturities.

virtual BusinessDayConvention businessDayConvention | ( |  | ) | const`[virtual]`

inspectors

Note:
  you don't know if price() is a cap or a floor without checking the YoYSwapATM level.
  atm cap/floor prices are generally inaccurate because they are from extrapolation and intersection.