Header menu logo FSharp.Finance.Personal

UnitPeriod Module

an unambiguous way to represent regular date intervals and generate schedules based on them note: unit-period definitions are based on US federal legislation but the definitions are universally applicable

Types and nested modules

Type/Module Description

Config (Module)

functions for creating and handling unit-period configs

Config (Type)

unit period combined with a start date and multiple where appropriate

Direction

direction in which to generate the schedule: forward works forwards from a given date and reverse works backwards

TransactionTerm

a transaction term is the length of a transaction (i.e. a financial product), from the start date to the final payment

UnitPeriod

interval between payments

Functions and values

Function or value Description

all

Full Usage: all

Returns: (int * UnitPeriod)[]

all unit-periods, excluding unlikely ones (opinionated!)

Returns: (int * UnitPeriod)[]

commonLengths lengths

Full Usage: commonLengths lengths

Parameters:
    lengths : int array

Returns: (int * int)[]

lengths that occur more than once

lengths : int array
Returns: (int * int)[]

detect direction interval transferDates

Full Usage: detect direction interval transferDates

Parameters:
Returns: Config

for a given interval and array of dates, devise the unit-period config

direction : Direction
interval : UnitPeriod
transferDates : Date array
Returns: Config

generatePaymentSchedule count maxDuration direction unitPeriodConfig

Full Usage: generatePaymentSchedule count maxDuration direction unitPeriodConfig

Parameters:
Returns: Date[]

generate a payment schedule based on a unit-period config

count : int
maxDuration : Duration
direction : Direction
unitPeriodConfig : Config
Returns: Date[]

maxPaymentCount maxDuration config

Full Usage: maxPaymentCount maxDuration config

Parameters:
Returns: int

generates a suggested number of payments to constrain the loan within a certain duration

maxDuration : int<MeasureProduct<DurationDay, MeasureOne>>
config : Config
Returns: int

nearest term advanceDates paymentDates

Full Usage: nearest term advanceDates paymentDates

Parameters:
Returns: UnitPeriod

find the nearest unit-period according to the transaction term and transfer dates

term : TransactionTerm
advanceDates : Date[]
paymentDates : Date[]
Returns: UnitPeriod

normalise length

Full Usage: normalise length

Parameters:
    length : int

Returns: int * UnitPeriod

coerce a length to the nearest unit-period

length : int
Returns: int * UnitPeriod

numberPerYear _arg1

Full Usage: numberPerYear _arg1

Parameters:
Returns: decimal

number of unit-periods in a year

_arg1 : UnitPeriod
Returns: decimal

transactionTerm consummationDate firstFinanceChargeEarnedDate lastPaymentDueDate lastAdvanceScheduledDate

Full Usage: transactionTerm consummationDate firstFinanceChargeEarnedDate lastPaymentDueDate lastAdvanceScheduledDate

Parameters:
    consummationDate : Date
    firstFinanceChargeEarnedDate : Date
    lastPaymentDueDate : Date
    lastAdvanceScheduledDate : Date

Returns: TransactionTerm

calculate the transaction term based on specific events

consummationDate : Date
firstFinanceChargeEarnedDate : Date
lastPaymentDueDate : Date
lastAdvanceScheduledDate : Date
Returns: TransactionTerm

Type something to start searching.