Section 3.3 Determining interest for any given payment
To determine the amount of interest in the kth payment, one can avoid having to compute the entire amortization schedule by computing the present value Pmid of the final n-k payments at the previous time period. This will be at the n-(k-1 Then, compute the interest demanded on that amount one time period later. That is, Pmidâ‹…r.
Pmid=R1−(1+r)−(n−(k+1))rPmid⋅r=R(1−(1+r)k−n−1)
xxxxxxxxxx
def roundup(x):
return (ceil(100*x)/100).n()
​
layout=dict(top=[['P', 'rate'],[ 'm', 't'],[' ','k']])) (
def _(P = input_box(10000,label='Principle',width=10),
m = input_box(12,label='Compounting Periods per year',width=6),
t = input_box(2,label='Number of Years',width=6),
rate = input_box(0.04,label='Yearly Interest Rate',width=6),
k = input_box(12,label='Payment Period',width=6)):
n = m*t
r = rate/m
R = roundup(P*r/(1-(1+r)^(-n)))
Bal = P
pretty_print(html('Monthly Payment is $%.2f$.'%(R)))
PsubK = R*(1-(1+r)^(k-n-1))/r
Interest = PsubK*r
Reduction = R - Interest
pretty_print(html('At the $%s$th '%str(k)+'payment period, Balance = $%.2f$'%(PsubK)+' requires interest of $%.2f$'%(Interest)+' and principle reduction of $%.2f$'%(Reduction)))