| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.Index.InterestRate
Synopsis
- type GenInterestRateIndex ridx = GenIndex (AnyOf CInterestRateIndex' ridx)
- type InterestRateIndex = GenInterestRateIndex CInterestRateIndex
- type GenIborIndex ibor = GenInterestRateIndex (AnyOf CIborIndex' ibor)
- type IborIndex = GenIborIndex CIborIndex
- type GenSwapIndex sidx = GenInterestRateIndex (AnyOf CSwapIndex' sidx)
- type SwapIndex = GenSwapIndex CSwapIndex
- type BMAIndex = GenInterestRateIndex CBMAIndex
- type OvernightIborIndex = GenIborIndex COvernightIndex
- type SwapSpreadIndex = GenInterestRateIndex CSwapSpreadIndex
- type OvernightIndexedSwapIndex = GenSwapIndex COvernightIndexedSwapIndex
- bmaIndex :: Maybe (GenYieldTermStructure y) -> IO BMAIndex
- asInterestRateIndex :: GenInterestRateIndex ridx -> IO InterestRateIndex
- asIborIndex :: GenIborIndex ibor -> IO IborIndex
- asSwapIndex :: GenSwapIndex sidx -> IO SwapIndex
- data OvernightIborIndexType
- overnightIborIndex :: OvernightIborIndexType -> Maybe (GenYieldTermStructure y) -> IO OvernightIborIndex
- data LiborSwapIndexType
- liborSwapIndex :: LiborSwapIndexType -> (Int, TimeUnit) -> Maybe (GenYieldTermStructure y1) -> Maybe (GenYieldTermStructure y2) -> IO SwapIndex
- overnightIndexedSwapIndex :: String -> (Int, TimeUnit) -> Word -> Currency -> OvernightIborIndex -> Bool -> RateAveragingType -> IO OvernightIndexedSwapIndex
- swapIndex :: String -> (Int, TimeUnit) -> Word -> Currency -> Calendar -> (Int, TimeUnit) -> BusinessDayConvention -> DayCounter -> GenIborIndex ibor -> IO SwapIndex
- swapIndexWithDiscountCurve :: String -> (Int, TimeUnit) -> Word -> Currency -> Calendar -> (Int, TimeUnit) -> BusinessDayConvention -> DayCounter -> GenIborIndex ibor -> GenYieldTermStructure y -> IO SwapIndex
- swapSpreadIndex :: String -> GenSwapIndex sidx1 -> GenSwapIndex sidx2 -> Double -> Double -> IO SwapSpreadIndex
- data IborConstructor where
- Bbsw !(Word, TimeUnit)
- Bibor !(Word, TimeUnit)
- Bkbm !(Word, TimeUnit)
- Cdor !(Word, TimeUnit)
- EurLibor !(Word, TimeUnit)
- AudLibor !(Word, TimeUnit)
- CadLibor !(Word, TimeUnit)
- ChfLibor !(Word, TimeUnit)
- DkkLibor !(Word, TimeUnit)
- GbpLibor !(Word, TimeUnit)
- JpyLibor !(Word, TimeUnit)
- NzdLibor !(Word, TimeUnit)
- SekLibor !(Word, TimeUnit)
- UsdLibor !(Word, TimeUnit)
- Euribor !(Word, TimeUnit)
- Euribor365 !(Word, TimeUnit)
- Jibar !(Word, TimeUnit)
- Mosprime !(Word, TimeUnit)
- Pribor !(Word, TimeUnit)
- Robor !(Word, TimeUnit)
- Shibor !(Word, TimeUnit)
- THBFIX !(Word, TimeUnit)
- TRLibor !(Word, TimeUnit)
- Tibor !(Word, TimeUnit)
- Wibor !(Word, TimeUnit)
- Zibor !(Word, TimeUnit)
- Nibor !(Word, TimeUnit)
- EurDailyTenorLibor !Word
- ChfDailyTenorLibor !Word
- GbpDailyTenorLibor !Word
- JpyDailyTenorLibor !Word
- UsdDailyTenorLibor !Word
- CadLiborON
- EurLiborON
- GbpLiborON
- UsdLiborON
- Ibor String (Word, TimeUnit) Word Currency Calendar BusinessDayConvention Bool DayCounter
- Libor String (Word, TimeUnit) Word Currency Calendar DayCounter
- DailyTenorLibor String Word Currency Calendar DayCounter
- CustomIbor String (Word, TimeUnit) Word Currency Calendar Calendar Calendar BusinessDayConvention Bool DayCounter
- pattern Bbsw1M :: IborConstructor
- pattern Bbsw2M :: IborConstructor
- pattern Bbsw3M :: IborConstructor
- pattern Bbsw4M :: IborConstructor
- pattern Bbsw5M :: IborConstructor
- pattern Bbsw6M :: IborConstructor
- pattern BiborSW :: IborConstructor
- pattern Bibor1M :: IborConstructor
- pattern Bibor2M :: IborConstructor
- pattern Bibor3M :: IborConstructor
- pattern Bibor6M :: IborConstructor
- pattern Bibor9M :: IborConstructor
- pattern Bibor1Y :: IborConstructor
- pattern Bkbm1M :: IborConstructor
- pattern Bkbm2M :: IborConstructor
- pattern Bkbm3M :: IborConstructor
- pattern Bkbm4M :: IborConstructor
- pattern Bkbm5M :: IborConstructor
- pattern Bkbm6M :: IborConstructor
- pattern EuriborSW :: IborConstructor
- pattern Euribor2W :: IborConstructor
- pattern Euribor3W :: IborConstructor
- pattern Euribor1M :: IborConstructor
- pattern Euribor2M :: IborConstructor
- pattern Euribor3M :: IborConstructor
- pattern Euribor4M :: IborConstructor
- pattern Euribor5M :: IborConstructor
- pattern Euribor6M :: IborConstructor
- pattern Euribor7M :: IborConstructor
- pattern Euribor8M :: IborConstructor
- pattern Euribor9M :: IborConstructor
- pattern Euribor10M :: IborConstructor
- pattern Euribor11M :: IborConstructor
- pattern Euribor1Y :: IborConstructor
- pattern Euribor365_SW :: IborConstructor
- pattern Euribor365_2W :: IborConstructor
- pattern Euribor365_3W :: IborConstructor
- pattern Euribor365_1M :: IborConstructor
- pattern Euribor365_2M :: IborConstructor
- pattern Euribor365_3M :: IborConstructor
- pattern Euribor365_4M :: IborConstructor
- pattern Euribor365_5M :: IborConstructor
- pattern Euribor365_6M :: IborConstructor
- pattern Euribor365_7M :: IborConstructor
- pattern Euribor365_8M :: IborConstructor
- pattern Euribor365_9M :: IborConstructor
- pattern Euribor365_10M :: IborConstructor
- pattern Euribor365_11M :: IborConstructor
- pattern Euribor365_1Y :: IborConstructor
- pattern EurLiborSW :: IborConstructor
- pattern EurLibor2W :: IborConstructor
- pattern EurLibor1M :: IborConstructor
- pattern EurLibor2M :: IborConstructor
- pattern EurLibor3M :: IborConstructor
- pattern EurLibor4M :: IborConstructor
- pattern EurLibor5M :: IborConstructor
- pattern EurLibor6M :: IborConstructor
- pattern EurLibor7M :: IborConstructor
- pattern EurLibor8M :: IborConstructor
- pattern EurLibor9M :: IborConstructor
- pattern EurLibor10M :: IborConstructor
- pattern EurLibor11M :: IborConstructor
- pattern EurLibor1Y :: IborConstructor
- iborIndex :: IborConstructor -> Maybe (GenYieldTermStructure y) -> IO IborIndex
- overnightIndex :: String -> Word -> Currency -> Calendar -> DayCounter -> Maybe (GenYieldTermStructure y) -> IO OvernightIborIndex
- fixingSchedule :: BMAIndex -> Day -> Day -> IO Schedule
- forecastFixing :: GenInterestRateIndex ridx -> Day -> IO Double
- currency :: GenInterestRateIndex ridx -> IO Currency
- dayCounter :: GenInterestRateIndex ridx -> IO DayCounter
- fixingDays :: GenInterestRateIndex ridx -> Word
- tenor :: GenInterestRateIndex ridx -> IO (Word, TimeUnit)
- fixingDate :: GenInterestRateIndex ridx -> Day -> IO Day
- valueDate :: GenInterestRateIndex ridx -> Day -> IO Day
- maturityDate :: GenInterestRateIndex ridx -> Day -> IO Day
- businessDayConvention :: GenIborIndex ibor -> BusinessDayConvention
- endOfMonth :: GenIborIndex ibor -> Bool
- underlyingSwap :: GenSwapIndex sidx -> Day -> IO VanillaSwap
- underlyingOis :: OvernightIndexedSwapIndex -> Day -> IO OvernightIndexedSwap
- historicalRatesAnalysis :: Day -> Day -> (Int, TimeUnit) -> NonEmpty (GenInterestRateIndex ridx) -> IO HistoricalIndexAnalysis
Types
Interest-rate index hierarchy
type GenInterestRateIndex ridx = GenIndex (AnyOf CInterestRateIndex' ridx) Source #
An InterestRateIndex or one of its leaves; see the hierarchy under GenIndex.
type InterestRateIndex = GenInterestRateIndex CInterestRateIndex Source #
type GenIborIndex ibor = GenInterestRateIndex (AnyOf CIborIndex' ibor) Source #
type IborIndex = GenIborIndex CIborIndex Source #
An InterestRateIndex; see the hierarchy under GenIndex.
type GenSwapIndex sidx = GenInterestRateIndex (AnyOf CSwapIndex' sidx) Source #
type SwapIndex = GenSwapIndex CSwapIndex Source #
An InterestRateIndex; see the hierarchy under GenIndex.
type BMAIndex = GenInterestRateIndex CBMAIndex Source #
An InterestRateIndex; see the hierarchy under GenIndex.
type OvernightIborIndex = GenIborIndex COvernightIndex Source #
type SwapSpreadIndex = GenInterestRateIndex CSwapSpreadIndex Source #
An InterestRateIndex; see the hierarchy under GenIndex.
type OvernightIndexedSwapIndex = GenSwapIndex COvernightIndexedSwapIndex Source #
Constructors
BMA indices
bmaIndex :: Maybe (GenYieldTermStructure y) -> IO BMAIndex Source #
Creates the BMA (Bond Market Association) short-term tax-exempt index, optionally linked to a forwarding curve.
Hierarchy conversion
asIborIndex :: GenIborIndex ibor -> IO IborIndex Source #
asSwapIndex :: GenSwapIndex sidx -> IO SwapIndex Source #
Overnight and swap indices
data OvernightIborIndexType Source #
Constructors
| Aonia | |
| Eonia | |
| Estr | |
| FedFunds | |
| Nzocr | |
| Sofr | |
| Sonia | |
| Cdi | |
| Corra | |
| Kofr | |
| Destr | |
| Swestr | |
| Shir | |
| Tonar | |
| Saron | |
| Zaronia |
Instances
overnightIborIndex :: OvernightIborIndexType -> Maybe (GenYieldTermStructure y) -> IO OvernightIborIndex Source #
Creates one of the built-in overnight indexes (e.g. Sofr, Estr, Sonia), optionally linked to a forwarding curve.
data LiborSwapIndexType Source #
Constructors
Instances
Arguments
| :: LiborSwapIndexType | |
| -> (Int, TimeUnit) | |
| -> Maybe (GenYieldTermStructure y1) | forwarding |
| -> Maybe (GenYieldTermStructure y2) | discounting |
| -> IO SwapIndex |
Creates one of the built-in ISDA-fix swap-rate indexes for a given tenor, with separate forwarding and discounting curves.
overnightIndexedSwapIndex :: String -> (Int, TimeUnit) -> Word -> Currency -> OvernightIborIndex -> Bool -> RateAveragingType -> IO OvernightIndexedSwapIndex Source #
Construct an overnight-indexed swap index. The private binding marshals
RateAveragingType as an Int to avoid a c2hs cross-module enum-import cycle.
Arguments
| :: String | |
| -> (Int, TimeUnit) | |
| -> Word | settlementDays |
| -> Currency | |
| -> Calendar | |
| -> (Int, TimeUnit) | fixedLegTenor |
| -> BusinessDayConvention | |
| -> DayCounter | |
| -> GenIborIndex ibor | |
| -> IO SwapIndex |
Creates a swap-rate index whose forwarding and discounting both come from the underlying ibor index's curve.
swapIndexWithDiscountCurve Source #
Arguments
| :: String | familyName |
| -> (Int, TimeUnit) | tenor |
| -> Word | settlementDays |
| -> Currency | |
| -> Calendar | |
| -> (Int, TimeUnit) | fixedLegTenor |
| -> BusinessDayConvention | fixedLegConvention |
| -> DayCounter | fixedLegDayCounter |
| -> GenIborIndex ibor | |
| -> GenYieldTermStructure y | |
| -> IO SwapIndex |
Creates a swap-rate index with a discounting curve distinct from the forwarding curve of the underlying ibor index.
Arguments
| :: String | familyName |
| -> GenSwapIndex sidx1 | swapIndex1 |
| -> GenSwapIndex sidx2 | swapIndex2 |
| -> Double | gearing1 |
| -> Double | gearing2 |
| -> IO SwapSpreadIndex |
Interest-rate index equal to gearing1 * swapIndex1 + gearing2 * swapIndex2. It has no
native fixing history: a historical fixing is available only when both component swap indexes
have one.
Ibor index catalogue
data IborConstructor Source #
Constructors
Bundled Patterns
Instances
| Read IborConstructor Source # | |
Defined in QuantLib.Index.InterestRate Methods readsPrec :: Int -> ReadS IborConstructor # readList :: ReadS [IborConstructor] # | |
| Show IborConstructor Source # | |
Defined in QuantLib.Index.InterestRate Methods showsPrec :: Int -> IborConstructor -> ShowS # show :: IborConstructor -> String # showList :: [IborConstructor] -> ShowS # | |
| Eq IborConstructor Source # | |
Defined in QuantLib.Index.InterestRate Methods (==) :: IborConstructor -> IborConstructor -> Bool # (/=) :: IborConstructor -> IborConstructor -> Bool # | |
iborIndex :: IborConstructor -> Maybe (GenYieldTermStructure y) -> IO IborIndex Source #
Arguments
| :: String | |
| -> Word | settlementDays |
| -> Currency | |
| -> Calendar | |
| -> DayCounter | |
| -> Maybe (GenYieldTermStructure y) | |
| -> IO OvernightIborIndex |
Creates a generic overnight index, optionally linked to a forwarding curve.
Inspectors
Index dates and conventions
fixingSchedule :: BMAIndex -> Day -> Day -> IO Schedule Source #
This method returns a schedule of fixing dates between start and end.
forecastFixing :: GenInterestRateIndex ridx -> Day -> IO Double Source #
It can be overridden to implement particular conventions.
currency :: GenInterestRateIndex ridx -> IO Currency Source #
Returns the index's underlying currency.
dayCounter :: GenInterestRateIndex ridx -> IO DayCounter Source #
Returns the day counter used by the index.
fixingDays :: GenInterestRateIndex ridx -> Word Source #
Returns the number of business days between a fixing date and the corresponding value date.
Arguments
| :: GenInterestRateIndex ridx | index |
| -> Day | valueDate |
| -> IO Day |
Returns the fixing date corresponding to a value date, using this index's convention-specific business-day rules. Concrete indexes can override the base calculation.
Arguments
| :: GenInterestRateIndex ridx | index |
| -> Day | fixingDate |
| -> IO Day |
Returns the value date corresponding to a fixing date, using this index's
convention-specific business-day rules. Throws when fixingDate is not a
valid fixing day for the index.
Arguments
| :: GenInterestRateIndex ridx | index |
| -> Day | valueDate |
| -> IO Day |
Returns the maturity date corresponding to a value date. This is a concrete-index calculation: Ibor, Libor, swap, and custom indexes can each apply their own tenor, calendar, and end-of-month conventions.
businessDayConvention :: GenIborIndex ibor -> BusinessDayConvention Source #
Returns the business day convention used to adjust the index's value/maturity dates.
endOfMonth :: GenIborIndex ibor -> Bool Source #
Returns whether the index's date calculations roll to the end of the month.
Underlying swaps and history
underlyingSwap :: GenSwapIndex sidx -> Day -> IO VanillaSwap Source #
Returns the vanilla swap underlying the index for a given fixing date. Relinking the index's term structure afterwards has no effect on the returned swap.
underlyingOis :: OvernightIndexedSwapIndex -> Day -> IO OvernightIndexedSwap Source #
Returns the overnight-indexed swap underlying the index for a given fixing date. Relinking the index's term structure afterwards has no effect on the returned swap.
historicalRatesAnalysis :: Day -> Day -> (Int, TimeUnit) -> NonEmpty (GenInterestRateIndex ridx) -> IO HistoricalIndexAnalysis Source #
Convenience wrapper: historicalIndexAnalysis specialised to interest-rate indexes.