| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.TermStructure.Inflation
Synopsis
- type ZeroInflationTermStructure = GenTermStructure CZeroInflationTermStructure
- type YoYInflationTermStructure = GenTermStructure CYoYInflationTermStructure
- data ZeroCouponInflationSwapHelper
- data YearOnYearInflationSwapHelper
- data CPIInterpolationType
- data Seasonality
- zeroCouponInflationSwapHelper :: GenQuote q -> (Word, TimeUnit) -> Day -> Calendar -> BusinessDayConvention -> DayCounter -> ZeroInflationIndex -> CPIInterpolationType -> PillarChoice -> Maybe Day -> IO ZeroCouponInflationSwapHelper
- yearOnYearInflationSwapHelper :: GenQuote q -> (Word, TimeUnit) -> Day -> Calendar -> BusinessDayConvention -> DayCounter -> YoYInflationIndex -> CPIInterpolationType -> GenYieldTermStructure y -> PillarChoice -> Maybe Day -> IO YearOnYearInflationSwapHelper
- cpiBondHelper :: GenQuote q -> Word -> Double -> Double -> (Word, TimeUnit) -> ZeroInflationIndex -> CPIInterpolationType -> Schedule -> NonEmpty Double -> DayCounter -> BusinessDayConvention -> Maybe Day -> Calendar -> IO BondHelper
- piecewiseZeroInflationCurve :: Day -> Day -> Frequency -> DayCounter -> NonEmpty ZeroCouponInflationSwapHelper -> Maybe Seasonality -> Interpolation -> IO ZeroInflationTermStructure
- piecewiseYoyInflationCurve :: Day -> Day -> Double -> Frequency -> DayCounter -> NonEmpty YearOnYearInflationSwapHelper -> Maybe Seasonality -> Interpolation -> IO YoYInflationTermStructure
- interpolatedYoyInflationCurve :: Day -> NonEmpty (Day, Double) -> Frequency -> DayCounter -> Maybe Seasonality -> Interpolation -> IO YoYInflationTermStructure
- interpolatedZeroInflationCurve :: Day -> NonEmpty (Day, Double) -> Frequency -> DayCounter -> Maybe Seasonality -> Interpolation -> IO ZeroInflationTermStructure
- class HasHelperUnderlying h where
- type HelperUnderlying h
- helperInstrument :: h -> IO (HelperUnderlying h)
- zeroRate :: ZeroInflationTermStructure -> Day -> Bool -> IO Double
- yoyRate :: YoYInflationTermStructure -> Day -> Bool -> IO Double
Types
type ZeroInflationTermStructure = GenTermStructure CZeroInflationTermStructure Source #
A TermStructure; see the hierarchy under GenTermStructure.
type YoYInflationTermStructure = GenTermStructure CYoYInflationTermStructure Source #
A TermStructure; see the hierarchy under GenTermStructure.
data ZeroCouponInflationSwapHelper Source #
Instances
| HasHelperUnderlying ZeroCouponInflationSwapHelper Source # | |||||
Defined in QuantLib.TermStructure Associated Types
| |||||
| type HelperUnderlying ZeroCouponInflationSwapHelper Source # | |||||
data YearOnYearInflationSwapHelper Source #
Instances
| HasHelperUnderlying YearOnYearInflationSwapHelper Source # | |||||
Defined in QuantLib.TermStructure Associated Types
| |||||
| type HelperUnderlying YearOnYearInflationSwapHelper Source # | |||||
data CPIInterpolationType Source #
Instances
data Seasonality Source #
Multiplicative price seasonality applied by an inflation curve's zero and year-on-year rates. Factors repeat every whole multiple of a year and are normalized to the curve's base date; multi-year factors inconsistent at whole years around that date make construction throw.
Constructors
| MultiplicativePriceSeasonality !Day !Frequency ![Double] | seasonalityBaseDate, frequency, factors |
| KerkhofSeasonality !Day ![Double] | seasonalityBaseDate, monthly factors |
Constructors
Helpers
zeroCouponInflationSwapHelper Source #
Arguments
| :: GenQuote q | quote |
| -> (Word, TimeUnit) | swapObsLag |
| -> Day | maturity |
| -> Calendar | |
| -> BusinessDayConvention | paymentConvention |
| -> DayCounter | |
| -> ZeroInflationIndex | |
| -> CPIInterpolationType | observationInterpolation |
| -> PillarChoice | pillar |
| -> Maybe Day | customPillarDate |
| -> IO ZeroCouponInflationSwapHelper |
Bootstrap helper for a zero-coupon inflation swap, at the given (observation lag, maturity).
yearOnYearInflationSwapHelper Source #
Arguments
| :: GenQuote q | quote |
| -> (Word, TimeUnit) | swapObsLag |
| -> Day | maturity |
| -> Calendar | |
| -> BusinessDayConvention | paymentConvention |
| -> DayCounter | |
| -> YoYInflationIndex | |
| -> CPIInterpolationType | observationInterpolation |
| -> GenYieldTermStructure y | nominalTermStructure |
| -> PillarChoice | pillar |
| -> Maybe Day | customPillarDate |
| -> IO YearOnYearInflationSwapHelper |
Bootstrap helper for a year-on-year inflation swap. Unlike zeroCouponInflationSwapHelper,
also needs the nominal discount curve (the YoY swap's fixed/floating legs discount off it).
Arguments
| :: GenQuote q | |
| -> Word | settlementDays |
| -> Double | faceAmount |
| -> Double | baseCPI |
| -> (Word, TimeUnit) | observationLag |
| -> ZeroInflationIndex | |
| -> CPIInterpolationType | observationInterpolation |
| -> Schedule | |
| -> NonEmpty Double | coupons |
| -> DayCounter | accrualDayCounter |
| -> BusinessDayConvention | paymentConvention |
| -> Maybe Day | issueDate |
| -> Calendar | paymentCalendar |
| -> IO BondHelper |
Bootstrap helper for a CPIBond -- a CPIBondHelper, which is a
plain BondHelper subclass with no extra methods, so it's returned as the generic
BondHelper type (same shape as fixedRateBondHelper).
Curves
piecewiseZeroInflationCurve Source #
Arguments
| :: Day | referenceDate |
| -> Day | baseDate |
| -> Frequency | |
| -> DayCounter | |
| -> NonEmpty ZeroCouponInflationSwapHelper | |
| -> Maybe Seasonality | |
| -> Interpolation | |
| -> IO ZeroInflationTermStructure |
Bootstraps a zero-inflation term structure piecewise from a set of helpers, interpolating
between the bootstrapped nodes with the given Interpolation.
piecewiseYoyInflationCurve Source #
Arguments
| :: Day | referenceDate |
| -> Day | baseDate |
| -> Double | baseYoYRate |
| -> Frequency | |
| -> DayCounter | |
| -> NonEmpty YearOnYearInflationSwapHelper | |
| -> Maybe Seasonality | |
| -> Interpolation | |
| -> IO YoYInflationTermStructure |
Bootstraps a year-on-year inflation term structure piecewise from a set of helpers,
interpolating between the bootstrapped nodes with the given Interpolation.
interpolatedYoyInflationCurve Source #
Arguments
| :: Day | referenceDate |
| -> NonEmpty (Day, Double) | dates, rates |
| -> Frequency | |
| -> DayCounter | |
| -> Maybe Seasonality | |
| -> Interpolation | |
| -> IO YoYInflationTermStructure |
A YoY-inflation curve interpolating directly between given (date, rate) nodes, unlike
piecewiseYoyInflationCurve bootstrap from swap helpers -- useful when the rates are
already known market YoY levels rather than swap quotes to calibrate against. The first
node is the curve's own base date/rate.
interpolatedZeroInflationCurve Source #
Arguments
| :: Day | referenceDate |
| -> NonEmpty (Day, Double) | dates, rates |
| -> Frequency | |
| -> DayCounter | |
| -> Maybe Seasonality | |
| -> Interpolation | |
| -> IO ZeroInflationTermStructure |
A zero-coupon inflation curve interpolating directly between given (date, rate) nodes. The first node is the curve's base date.
Inspectors
class HasHelperUnderlying h where Source #
Bootstrap and calibration helpers that build and hold the instrument whose market quote they match. The class lives here, in the term-structure root module, because its instances span QuantLib.TermStructure.Yield, ".Inflation" and QuantLib.Model, and an instance must share a module with its class to stay non-orphan.
Associated Types
type HelperUnderlying h Source #
Methods
helperInstrument :: h -> IO (HelperUnderlying h) Source #
The instrument the helper prices. For helpers that build it internally --
fixedRateBondHelper and
cpiBondHelper among them -- this is the only way to reach it.
Instances
Arguments
| :: ZeroInflationTermStructure | |
| -> Day | |
| -> Bool | extrapolate |
| -> IO Double |
Zero-coupon inflation rate implied by the curve.