1

I need to calculate apr in the uk using this formula

http://en.m.wikipedia.org/wiki/Annual_percentage_rate#European_Union

Ive been advised to try the binary chop method but I have no idea how to do this. Ive seen examples on line but they are based on US calculation for apr. I don't really know where to begin. Im not from finance or maths background but I did some maths at uni. I think im more confused by the finance side of things and the unfamiliar terminology.

Please could you give a simple algorithm of how to solve the apr. I have monthly payments, arrangement fee which can be added to first payment and a closing fee which is added to last payment. The overall loan is at a flat rate of interest.

Thanks in advance for any help

Gerry Myerson
  • 179,216

1 Answers1

1

See (How to calculate APR using Newton Raphson)

I like single letter variables for formulas, so

T -- loan amount or principal;
n -- number of months;
R -- monthly rate;
F1 -- arrangement fee;
Fn -- closing fee;
x -- annual interest rate

The payment plan, as I understand it, has an initial debt or principal $T$, and additionally the fees $F_1$ and $F_n$ are considered as part of the debt. After a month $R+F_1$ are paid, then every month $R$ until the last, where $R+F_n$ is paid, after the n-th payment, the debt is paid in full.

The total balance for the effective interest rate $x$, seen from the start of the debt, and according to the flow of payments, reads as

\begin{align}T+F_1+F_n&=(R+F_1)(1+x)^{-1/12}+R(1+x)^{-2/12}+\dots+R(1+x)^{-(n-1)/12}+(R+F_n)(1+x)^{-n/12}\\ &=F_1(1+x)^{-1/12}+R\frac{1-(1+x)^{-n/12}}{(1+x)^{1/12}-1}+F_n(1+x)^{-n/12} \end{align}

or using $1-y=(1+x)^{-1/12}$

$$T+F_1+F_n=F_1(1-y)+R(1-y)\frac{1-(1-y)^n}{y}+F_n(1-y)^{n}$$


Update: To get a function to solve, use

$$0=f(y)=-F_1 y+R(1-y)\frac{1-(1-y)^n}{y}-T-F_n(1-(1-y)^{n})$$

for $y\in(0,1)$. If the functions are available, math.h has them, use for the computation of $1-(1-y)^n$ the code -expm1(n*log1p(-y)), which is more precise for small values of $y$, especially in the middle term with a divisor of $y$.

Lutz Lehmann
  • 126,666
  • Hi. I also asked that question. I dont see how the formulae from that answer apply to the binary chop unless I am totally misunderstanding the 2 solutions. How do I use this formula in the binary chop. It was my understanding for binary chop my first step is to sum all future values of payments. – user2274191 Jan 02 '14 at 23:40
  • For binary chop am I finding the root of f(x)=Tx(1+x)+Fx2−R(1+x−(1+ – user2274191 Jan 02 '14 at 23:59
  • What you probably mean is the bisection method. Avoid it. Take regula falsi in one of the accelerated variants, I like Illinois for its simplicity. Same features as the bisection method, much faster convergence. – Lutz Lehmann Jan 03 '14 at 00:27
  • The equations above are for the discounted values of future payments at the start of the credit contract. If you want the balance in discounted values at the end of the contract, you multiply both sides by $(1+x)^{n/12}$. – Lutz Lehmann Jan 03 '14 at 00:33
  • Sorry its all lost on me :( I just thought there would be an equation and I have to find its positive root which is between 0 and 1. I thought that equation was something that worked out future value of all payments to be made. Thats what I read in some finance booklet. – user2274191 Jan 03 '14 at 00:39
  • To make a function out of an equation, you just compute the difference of both sides. It is preferable to have a polynomial equation or a rational term that is monotone, increasing or decreasing. As long as there is no new financing in the middle of the period, these interest rate computations are quite tame, you can not accidentially break the good convergence behavior. – Lutz Lehmann Jan 03 '14 at 00:46