File Exchange

image thumbnail

All Purpose Mortgage Calculator including mortgage schedule

version 1.1 (133 KB) by

This calculator gives you all the information you need to know while shopping for a mortgage Loan

6 Downloads

Updated

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Please let me know if you have any problems with this calculator. I will be more than willing to answer.Type ALLMORTGAGEF to bring up the GUI. even though this is made for a 30-year mortgage loan, people can also use it to analyze a shorter loan.

Comments and Ratings (9)

mm

mm (view profile)

The inability to plot and populate the table for loans less than 25 years is due to the code that updates the Yearly Balances fields. Using simple if/then for each field fixes this:

if Loan_Period >=1
set(handles.edit10,'String',num2str(index_balance(12)));
end
if Loan_Period >=3
set(handles.edit12,'String',num2str(index_balance(12*3)));
end
if Loan_Period >=5
set(handles.edit14,'String',num2str(index_balance(12*5)));
end
if Loan_Period >=10
set(handles.edit37,'String',num2str(index_balance(12*10)));
end
if Loan_Period >=15
set(handles.edit23,'String',num2str(index_balance(12*15)));
end
if Loan_Period >=20
set(handles.edit38,'String',num2str(index_balance(12*20)));
end
if Loan_Period >=25
set(handles.edit32,'String',num2str(index_balance(12*25)));
end

kuro

kuro (view profile)

jp Athanas

Very nice, everything is well presented in the GUI. but could you comment more your code or just make a small description for each section....

Rob Wilson

Nice! 2 comments - you assume currency is dollars - not a major issue - a number is a number and maths works the same in all currencies. :-)
The 'spreadsheet' like section has numbers in scientific format, ie. $57,000 is shown as 5.7000e+04 which is just harder to read.
Putting in my own mortgage details and it was nearly spot on, with a slight difference in monthly payments, but within $2.
The reason - my bank (in Britain) does interest daily rather than monthly - and I think that accounts for it.
So a future wish list for this excellent tool:
1. Daily or Monthly interest calculations (maybe with an editable list of national holidays when no interest is calculated - but that's getting a bit complex)
2. What happens if you make an overpayment of $200 (or whatever) per month, how much shorter does the term get.
3. An option to put in how many months you are in to your mortgage and current balance, to see how far ahead you are of the original term - or to see what effect over-payments have from your current position.
4. An option to specify a different overpayment on a month by month level for the entire term of the loan to see what effect that has.
5. British mortgages are often 'fixed-term' for a few years, then variable, ie. fixed at 5% for 5 years, then goes to 6% for the rest of the term. That'd be nice to put in too.

This is already an excellent tool - guess my wish list would allow me to play with various over-payment strategies to see which works the best for me - but is far more than the general user would want. :-)

Bela Kovacs

It seems to me that the graph and the spreadsheet are updated only when the loan period is at least 30y. I tried to look for the section of the code which is responsible for this, but couldn't find it. Can you help me out?

Matthew Arsenault

Well done, everything all in one screen. This is exactly what i was looking for (but was afraid i would have to try to write)!

Eric Li

James Hensman

Victor Martinez

How do you open this file? What do you run it with?

Updates

1.1

Updated to include an App file for R2012b

MATLAB Release
MATLAB 8.0 (R2012b)
Acknowledgements

Inspired: Compute PSA-benchmarked prepayment metrics

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video