Evaluates the interest rate per period of an annuity.
#include <imsl.h>
float imsl_f_interest_rate_annuity (int n_periods, float payment, float present_value, float future_value, int when, …, 0)
The type double function is imsl_d_interest_rate_annuity.
int n_periods
(Input)
Total number of periods.
float payment
(Input)
Payment made each period.
float present_value
(Input)
The current value of a stream of future payments, after discounting
the payments using some interest rate.
float future_value
(Input)
The value, at some time in the future, of a current amount and a
stream of payments.
int when
(Input)
Time in each period when the payment is made, either IMSL_AT_END_OF_PERIOD
or IMSL_AT_BEGINNING_OF_PERIOD.
For a more detailed discussion on when see the “Usage Notes” section of this
chapter.
The interest rate per period of an annuity. If no result can be computed, NaN is returned.
#include <imsl.h>
float imsl_f_interest_rate_annuity (int n_periods, float payment,
float present_value, float future_value, int when,
IMSL_XGUESS, float guess,
IMSL_HIGHEST,
float max,
0)
IMSL_XGUESS,
float guess
(Input)
Initial guess at the interest rate.
IMSL_HIGHEST,
float max
(Input)
Maximum value of the interest rate allowed.
Default: 1.0
(100%)
Function imsl_f_interest_rate_annuity computes the interest rate per period of an annuity. An annuity is a security that pays a fixed amount at equally spaced intervals.
It can be found by solving the following:
If rate = 0

If rate ≠ 0

In this example, imsl_f_interest_rate_annuity computes the interest rate of a $20,000 loan that requires 70 payments of $350 each to pay off.
#include <stdio.h>
#include <imsl.h>
int main()
{
float rate;
int n_periods = 70;
float payment = -350.;
float present_value = 20000;
float future_value = 0.;
int when = IMSL_AT_BEGINNING_OF_PERIOD;
rate = imsl_f_interest_rate_annuity (n_periods, payment, present_value,
future_value, when, 0) * 12;
printf ("The computed interest rate on the loan is ");
printf ("%.2f%%.\n", rate * 100.);
}
The computed interest rate on the loan is 7.35%.