Evaluate the future value of an investment using a schedule of interest rates.

You're viewing an older version of this page (#266). View the current version.

View versions (1)

Interface

#include <codecogs/finance/banking/future_value_schedule.h>

using namespace Finance::Banking;

This function evaluates the future value of an investment using a schedule of compound interest rates.

References

http://www.vni.com/products/imsl/jmsl/v30/api/com/imsl/finance/Finance.html

Example 1

#include <stdio.h>
#include <codecogs/finance/banking/future_value_schedule.h>
 
int main()
{
  double principal = 10000.00;
  double schedule[] = {0.050, 0.051, 0.052, 0.053, 0.054};
  int n = 5;
 
  double d = Finance::Banking::future_value_schedule(principal, schedule, n);
  printf("After 5 years, the 10000.00 investment will have grown to %5.2f\n", d);
}

Output:

After 5 years, the 10000.00 investment will have grown to 12884.77

Parameters

pv
is the principal value, a double.

Returns

a double, the future value.
GPL Licence — free for non commercial use. See Licence details.