hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.InterestRate

Synopsis

Types

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

Instances details
Show AccrualPeriod Source # 
Instance details

Defined in QuantLib.InterestRate

Eq AccrualPeriod Source # 
Instance details

Defined in QuantLib.InterestRate

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

interestRate Source #

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. Both supported QuantLib versions reject SimpleThenCompounded and CompoundedThenSimple; use QuantLib.CashFlow calculations for these conventions.

discountFactor :: InterestRate -> AccrualPeriod -> IO Double Source #

Discount factor implied by the rate over the given period. Both supported QuantLib versions reject SimpleThenCompounded and CompoundedThenSimple; use QuantLib.CashFlow calculations for these conventions.

discountFactorSecondDerivative Source #

Arguments

:: InterestRate

rate

-> Double

t

-> IO Double 

Second derivative of the discount factor with respect to the rate at year fraction t. Requires QuantLib 1.44.

discountFactorFirstDerivative Source #

Arguments

:: InterestRate

rate

-> Double

t

-> IO Double 

First derivative of the discount factor with respect to the rate at year fraction t. Requires QuantLib 1.44.

equivalentRate :: InterestRate -> Compounding -> Frequency -> EquivalentPeriod -> IO InterestRate Source #

Equivalent rate under a different compounding and frequency over the given period. Both supported QuantLib versions reject mixed source compounding and non-unit factors with mixed result compounding; use QuantLib.CashFlow for these conventions.

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. Both supported QuantLib versions reject mixed result compounding for non-unit compound factors; use QuantLib.CashFlow calculations for SimpleThenCompounded and CompoundedThenSimple.

rate :: InterestRate -> Double Source #

the rate value of an interest rate.