Module Daml.Finance.Util.Date.DayCount

Functions

calcDcf

: DayCountConventionEnum -> Date -> Date -> Decimal

Calculates the day count fraction given the correponding convention. Currently 30E360 is not supported as we do not want to expose the maturity date of the product as an additional parameter.

calcPeriodDcf

: DayCountConventionEnum -> SchedulePeriod -> Bool -> Date -> ScheduleFrequency -> Decimal

Calculate day count fraction for a schedule period. It takes the following parameters:

  • DayCountConventionEnum: to specify which day count convention should be used
  • SchedulePeriod: the schedule period for which the day count fraction should be calculated
  • Bool: Whether day count fraction should be calculated on adjusted dates (if False: unadjusted dates)
  • Date: The maturity date of the instrument
  • Frequency: the frequency of the schedule period
calcPeriodDcfActActIsda

: SchedulePeriod -> Bool -> Date -> Decimal

Calculate Actual Actual day count fraction according to the ISDA method.

calcPeriodDcfActActIsma

: SchedulePeriod -> Bool -> Date -> ScheduleFrequency -> Decimal

Calculate Actual Actual day count fraction according to the ISMA method.

calcDcfActActAfb
: Date -> Date -> Decimal
calcDcfAct360
: Date -> Date -> Decimal
calcDcfAct365Fixed
: Date -> Date -> Decimal
calcDcfAct365L
: Date -> Date -> Decimal
calcDcf30360
: Date -> Date -> Decimal
calcDcf30360Icma
: Date -> Date -> Decimal
calcDcf30E360

: Bool -> Date -> Date -> Decimal

Calculate 30E/360 day count fraction.