Time for action – figuring out the rate

Let's take the values from the Time for action – determining the number of periodic payments tutorial and reverse compute the interest rate from the other parameters.

Fill in the numbers from the previous Time for action tutorial.

print "Interest rate", 12 * np.rate(167, -100, 9000, 0)

The interest rate is approximately 10 percent, as expected.

Interest rate 0.0999756420664

What just happened?

We used the NumPy rate function and the values from the previous Time for action tutorial to compute the interest rate of the loan. Ignoring the rounding errors we got the initial 10 percent we started with.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.80.122