See updated formula at:
This post is just to show you 20-somethings what we had to go through to calculate the price of a mortgage backed security back in the day. I had the first desktop computer (before Apple and Radio Shack were available), the Commodore PET (Personal Electronic Transactor). I had 8K of memory (not 8 gigabytes, 8K) and tape storage. There were no spreadsheets available at that time, just “Basic” (Beginner’s All-purpose Symbolic Instruction Code). It was a relatively easy shift for me to VBA when the time came, because VBA was built off Basic.
As you can imagine, conserving memory was very important. I am not a mathematician and I don’t remember were I found it, but this is the formula I used to calculate the price of an mortgage backed security (MBS) including a constant prepayment rate (CPR) and servicing fees:
I thought it was pretty slick. This formula is obviously written in one cell on an Excel spreadsheet, not math symbols as I originally found it. It looks different in a basic program. When I needed yield given price, I built an iteration that narrowed in on the answer after 25 passes and after over a minute or two of calculating.
The workbook “Formula” uses goal seek to solve for yield.
A few explanations.
1. The “mortgage rate yield” is the market yield, expressed on a monthly compound basis.
2. The CPR is enter as above, not as a percentage.
3. Mortgages are paid in arrears, so a regular loan’s payment is due 30 days after it is issued. If you want to include the 14 day grace period (until the 15th of the month), you would enter 44 (30+14). Each MBA issuer has it’s own number of delay days before you are paid. A small list is included on the spreadsheet.
4. Service fee is the amount of interest the issuer keeps for servicing the loans. You can also add in guarantee fees here. Although the default is entered as .25, it is actually 25 basis points or .25%. The formula adjusted the number to a percent.
Try it just for fun!
Download workbook “Formula” from:
Downloads Written in Excel 2013