effectiveRate

Evaluates the effective annual interest rate.

Synopsis

effectiveRate (nominalRate, nPeriods)

Required Arguments

float nominalRate (Input)
The interest rate as stated on the face of a security.
int nPeriods (Input)
Number of compounding periods per year.

Return Value

The effective annual interest rate. If no result can be computed, NaN is returned.

Description

Function effectiveRate computes the continuously-compounded interest rate equivalent to a given periodically-compounded interest rate. The nominal interest rate is the periodically-compounded interest rate as stated on the face of a security.

It can found by solving the following:

\[\left(1+\frac{\mathit{nominalRate}}{\mathit{nPeriods}}\right)^ {\left(\mathrm{nPeriods}\right)} - 1\]

Example

In this example, effectiveRate computes the effective annual interest rate of the nominal interest rate, 6%, compounded quarterly.

from __future__ import print_function
from numpy import *
from pyimsl.math.effectiveRate import effectiveRate

nominal_rate = 0.06
n_periods = 4
effective_rate = effectiveRate(nominal_rate, n_periods)

print("The effective rate of the nominal rate, 6.0%,", end=' ')
print("compounded quarterly is %.2f%%." % (effective_rate * 100.))

Output

The effective rate of the nominal rate, 6.0%, compounded quarterly is 6.14%.