hasquant
Safe HaskellNone
LanguageHaskell2010

QuantLib.Time.Schedule

Synopsis

Types

data DayCounter Source #

Instances

Instances details
Show DayCounter Source # 
Instance details

Defined in QuantLib.Internal.Type

Eq DayCounter Source # 
Instance details

Defined in QuantLib.Internal.Type

data Schedule Source #

Instances

Instances details
Show Schedule Source # 
Instance details

Defined in QuantLib.Internal.Type

Eq Schedule Source # 
Instance details

Defined in QuantLib.Internal.Type

data DateGenerationRule Source #

Constructs a day counter of the given type and (where applicable) convention.

Constructors

schedule Source #

Arguments

:: Maybe Day

effectiveDate

-> Day

terminationDate

-> (Word, TimeUnit)

tenor

-> Calendar

calendar

-> BusinessDayConvention

convention

-> BusinessDayConvention

terminationDateConvention

-> DateGenerationRule

rule

-> Bool

endOfMonth

-> Maybe Day

firstDate

-> Maybe Day

nextToLastDate

-> IO Schedule 

Builds a payment schedule by generating dates between effective and termination dates according to the given tenor and rule.

fromDates Source #

Arguments

:: [Day] 
-> Calendar

calendar

-> BusinessDayConvention

convention

-> Maybe BusinessDayConvention

terminationDateConvention

-> Maybe (Word, TimeUnit)

tenor

-> Maybe DateGenerationRule

rule

-> Maybe Bool

endOfMonth

-> IO Schedule 

Builds a payment schedule from an explicit list of dates, without checking them for plausibility.

Inspectors

Day counts

days :: DayCounter -> Day -> Day -> IO Int Source #

Returns the number of days between two dates.

yearFraction Source #

Arguments

:: DayCounter 
-> Day 
-> Day 
-> Maybe Day

refPeriodStart

-> Maybe Day

refPeriodEnd

-> IO Double 

Returns the period between two dates as a fraction of year.

Schedule and period operations

until :: Schedule -> Day -> IO Schedule Source #

truncated schedule TODO Introduce another Schedule type with restricted interface? moreover, a fixed rate bond can be constructed from a full schedule only!

fromFrequency :: Frequency -> IO (Word, TimeUnit) Source #

returns a Period from a given Frequency (e.g. 6M from SemiAnnual)

toFrequency :: (Word, TimeUnit) -> IO Frequency Source #

returns a Frequency from a given Period (e.g. SemiAnnual from 6M)

parse :: String -> IO (Int, TimeUnit) Source #

Parses a period from its short-format string representation (e.g. "6M").

add :: (Int, TimeUnit) -> (Int, TimeUnit) -> IO (Int, TimeUnit) Source #

Adds two periods together.

divide :: (Int, TimeUnit) -> Int -> IO (Int, TimeUnit) Source #

Divides a period's length by an integer divisor.

lessThan :: (Int, TimeUnit) -> (Int, TimeUnit) -> IO Bool Source #

Compares two periods, converting to a common time unit as needed.

normalize :: (Int, TimeUnit) -> IO (Int, TimeUnit) Source #

Normalizes a period to the coarsest equivalent time unit (e.g. 12M to 1Y).

Schedule fields

dates :: Schedule -> IO [Day] Source #

returns the dates for the given Schedule object

Orphan instances