-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | HQuantLib Time is a business calendar functions extracted from HQuantLib -- -- HQuantLib is intended to be a functional style port of QuantLib -- (http://quantlib.org) @package hquantlib-time @version 0.1.0 module QuantLib.Time.Date -- | Business Day conventions - These conventions specify the algorithm -- used to adjust a date in case it is not a valid business day. data BusinessDayConvention Following :: BusinessDayConvention ModifiedFollowing :: BusinessDayConvention Preceding :: BusinessDayConvention ModifiedPreceding :: BusinessDayConvention Unadjusted :: BusinessDayConvention -- | The Modified Julian Day is a standard count of days, with zero being -- the day 1858-11-17. newtype () => Day ModifiedJulianDay :: Integer -> Day [toModifiedJulianDay] :: Day -> Integer -- | Defines a holidays for given calendar. Corresponds to calendar class -- in QuantLib class Holiday m isHoliday :: Holiday m => m -> (Integer, Int, Int) -> Bool isBusinessDay :: Holiday m => m -> Day -> Bool hBusinessDayBetween :: Holiday m => m -> (Day, Day) -> Int -- | Generate a list of all dates inbetween getDaysBetween :: (Day, Day) -> [Day] -- | Checks if the day is a weekend, i.e. Saturday or Sunday isWeekEnd :: Day -> Bool -- | Gets the next working day getNextBusinessDay :: Holiday a => a -> Day -> Day instance GHC.Enum.Enum QuantLib.Time.Date.BusinessDayConvention instance GHC.Classes.Eq QuantLib.Time.Date.BusinessDayConvention instance GHC.Show.Show QuantLib.Time.Date.BusinessDayConvention module QuantLib.Time.DayCounter -- | Day counter type class class DayCounter m -- | Name of day counter dcName :: DayCounter m => m -> String -- | Number of business days inbetween dcCount :: DayCounter m => m -> Day -> Day -> Int -- | Year fraction dcYearFraction :: DayCounter m => m -> Day -> Day -> Double -- | Thirty day counters as in QuantLib data Thirty360 ThirtyUSA :: Thirty360 ThirtyEuropean :: Thirty360 ThirtyItalian :: Thirty360 intGregorian :: Day -> (Int, Int, Int) instance QuantLib.Time.DayCounter.DayCounter QuantLib.Time.DayCounter.Thirty360 module QuantLib.Time