Skip to content

Add new module Arrears.fs for financial accounts modelling#65

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-arrears-module
Draft

Add new module Arrears.fs for financial accounts modelling#65
Copilot wants to merge 3 commits into
mainfrom
copilot/add-arrears-module

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 28, 2026

Adds src/Arrears.fs implementing FCA CONC 7 arrears, default interest, and forbearance modelling across three sections.

Changes Made

Section 1 – Arrears balance tracking

  • ArrearsSummary struct: ArrearsBalance, ArrearsStartDate, DaysInArrears, MonthsInArrears, MissedPaymentCount, ArrearsInterest
  • calculateArrearsSummary: 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 rate

Section 2 – Default / penal interest

  • DefaultInterestRate DU: FixedRate of Rate | SpreadOverBase of BaseRate * Spread (spread adds annual percentage points to the base annual rate)
  • DefaultInterestRate.toInterestRate: converts to a plain Interest.Rate
  • applyDefaultInterest: injects the default rate as a promotional rate from a specified default date onward, returning a modified Parameters record

Section 3 – Repayment arrangement modelling

  • ForbearanceTreatment DU: InterestFrozen | InterestReduced of Rate | InterestContinued
  • ArrangementConfig record: arrangement start/end date, reduced payment amount, forbearance treatment, optional post-arrangement reschedule parameters
  • ArrangementResult struct: ArrearsSummary, ArrangementSchedules, PostArrangementSchedules voption
  • modelRepaymentArrangement: merges rescheduled reduced/suspended payments with forbearance promotional rates; optionally produces a return-to-normal schedule once the arrangement ends

Registration

  • Arrears.fs added to src/FSharp.Finance.Personal.fsproj (after Refinancing.fs)
  • ArrearsTests.fs added to tests/FSharp.Finance.Personal.Tests.fsproj

Testing

  • ✅ Build succeeds with 0 warnings
  • ✅ 14 new tests in tests/ArrearsTests.fs covering all three sections — all pass

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>
Copilot AI requested a review from simontreanor April 28, 2026 23:30
Copy link
Copy Markdown
Owner

@simontreanor simontreanor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot continue

Copy link
Copy Markdown
Author

Copilot AI commented Apr 29, 2026

@copilot continue

All three sections are complete and all 14 tests pass (commit 10566ed):

Section 1 – Arrears balance tracking (calculateArrearsSummary): computes the running arrears balance from missed/underpaid payments, days and months in arrears, missed-payment count, and arrears interest at a configurable rate.

Section 2 – Default/penal interest (applyDefaultInterest): supports FixedRate and SpreadOverBase default rates; the effective rate is injected as a promotional rate from the specified default date onward.

Section 3 – Repayment arrangement modelling (modelRepaymentArrangement): builds a merged arrangement schedule with configurable forbearance treatment (InterestFrozen / InterestReduced / InterestContinued) and optionally generates a return-to-normal schedule once the arrangement ends.

Copilot AI changed the title [WIP] Add new module Arrears.fs for financial accounts modeling Add new module Arrears.fs for financial accounts modelling Apr 29, 2026
Copilot AI requested a review from simontreanor April 29, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New module: Arrears.fs (arrears balance, default interest, repayment arrangements)

2 participants