New module: Mortgage.fs — offset, equity release, and shared ownership calculations#64
Draft
Copilot wants to merge 2 commits into
Draft
New module: Mortgage.fs — offset, equity release, and shared ownership calculations#64Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…ity release, and shared ownership Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/fdb59fcf-07b5-43ae-a858-21b3e0570cd4 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new module: Mortgage.fs for mortgage product structures
New module: Mortgage.fs — offset, equity release, and shared ownership calculations
Apr 28, 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.
Adds a
Mortgagemodule implementing three specialist mortgage product structures not previously modelled in the library.Offset Mortgages
calculateOffsetMortgage: net interest-bearing balance (mortgage − linked savings), monthly payment/interest saving, estimated term reduction, and total interest comparison.Equity Release / Lifetime Mortgages
calculateEquityRelease: daily-compounding balance projection to a future date, voluntary partial repayments applied on their respective dates, and no-negative-equity guarantee (NNEG) modelling (balance capped at property value, with a trigger flag).Shared Ownership
calculateSharedOwnershipOutgoing: blended monthly outgoing = mortgage payment + rent on unowned share.calculateStaircasing: cost of an additional tranche, updated owned/unowned shares, reduced rent, and new mortgage payment after staircasing.calculateTotalCostComparison: total cost over a given horizon vs. equivalent outright-purchase mortgage.Usage sketch
All monetary values use
int64<Cent>consistent with the rest of the library; percentages usePercent.