Mortgage repayment model

The standard UK model seems to by a hybrid adjustable rate mortgage (hybrid ARM). There's a fixed, low percentage period at the beginning followed by a an ARM.

When the fixed rate has run out the ARM is calculated for the remaining principal (money to pay).


In [4]:
def monthly_rate(principal, r, t):
    return principal * r * (r+1)**t / ((r+1)**t - 1)

def principal_left(principal, r, A, t):
    return principal * (1+r)**t - sum(A * (1+r)**x for x in range(t))

In [12]:
def progression(principal, fixed_years, initial_rate, followup_rate, total_duration_month):
    A_initial = monthly_rate(principal, initial_rate, total_duration_month)
    left = principal_left(principal, initial_rate, A_initial, fixed_years)
    A_followup = monthly_rate(left, followup_rate, total_duration_month - fixed_years)
    return A_initial, A_followup

In [21]:
A_initial, A_followup = progression(250000, 5, 0.04/12, 0.06/12, 25 * 12)
print "You will pay {:.0f} pounds for 5 years and {:.0f} pounds for 20 years".format(A_initial, A_followup)


You will pay 1320 pounds for 5 years and 1607 pounds for 20 years

In [ ]: