Header menu logo FSharp.Finance.Personal

Amortisation Module

calculating the principal balance over time, taking into account the effects of charges, interest and fee

Types and nested modules

Type/Module Description

FinalStats (Module)

final statistics resulting from the calculations

Schedule (Module)

a schedule showing the amortisation, itemising the effects of payments and calculating balances for each item, and producing some final statistics resulting from the calculations

ScheduleItem (Module)

amortisation schedule item showing apportionment of payments to principal, fee, interest and charges

Accumulator

a container for aggregating figures separately from the main schedule

BalanceStatus

the status of the balance on a given offset day

FinalStats (Type)

final statistics resulting from the calculations

GenerationResult

results of the amortisation schedule generation

Schedule (Type)

a schedule showing the amortisation, itemising the effects of payments and calculating balances for each item, and producing some final statistics resulting from the calculations

ScheduleItem (Type)

amortisation schedule item showing apportionment of payments to principal, fee, interest and charges

Functions and values

Function or value Description

calculateFee feeTotal appliedPaymentDay originalFinalPaymentDay

Full Usage: calculateFee feeTotal appliedPaymentDay originalFinalPaymentDay

Parameters:
Returns: int64<MeasureProduct<Cent, MeasureOne>>

calculates the total fee payable up to a particular day, based on a proportion of days elapsed vs total number of days in the original schedule

feeTotal : int64<MeasureProduct<Cent, MeasureOne>>
appliedPaymentDay : int<MeasureProduct<OffsetDay, MeasureOne>>
originalFinalPaymentDay : int<MeasureProduct<OffsetDay, MeasureOne>>
Returns: int64<MeasureProduct<Cent, MeasureOne>>

calculatePaymentDue si originalPayment rescheduledPayment extraPaymentsBalance interestPortionL minimumPayment

Full Usage: calculatePaymentDue si originalPayment rescheduledPayment extraPaymentsBalance interestPortionL minimumPayment

Parameters:
Returns: int64<MeasureProduct<Cent, MeasureOne>>

determines any payment due on the day

si : ScheduleItem
originalPayment : int64<MeasureProduct<Cent, MeasureOne>> voption
rescheduledPayment : RescheduledPayment voption
extraPaymentsBalance : int64<MeasureProduct<Cent, MeasureOne>>
interestPortionL : int64<MeasureProduct<Cent, MeasureOne>>
minimumPayment : MinimumPayment
Returns: int64<MeasureProduct<Cent, MeasureOne>>

calculateStats items

Full Usage: calculateStats items

Parameters:
Returns: Schedule

wraps the amortisation schedule in some statistics, and optionally calculates the final APR (optional because it can be processor-intensive)

items : Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ScheduleItem>
Returns: Schedule

calculateStatutoryFeeRebate sp appliedPayments initialStats appliedPaymentDay window

Full Usage: calculateStatutoryFeeRebate sp appliedPayments initialStats appliedPaymentDay window

Parameters:
Returns: int64<MeasureProduct<Cent, MeasureOne>>

for UK FCA-regulated agreements, calculates the fee rebate due

sp : Parameters
appliedPayments : Map<int<MeasureProduct<OffsetDay, MeasureOne>>, AppliedPayment>
initialStats : InitialStats
appliedPaymentDay : int<MeasureProduct<OffsetDay, MeasureOne>>
window : int
Returns: int64<MeasureProduct<Cent, MeasureOne>>

feePercentage principal feeTotal

Full Usage: feePercentage principal feeTotal

Parameters:
Returns: Percent

calculates the fee total as a percentage of the principal, for further calculation (weighting payments made when apportioning to fee and principal)

principal : int64<MeasureProduct<Cent, MeasureOne>>
feeTotal : int64<MeasureProduct<Cent, MeasureOne>>
Returns: Percent

generate sp settlementDay trimEnd actualPayments

Full Usage: generate sp settlementDay trimEnd actualPayments

Parameters:
Returns: GenerationResult

generates an amortisation schedule and final statistics

sp : Parameters
settlementDay : SettlementDay
trimEnd : bool
actualPayments : Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ActualPayment array>
Returns: GenerationResult

getBalanceStatus principalBalance

Full Usage: getBalanceStatus principalBalance

Parameters:
Returns: BalanceStatus

gets the balance status based on the principal balance

principalBalance : int64<MeasureProduct<Cent, MeasureOne>>
Returns: BalanceStatus

isSettledWithinGracePeriod sp settlementDay

Full Usage: isSettledWithinGracePeriod sp settlementDay

Parameters:
Returns: bool

determines whether a schedule is settled within any grace period (e.g. no interest may be due if settlement is made within three days of the advance)

sp : Parameters
settlementDay : SettlementDay
Returns: bool

markMissedPaymentsAsLate schedule

Full Usage: markMissedPaymentsAsLate schedule

Parameters:
Returns: Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ScheduleItem>

modifies missed payments or underpayments to reflect whether they are paid later in full or part or not at all within the payment window note: this is useful for credit reporting so as not to penalise those who pay late rather than not at all

schedule : Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ScheduleItem>
Returns: Map<int<MeasureProduct<OffsetDay, MeasureOne>>, ScheduleItem>

Active patterns

Active pattern Description

(|NotPaidAtAll|SomePaid|FullyPaid|) (actualPaymentTotal, paymentDueTotal)

Full Usage: (|NotPaidAtAll|SomePaid|FullyPaid|) (actualPaymentTotal, paymentDueTotal)

Parameters:
Returns: Choice<unit, int64<MeasureProduct<Cent, MeasureOne>>, unit>

pattern matching for payments due vs payments made

actualPaymentTotal : int64<MeasureProduct<Cent, MeasureOne>>
paymentDueTotal : int64<MeasureProduct<Cent, MeasureOne>>
Returns: Choice<unit, int64<MeasureProduct<Cent, MeasureOne>>, unit>

Type something to start searching.