Add payment holidays and partial overpayments to Refinancing.fs#53
Draft
Copilot wants to merge 4 commits into
Draft
Add payment holidays and partial overpayments to Refinancing.fs#53Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/3276f859-9319-4d96-88d8-8655f9634d59 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/3276f859-9319-4d96-88d8-8655f9634d59 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
…ts pass Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/18ef01a5-2d84-4e3a-92af-891676969bb0 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
Author
Continued and completed. The root cause was that All 10 new |
Copilot
AI
changed the title
[WIP] Add payment holidays and partial overpayments to Amortisation.fs
Add payment holidays and partial overpayments to Refinancing.fs
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends
Refinancing.fswith two new real-world lending scenarios.Changes Made
Payment holidays / deferrals (
paymentHoliday)DeferredInterestHandlingDU:CapitaliseAsNewPrincipal|SpreadOverRemainingTermPaymentHolidayParametersrecord:HolidayStartDay,HolidayEndDay,InterestHandling,SettlementDaypaymentHolidayfunction: zeroes scheduled payments during the holiday window and recomputes the post-holiday schedule using the chosen interest strategy — capitalising accrued holiday interest into the outstanding balance, or spreading the equivalent payment increase evenly over the remaining termPartial overpayments (
applyOverpayment)OverpaymentHandlingDU:ReduceTerm|ReducePaymentOverpaymentParametersrecord:OverpaymentHandling,SettlementDayapplyOverpaymentfunction: recomputes the remaining schedule after an overpayment to either shorten the term (same payment amount) or lower the regular payment amount (same number of remaining payments)Both functions return
{| OldSchedules; NewSchedules |}consistent with the existingrescheduleandrollOverfunctions, so statement generation and APR recalculation work correctly on the modified schedule.Tests
New
tests/RefinancingTests.fswith 10 passing tests covering all four scenarios and key edge cases (holiday window with no scheduled payments, over-clearing overpayment). Registered inFSharp.Finance.Personal.Tests.fsproj.Testing
dotnet build src/FSharp.Finance.Personal.fsproj)RefinancingTestspass