Add new module Arrears.fs for financial accounts modelling#65
Conversation
Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/9ea8ac14-11cb-49bc-a552-d3ef942b9089 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/788bf183-1ad6-4345-b784-722b71e8d9b4 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
All three sections are complete and all 14 tests pass (commit Section 1 – Arrears balance tracking ( Section 2 – Default/penal interest ( Section 3 – Repayment arrangement modelling ( |
Adds
src/Arrears.fsimplementing FCA CONC 7 arrears, default interest, and forbearance modelling across three sections.Changes Made
Section 1 – Arrears balance tracking
ArrearsSummarystruct:ArrearsBalance,ArrearsStartDate,DaysInArrears,MonthsInArrears,MissedPaymentCount,ArrearsInterestcalculateArrearsSummary: derives the arrears position from an existing amortisation schedule; computes the running shortfall from missed/underpaid payments, days and months in arrears, and optional arrears interest at a configurable rateSection 2 – Default / penal interest
DefaultInterestRateDU:FixedRate of Rate|SpreadOverBase of BaseRate * Spread(spread adds annual percentage points to the base annual rate)DefaultInterestRate.toInterestRate: converts to a plainInterest.RateapplyDefaultInterest: injects the default rate as a promotional rate from a specified default date onward, returning a modifiedParametersrecordSection 3 – Repayment arrangement modelling
ForbearanceTreatmentDU:InterestFrozen|InterestReduced of Rate|InterestContinuedArrangementConfigrecord: arrangement start/end date, reduced payment amount, forbearance treatment, optional post-arrangement reschedule parametersArrangementResultstruct:ArrearsSummary,ArrangementSchedules,PostArrangementSchedules voptionmodelRepaymentArrangement: merges rescheduled reduced/suspended payments with forbearance promotional rates; optionally produces a return-to-normal schedule once the arrangement endsRegistration
Arrears.fsadded tosrc/FSharp.Finance.Personal.fsproj(afterRefinancing.fs)ArrearsTests.fsadded totests/FSharp.Finance.Personal.Tests.fsprojTesting
tests/ArrearsTests.fscovering all three sections — all pass