| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Index.Inflation
Synopsis
- type GenInflationIndex iidx = GenIndex (AnyOf CInflationIndex' iidx)
- type InflationIndex = GenInflationIndex CInflationIndex
- type GenZeroInflationIndex zidx = GenInflationIndex (AnyOf CZeroInflationIndex' zidx)
- type ZeroInflationIndex = GenZeroInflationIndex CZeroInflationIndex
- type GenYoYInflationIndex yidx = GenInflationIndex (AnyOf CYoYInflationIndex' yidx)
- type YoYInflationIndex = GenYoYInflationIndex CYoYInflationIndex
- data Region
- data RegionType
- data ZeroInflationIndexType
- data YoYInflationIndexType
- asInflationIndex :: GenInflationIndex iidx -> IO InflationIndex
- region :: RegionType -> IO Region
- customRegion :: String -> String -> IO Region
- zeroInflationIndex :: ZeroInflationIndexType -> IO ZeroInflationIndex
- customZeroInflationIndex :: String -> Region -> Bool -> Frequency -> (Int, TimeUnit) -> Currency -> Maybe (GenZeroInflationTermStructure z) -> IO ZeroInflationIndex
- yoyInflationIndex :: YoYInflationIndexType -> IO YoYInflationIndex
- customYoyInflationIndex :: String -> Region -> Bool -> Frequency -> (Int, TimeUnit) -> Currency -> Maybe (GenYoYInflationTermStructure yoy) -> IO YoYInflationIndex
- yoyInflationIndexFromZero :: GenZeroInflationIndex zidx -> Maybe (GenYoYInflationTermStructure yoy) -> IO YoYInflationIndex
- class HasNeedsForecast idx where
- needsForecast :: idx -> Day -> IO Bool
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 #
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 RegionType Source #
Constructors
| AustraliaRegion | |
| EURegion | |
| FranceRegion | |
| UKRegion | |
| USRegion | |
| ZARegion |
Instances
| Bounded RegionType Source # | |
Defined in QuantLib.Index.Inflation | |
| Enum RegionType Source # | |
Defined in QuantLib.Index.Inflation Methods succ :: RegionType -> RegionType # pred :: RegionType -> RegionType # toEnum :: Int -> RegionType # fromEnum :: RegionType -> Int # enumFrom :: RegionType -> [RegionType] # enumFromThen :: RegionType -> RegionType -> [RegionType] # enumFromTo :: RegionType -> RegionType -> [RegionType] # enumFromThenTo :: RegionType -> RegionType -> RegionType -> [RegionType] # | |
| Read RegionType Source # | |
Defined in QuantLib.Index.Inflation Methods readsPrec :: Int -> ReadS RegionType # readList :: ReadS [RegionType] # readPrec :: ReadPrec RegionType # readListPrec :: ReadPrec [RegionType] # | |
| Show RegionType Source # | |
Defined in QuantLib.Index.Inflation Methods showsPrec :: Int -> RegionType -> ShowS # show :: RegionType -> String # showList :: [RegionType] -> ShowS # | |
| Eq RegionType Source # | |
Defined in QuantLib.Index.Inflation | |
Configuration
data ZeroInflationIndexType Source #
Instances
data YoYInflationIndexType Source #
Instances
Constructors
Hierarchy and regions
asInflationIndex :: GenInflationIndex iidx -> IO InflationIndex Source #
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
| HasNeedsForecast (GenYoYInflationIndex yidx) Source # | |
Defined in QuantLib.Index.Inflation Methods needsForecast :: GenYoYInflationIndex yidx -> Day -> IO Bool Source # | |
| HasNeedsForecast (GenZeroInflationIndex zidx) Source # | |
Defined in QuantLib.Index.Inflation Methods needsForecast :: GenZeroInflationIndex zidx -> Day -> IO Bool Source # | |