| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
QuantLib.InterestRate
Contents
Synopsis
- data InterestRate
- data Compounding
- data VolatilityType
- data AccrualPeriod
- = AccrualAtTime !Double
- | AccrualBetween !Day !Day !(Maybe Day) !(Maybe Day)
- data EquivalentPeriod
- = EquivalentAtTime !Double
- | EquivalentBetween !DayCounter !Day !Day !(Maybe Day) !(Maybe Day)
- interestRate :: Double -> DayCounter -> Compounding -> Frequency -> IO InterestRate
- compoundFactor :: InterestRate -> AccrualPeriod -> IO Double
- discountFactor :: InterestRate -> AccrualPeriod -> IO Double
- equivalentRate :: InterestRate -> Compounding -> Frequency -> EquivalentPeriod -> IO InterestRate
- impliedRate :: InterestRate -> Double -> DayCounter -> Compounding -> Frequency -> AccrualPeriod -> IO InterestRate
- rate :: InterestRate -> Double
Types
data InterestRate Source #
data Compounding Source #
Instances
| Enum Compounding Source # | |
Defined in QuantLib.InterestRate Methods succ :: Compounding -> Compounding # pred :: Compounding -> Compounding # toEnum :: Int -> Compounding # fromEnum :: Compounding -> Int # enumFrom :: Compounding -> [Compounding] # enumFromThen :: Compounding -> Compounding -> [Compounding] # enumFromTo :: Compounding -> Compounding -> [Compounding] # enumFromThenTo :: Compounding -> Compounding -> Compounding -> [Compounding] # | |
| Read Compounding Source # | |
Defined in QuantLib.InterestRate Methods readsPrec :: Int -> ReadS Compounding # readList :: ReadS [Compounding] # readPrec :: ReadPrec Compounding # readListPrec :: ReadPrec [Compounding] # | |
| Show Compounding Source # | |
Defined in QuantLib.InterestRate Methods showsPrec :: Int -> Compounding -> ShowS # show :: Compounding -> String # showList :: [Compounding] -> ShowS # | |
| Eq Compounding Source # | |
Defined in QuantLib.InterestRate | |
data VolatilityType Source #
Constructors
| ShiftedLognormal | |
| Normal |
Instances
data AccrualPeriod Source #
A compounding period: a year fraction in the rate's own day counter, or a date range.
Constructors
| AccrualAtTime !Double | |
| AccrualBetween !Day !Day !(Maybe Day) !(Maybe Day) | d1, d2, refStart, refEnd |
Instances
| Show AccrualPeriod Source # | |
Defined in QuantLib.InterestRate Methods showsPrec :: Int -> AccrualPeriod -> ShowS # show :: AccrualPeriod -> String # showList :: [AccrualPeriod] -> ShowS # | |
| Eq AccrualPeriod Source # | |
Defined in QuantLib.InterestRate Methods (==) :: AccrualPeriod -> AccrualPeriod -> Bool # (/=) :: AccrualPeriod -> AccrualPeriod -> Bool # | |
data EquivalentPeriod Source #
As AccrualPeriod, for equivalentRate: only the date form takes a result day counter,
the time form keeps the rate's own.
Constructors
| EquivalentAtTime !Double | |
| EquivalentBetween !DayCounter !Day !Day !(Maybe Day) !(Maybe Day) | resultDC, d1, d2, refStart, refEnd |
Constructors
Arguments
| :: Double | r |
| -> DayCounter | |
| -> Compounding | |
| -> Frequency | |
| -> IO InterestRate |
construct an interest rate from a rate value, a day counter, a compounding convention and a frequency.
Inspectors
compoundFactor :: InterestRate -> AccrualPeriod -> IO Double Source #
Compound (capitalization) factor implied by the rate over the given period.
discountFactor :: InterestRate -> AccrualPeriod -> IO Double Source #
Discount factor implied by the rate over the given period.
equivalentRate :: InterestRate -> Compounding -> Frequency -> EquivalentPeriod -> IO InterestRate Source #
Equivalent rate under a different compounding and frequency over the given period.
impliedRate :: InterestRate -> Double -> DayCounter -> Compounding -> Frequency -> AccrualPeriod -> IO InterestRate Source #
Rate implied by a given compound factor over the given period, in the supplied day counter.
rate :: InterestRate -> Double Source #
the rate value of an interest rate.