| 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 ZeroInflationTermStructure -> IO ZeroInflationIndex
- yoyInflationIndex :: YoYInflationIndexType -> IO YoYInflationIndex
- customYoyInflationIndex :: String -> Region -> Bool -> Frequency -> (Int, TimeUnit) -> Currency -> Maybe YoYInflationTermStructure -> IO YoYInflationIndex
- yoyInflationIndexFromZero :: ZeroInflationIndex -> Maybe YoYInflationTermStructure -> IO YoYInflationIndex
- fixing :: ZeroInflationIndex -> Day -> IO Double
- yoyFixing :: YoYInflationIndex -> Day -> IO Double
- needsForecast :: ZeroInflationIndex -> Day -> IO Bool
- yoyNeedsForecast :: YoYInflationIndex -> 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 ZeroInflationTermStructure | |
| -> 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 YoYInflationTermStructure | |
| -> 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 :: ZeroInflationIndex -> Maybe YoYInflationTermStructure -> 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
fixing :: ZeroInflationIndex -> Day -> IO Double Source #
The (possibly forecast) fixing at the given date; for a date with no linked term
structure this returns the stored historical fixing added via addFixing.
yoyFixing :: YoYInflationIndex -> Day -> IO Double Source #
The (possibly forecast) year-on-year fixing at the given date; for a date with no linked
term structure this returns the stored historical fixing added via addFixing.
needsForecast :: ZeroInflationIndex -> 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.
yoyNeedsForecast :: YoYInflationIndex -> Day -> IO Bool Source #
The year-on-year counterpart of needsForecast, for yoyFixing.
Warning It raises an exception on an unhandled frequency, as needsForecast does.