| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Instrument.InflationCapFloor
Contents
Synopsis
- type YoYInflationCapFloor = GenInstrument CYoYInflationCapFloor
- type CPICapFloor = GenInstrument CCPICapFloor
- yoyInflationCap :: GenLeg l -> NonEmpty Double -> IO YoYInflationCapFloor
- yoyInflationCollar :: GenLeg l -> NonEmpty Double -> NonEmpty Double -> IO YoYInflationCapFloor
- yoyInflationFloor :: GenLeg l -> NonEmpty Double -> IO YoYInflationCapFloor
- optionlet :: YoYInflationCapFloor -> Word -> IO YoYInflationCapFloor
- cpiCapFloor :: OptionType -> Double -> Day -> Double -> Day -> Calendar -> BusinessDayConvention -> Calendar -> BusinessDayConvention -> Double -> ZeroInflationIndex -> (Word, TimeUnit) -> CPIInterpolationType -> IO CPICapFloor
- atmRate :: YoYInflationCapFloor -> GenYieldTermStructure y -> IO Double
Types
type YoYInflationCapFloor = GenInstrument CYoYInflationCapFloor Source #
A YoY-inflation cap/floor/collar (all three are thin ctor-only subclasses upstream with
no logic of their own, so yoyInflationCap/
yoyInflationCollar/yoyInflationFloor each construct this one flat leaf directly, mirroring
how CapFloor collapses Cap/Collar/Floor). Unlike CapFloor, it shares no C++ base
below Instrument with the nominal cap/floor, so it's a separate sibling leaf, not a subtype.
See the hierarchy under GenInstrument.
type CPICapFloor = GenInstrument CCPICapFloor Source #
A CPI cap/floor: unlike YoYInflationCapFloor, a single cumulative option (observes
cumulative inflation up to maturity, like a ZCIIS option) rather than a strip of optionlets --
flat sibling leaf under Instrument, sharing no C++ base with either CapFloor or
YoYInflationCapFloor.
See the hierarchy under GenInstrument.
Constructors
Arguments
| :: GenLeg l | yoyLeg |
| -> NonEmpty Double | exerciseRates |
| -> IO YoYInflationCapFloor |
Constructs a YoY-inflation cap: pays the excess of the YoY leg's rate over each exercise
rate, if positive. Unlike a nominal cap, the first optionlet is live (YoY inflation sets in
arrears, so there is no reason to omit it -- see upstream's own note on
YoYInflationCapFloor).
Arguments
| :: GenLeg l | yoyLeg |
| -> NonEmpty Double | capRates |
| -> NonEmpty Double | floorRates |
| -> IO YoYInflationCapFloor |
Constructs a YoY-inflation collar: a cap struck at the cap rates combined with a floor struck at the floor rates.
Arguments
| :: GenLeg l | yoyLeg |
| -> NonEmpty Double | exerciseRates |
| -> IO YoYInflationCapFloor |
Constructs a YoY-inflation floor: pays the excess of each exercise rate over the YoY leg's rate, if positive.
Arguments
| :: YoYInflationCapFloor | |
| -> Word | n |
| -> IO YoYInflationCapFloor |
Returns the n-th optionlet as a new YoYInflationCapFloor with only one cash flow.
Arguments
| :: OptionType | |
| -> Double | nominal |
| -> Day | startDate |
| -> Double | baseCPI |
| -> Day | maturity |
| -> Calendar | fixCalendar |
| -> BusinessDayConvention | fixConvention |
| -> Calendar | payCalendar |
| -> BusinessDayConvention | payConvention |
| -> Double | strike |
| -> ZeroInflationIndex | |
| -> (Word, TimeUnit) | observationLag |
| -> CPIInterpolationType | observationInterpolation |
| -> IO CPICapFloor |
A CPI cap or floor: a single cumulative option on cumulative inflation up to maturity
(CPI(T)/CPI(0)), not a strip of optionlets like YoYInflationCapFloor -- similar in shape
to a ZCIIS option. No implied-volatility inspector: pricing goes purely through
interpolatingCpiCapFloorEngine off a market price surface, there is
no vol-driven engine for it in QL 1.43.
Inspectors
Arguments
| :: YoYInflationCapFloor | |
| -> GenYieldTermStructure y | discountCurve |
| -> IO Double |
The fair (at-the-money) rate for the cap/floor's underlying YoY leg, discounted on the given curve.