hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.Index.Inflation

Synopsis

Types

Inflation index hierarchy

type GenInflationIndex iidx = GenIndex (AnyOf CInflationIndex' iidx) Source #

An InflationIndex or one of its leaves; see the hierarchy under GenIndex.

type InflationIndex = GenInflationIndex CInflationIndex Source #

An Index; see the hierarchy under GenIndex.

type GenZeroInflationIndex zidx = GenInflationIndex (AnyOf CZeroInflationIndex' zidx) Source #

A ZeroInflationIndex or one of its leaves; see the hierarchy under GenIndex.

type ZeroInflationIndex = GenZeroInflationIndex CZeroInflationIndex Source #

An InflationIndex; see the hierarchy under GenIndex.

type GenYoYInflationIndex yidx = GenInflationIndex (AnyOf CYoYInflationIndex' yidx) Source #

A YoYInflationIndex or one of its leaves; see the hierarchy under GenIndex.

type YoYInflationIndex = GenYoYInflationIndex CYoYInflationIndex Source #

An InflationIndex; see the hierarchy under GenIndex.

Regions

data Region Source #

Instances

Instances details
Show Region Source # 
Instance details

Defined in QuantLib.Internal.Type

Eq Region Source # 
Instance details

Defined in QuantLib.Internal.Type

Methods

(==) :: Region -> Region -> Bool #

(/=) :: Region -> Region -> Bool #

Configuration

data ZeroInflationIndexType Source #

data YoYInflationIndexType Source #

Constructors

Hierarchy and regions

region :: RegionType -> IO Region Source #

One of the 6 named geographical/economic regions QuantLib ships (used for the pre-baked named indices, e.g. UKRPI uses UKRegion internally). See 'region'' for an arbitrary custom region.

customRegion :: String -> String -> IO Region Source #

An arbitrary custom region, given its name and ISO code.

Inflation indices

zeroInflationIndex :: ZeroInflationIndexType -> IO ZeroInflationIndex Source #

A named zero inflation index (RPIHICPCPI family). Constructs with no historical fixings and no linked term structure -- add fixings via addFixing.

customZeroInflationIndex Source #

Arguments

:: String

familyName

-> Region 
-> Bool

revised

-> Frequency 
-> (Int, TimeUnit)

availabilityLag

-> Currency 
-> Maybe (GenZeroInflationTermStructure z) 
-> IO ZeroInflationIndex 

A custom zero inflation index (arbitrary family nameregioncurrency), with no historical fixings -- add fixings via addFixing.

yoyInflationIndex :: YoYInflationIndexType -> IO YoYInflationIndex Source #

A named quoted year-on-year inflation index.

customYoyInflationIndex Source #

Arguments

:: String

familyName

-> Region 
-> Bool

revised

-> Frequency 
-> (Int, TimeUnit)

availabilityLag

-> Currency 
-> Maybe (GenYoYInflationTermStructure yoy) 
-> IO YoYInflationIndex 

A custom quoted year-on-year inflation index (arbitrary family nameregioncurrency); needs its own past fixings added via addFixing. See yoyInflationIndexFromZero for a YoY index defined instead as a ratio of an existing ZeroInflationIndex's fixings.

yoyInflationIndexFromZero :: GenZeroInflationIndex zidx -> Maybe (GenYoYInflationTermStructure yoy) -> IO YoYInflationIndex Source #

A year-on-year index defined as the ratio of an existing ZeroInflationIndex's fixings; stores no fixings of its own.

Inspectors

class HasNeedsForecast idx where Source #

Zero and year-on-year inflation indexes; read their fixings with fixing.

Methods

needsForecast :: idx -> Day -> IO Bool Source #

Whether fixing at the given date would have to be forecast rather than served from a stored historical fixing -- true once the date falls after the latest period a fixing could plausibly already be published for, given the index's publication lag. Warning It raises an exception if the index was built with a frequency outside Annual..Monthly, which the inflation-period calculation does not handle.

Instances

Instances details
HasNeedsForecast (GenYoYInflationIndex yidx) Source # 
Instance details

Defined in QuantLib.Index.Inflation

HasNeedsForecast (GenZeroInflationIndex zidx) Source # 
Instance details

Defined in QuantLib.Index.Inflation