Code covered by the BSD License  

Highlights from
Mortgage

4.2

4.2 | 5 ratings Rate this file 8 Downloads (last 30 days) File Size: 1.83 KB File ID: #16391

Mortgage

by Yi Cao

 

15 Sep 2007 (Updated 18 Feb 2008)

A small tool for mortgage calculation

| Watch this File

File Information
Description

A small tool for mortgage calculation. It takes loaned capital, fixed or variable interest rate and loan years to calculate monthly payment, annual payment, total payment and end of year balance. Annual and monthly interest calculation modes are implemented.

Acknowledgements
This submission has inspired the following:
Compute PSA-benchmarked prepayment metrics
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
18 Sep 2007 Dimitri Shvorob

How is it different from two prior similar FEX submissions? (The earliest is from 1999).

18 Sep 2007 Yi Cao

The difference is that with the new tool you can have variable interest rate specified through the rate vector. Previous submissions only work with a constant rate.

20 Sep 2007 Dimitri Shvorob

Your code failed to match the numbers for a sample scenario from Fabozzi (fixed-rate, level-payment, fully-amortized mortgage; loan = 100K, r = 8.125%, 30 years; you need to get a payment of 742.5), whereas MBSCFAMOUNTS of Fixed-Income Toolbox did. No surprise: you calculate annpay, not monthpay, and your monthpay is simply annpay/12, average monthly payment per year, not the actual monthly payment. Wanna fix the bug and resubmit?

20 Sep 2007 Dimitri Shvorob

(..and annpay calculation is incorrect)

21 Sep 2007 Yi Cao

Thanks for the comments. Two interest calculation modes, annual and monthly calculations implemented. Currently, monthly rate is calculated as annual rate/12. The results match the example given by Dimitri. However, more accurately, monthly rate should be (1+annual rate)^(1/12)-1, which will be lower than the previous calculation, hence results in lower monthly payment.

14 May 2008 Nandan Ramaswamy

Useful tool

05 Apr 2009 V. Poor  
Please login to add a comment or rating.
Updates
21 Sep 2007

to include monthly interest calculation mode.

18 Feb 2008

update descriptions

Tag Activity for this File
Tag Applied By Date/Time
finance Yi Cao 22 Oct 2008 09:27:08
modeling Yi Cao 22 Oct 2008 09:27:08
analysis Yi Cao 22 Oct 2008 09:27:08
mortgage Yi Cao 22 Oct 2008 09:27:08
equated monthly installments Yi Cao 22 Oct 2008 09:27:08
emi Yi Cao 22 Oct 2008 09:27:08

Contact us at files@mathworks.com