Site icon R-bloggers

A shiny app to compare mortgage costs

[This article was first published on R – scottishsnow, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

When I moved house a couple of years ago I was frustrated that mortgage comparisons used monthly repayments and total cost of the mortgage to see which were better. This was frustrating because while monthly repayments tell you whether a mortgage is affordable, they don’t tell you how much the price is and total cost over the whole mortgage is useless.

To expand on why whole cost comparisons are useless: if you take out a 25 year mortgage, only the first few (e.g. 2) years are in a contract with a penalty for early termination. Often these first years are offered at a fixed interest rate, after which the mortgage reverts to the Bank of England interest rate, plus a profit margin for the bank. Country interest rates vary with time, so any estimate now is unlikely to be valid in 2 years time let alone 24 years! To compound this, the majority of the time period the estimate is based on is pure speculation.

To pay dues, ‘compare the market’ do compare total spent during the fixed period, although this is also tied up with loan repayment (not strictly speaking a cost, unless you’re offsetting against lost savings interest).

So, I put together a simple shiny app which compares the cost of different mortgages over a given period. One nice bonus is, you can compare the same mortgage and see how much you save by over paying each month and reducing the capital and hence interest.

Try the app here: https://mikerspencer.shinyapps.io/mortgage_calc/.

Inspect the code here: https://github.com/mikerspencer/mortgage_calc

Note: this app is not a replacement for professional financial advice!

To leave a comment for the author, please follow the link and comment on their blog: R – scottishsnow.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.