hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.TermStructure.Inflation

Synopsis

Types

type GenZeroInflationTermStructure z = GenTermStructure (AnyOf CZeroInflationTermStructure' z) Source #

A ZeroInflationTermStructure or one of its leaves; see the hierarchy under GenTermStructure.

type ZeroInflationTermStructure = GenZeroInflationTermStructure CZeroInflationTermStructure Source #

A TermStructure; see the hierarchy under GenTermStructure.

type PiecewiseZeroInflationCurve = GenZeroInflationTermStructure CPiecewiseZeroInflationCurve Source #

A ZeroInflationTermStructure bootstrapped from swap helpers, whose nodes can be read; see the hierarchy under GenTermStructure.

type GenYoYInflationTermStructure yoy = GenTermStructure (AnyOf CYoYInflationTermStructure' yoy) Source #

A YoYInflationTermStructure or one of its leaves; see the hierarchy under GenTermStructure.

type YoYInflationTermStructure = GenYoYInflationTermStructure CYoYInflationTermStructure Source #

A TermStructure; see the hierarchy under GenTermStructure.

type PiecewiseYoYInflationCurve = GenYoYInflationTermStructure CPiecewiseYoYInflationCurve Source #

A YoYInflationTermStructure bootstrapped from swap helpers, whose nodes can be read; see the hierarchy under GenTermStructure.

data CPIInterpolationType Source #

Constructors

CPIFlat 
CPILinear 

Instances

Instances details
Bounded CPIInterpolationType Source # 
Instance details

Defined in QuantLib.Internal.Common

Enum CPIInterpolationType Source #

How an overnight leg observes its index fixings. Shared by every overnight-leg producer: the swap constructors, the OIS rate helpers, and the cross-currency swaps. lookbackDays is Nothing for upstream's Null default, meaning the index's own fixing days.

Declared here rather than in a topical module because its producers span QuantLib.Instrument.Swap and QuantLib.TermStructure.Yield, whose build order cannot accommodate one importing the other.

Instance details

Defined in QuantLib.Internal.Common

Read CPIInterpolationType Source # 
Instance details

Defined in QuantLib.Internal.Common

Show CPIInterpolationType Source # 
Instance details

Defined in QuantLib.Internal.Common

Eq CPIInterpolationType Source # 
Instance details

Defined in QuantLib.Internal.Common

data InflationSwapPeriod Source #

Which dates an inflation swap helper's swap runs between. InflationSwapToMaturity starts on the evaluation date and moves with it; InflationSwapBetweenDates is fixed. The fixed form also takes its observation-interpolation weight from the start date rather than the maturity.

Constructors

InflationSwapToMaturity !Day

maturity

InflationSwapBetweenDates 

Fields

Seasonality

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

-> InflationSwapPeriod 
-> Calendar 
-> BusinessDayConvention

paymentConvention

-> DayCounter 
-> GenZeroInflationIndex zidx 
-> CPIInterpolationType

observationInterpolation

-> PillarChoice

pillar

-> Maybe Day

customPillarDate

-> IO ZeroCouponInflationSwapHelper 

Bootstrap helper for a zero-coupon inflation swap, at the given observation lag and period.

yearOnYearInflationSwapHelper Source #

Arguments

:: GenQuote q

quote

-> (Word, TimeUnit)

swapObsLag

-> InflationSwapPeriod 
-> Calendar 
-> BusinessDayConvention

paymentConvention

-> DayCounter 
-> GenYoYInflationIndex yidx 
-> 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).

cpiBondHelper Source #

Arguments

:: GenQuote q 
-> Word

settlementDays

-> Double

faceAmount

-> Double

baseCPI

-> (Word, TimeUnit)

observationLag

-> GenZeroInflationIndex zidx 
-> 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 #

Bootstraps a zero-inflation term structure piecewise from a set of helpers, interpolating between the bootstrapped nodes with the given Interpolation.

piecewiseYoyInflationCurve Source #

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.

Conversions

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

Instances details
HasHelperUnderlying BondHelper Source # 
Instance details

Defined in QuantLib.TermStructure

Associated Types

type HelperUnderlying BondHelper 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying OISRateHelper Source # 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying SwapRateHelper Source # 
Instance details

Defined in QuantLib.TermStructure

Associated Types

type HelperUnderlying SwapRateHelper 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying SwaptionHelper Source # 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying YearOnYearInflationSwapHelper Source # 
Instance details

Defined in QuantLib.TermStructure

HasHelperUnderlying ZeroCouponInflationSwapHelper Source # 
Instance details

Defined in QuantLib.TermStructure

zeroRate Source #

Arguments

:: GenZeroInflationTermStructure z 
-> Day 
-> Bool

extrapolate

-> IO Double 

Zero-coupon inflation rate implied by the curve.

yoyRate Source #

Arguments

:: GenYoYInflationTermStructure yoy 
-> Day 
-> Bool

extrapolate

-> IO Double 

Year-on-year inflation rate implied by the curve.

class HasImpliedQuoteOn helper curve where Source #

Inflation swap helpers paired with the only curve family each can reprice on.

Methods

impliedQuoteOn :: helper -> curve -> IO Double Source #

The swap rate that would make the helper reprice exactly on the given curve, bootstrapped from it or not.

class HasNodes c where Source #

Bootstrapped curve leaves that retain their native nodes. The class lives in this root module for the same reason as HasHelperUnderlying: its instances span the topical curve modules.

Methods

bootstrappedNodes :: c -> IO [(Day, Double)] Source #

The curve's (date, value) nodes; reading them runs the bootstrap. The first node is the reference date (inflation curves: the base date), the rest are helper pillars. Each value is what the curve interpolates: the trait's quantity for yield and default curves, a discount-factor spread for piecewiseSpreadYieldCurve, and the rate before seasonality for inflation curves. Jump factors are applied separately and are not part of the nodes.

An interpolated curve of the same kind on these nodes, with the original day counter, interpolation, jumps and seasonality, reproduces the bootstrapped curve. The exception is a local bootstrap, whose convex-monotone shape also depends on state the nodes do not carry.