Mortgage basics

Introduction to Financial Concepts in Python

Dakota Wixom

Quantitative Finance Analyst

Taking out a mortgage

A mortage is a loan that covers the remaining cost of a home after paying a percentage of the home value as a down payment.

  • A typical down payment in the US is at least 20% of the home value
  • A typical US mortgage loan is paid off over 30 years

Example:

  • $500,000 house
  • 20% down ($100,000)
  • $400,000 remaining as a 30 year mortgage loan
Introduction to Financial Concepts in Python

Converting from an annual rate

To convert from an annual rate to a periodic rate:

$ {R}_{Periodic} = (1 + R_{Annual})^\frac{1}{N} - 1 $

  • R: Rate of Return (or Interest Rate)
  • N: Number of Payment Periods Per Year

Example:

Convert a 12% annual interest rate to the equivalent monthly rate.

$ (1 + 0.12)^\frac{1}{12} - 1 = 0.949\% \text{ monthly rate}$

Introduction to Financial Concepts in Python

Mortgage loan payments

You can use the NumPy function .pmt(rate, nper, pv) to compute the periodic mortgage loan payment.

Example:

Calculate the monthly mortgage payment of a $400,000 30 year loan at 3.8% interest:

import numpy as np
monthly_rate = ((1+0.038)**(1/12) - 1)
np.pmt(rate=monthly_rate, nper=12*30, pv=400000)
-1849.15
Introduction to Financial Concepts in Python

Let's practice!

Introduction to Financial Concepts in Python

Preparing Video For Download...