hquantlib-0.0.4.0: HQuantLib is a port of essencial parts of QuantLib to Haskell

Safe HaskellSafe
LanguageHaskell2010

QuantLib.Time

Synopsis

Documentation

class Holiday m where #

Defines a holidays for given calendar. Corresponds to calendar class in QuantLib

Minimal complete definition

isHoliday

Methods

isHoliday :: m -> (Integer, Int, Int) -> Bool #

isBusinessDay :: m -> Date -> Bool #

hBusinessDayBetween :: m -> (Date, Date) -> Int #

type Date = Day #

Date

data WeekDay #

Week days

Instances
Enum WeekDay # 
Instance details

Defined in QuantLib.Time.Date

Eq WeekDay # 
Instance details

Defined in QuantLib.Time.Date

Methods

(==) :: WeekDay -> WeekDay -> Bool #

(/=) :: WeekDay -> WeekDay -> Bool #

Show WeekDay # 
Instance details

Defined in QuantLib.Time.Date

getWeekDay :: Date -> WeekDay #

Gets a week day

getDaysBetween :: (Day, Day) -> [Day] #

Generate a list of all dates inbetween

isWeekEnd :: Date -> Bool #

Checks if the day is a weekend, i.e. Saturday or Sunday

getNextBusinessDay :: Holiday a => a -> Date -> Date #

Gets the next working day

data Thirty360 #

Thirty day counters as in QuantLib

Instances
DayCounter Thirty360 # 
Instance details

Defined in QuantLib.Time.DayCounter

class DayCounter m where #

Day counter type class

Minimal complete definition

dcName, dcCount, dcYearFraction

Methods

dcName :: m -> String #

Name of day counter

dcCount :: m -> Date -> Date -> Int #

Number of business days inbetween

dcYearFraction :: m -> Date -> Date -> Double #

Year fraction

Instances
DayCounter Thirty360 # 
Instance details

Defined in QuantLib.Time.DayCounter