future_value
Evaluates the future value of an investment.
Synopsis
#include <imsl.h>
float imsl_f_future_value (float rate, int n_periods, float payment, float present_value, int when)
The type double function is imsl_d_future_value.
Required Arguments
float rate (Input)
Interest rate.
int n_periods (Input)
Total number of payment periods.
float payment (Input)
Payment made in each period.
float present_value (Input)
The current value of a stream of future payments, after discounting the payments using some interest rate.
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.
Return Value
The future value of an investment. If no result can be computed, NaN is returned.
Description
Function imsl_f_future_value computes the future value of an investment. The future value is the value, at some time in the future, of a current amount and a stream of payments.
It can be found by solving the following:
If rate =0
If rate ≠0
Example
In this example, imsl_f_future_value computes the value of $30,000 payment made annually at the beginning of each year for the next 20 years with an annual interest rate of 5%.
#include <imsl.h>
#include <stdio.h>
int main ()
{
float rate = .05;
int n_periods = 20;
float payment = -30000.00;
float present_value = -30000.00;
int when = IMSL_AT_BEGINNING_OF_PERIOD;
float future_value;
future_value = imsl_f_future_value (rate, n_periods, payment,
present_value, when);
printf ("After 20 years, the value of the investments ");
printf ("will be $%.2f.\n", future_value);
}
Output
After 20 years, the value of the investments will be $1121176.63.