future_value
Time within a period when a payment is made
You're viewing an older version of this page (#265). View the current version.
Interface
#include <codecogs/finance/banking/future_value.h>
using namespace Finance::Banking;
Overview
<div align="center"> <table border="0"> <tr align="center"><td width="100"><strong>Type</strong></td><td><strong>Description</strong></td></tr> <tr><td align="center" valign="top"><em>pp_EndOfPeriod</em></td><td>Each payment is made at the end of the period.</td></tr> <tr><td align="center" valign="top"><em>pp_StartOfPeriod</em></td><td>Each payment is made at the start of the period.</td></tr> </table> </div>
FUNCTION
future_value
Evaluate the future value of an investment. This is done by solving the following equations to find the value of fv :
If rate = 0,
If rate /= 0,
Where pv is the present value, rate is the interest rate, nper is the number of periods over which to calculate and pmt is the payment made each period.
Calculating the future value of an investment according to a scedule of compound interest rates is done using the following equation:
Where nper is the number of periods (and in this case entries in the shedule array), pv is the principal value and schedule is an array 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.h>
int main()
{
double d = Finance::Banking::future_value(0.05, 20, -30000, -30000, Finance::Banking::pp_StartOfPeriod);
printf("30,000 set aside per year\n");
printf("5%% interest compounded yearly\n");
printf("After 20 years, the value of the investment will be: %7.2f\n\n", d);
d = Finance::Banking::future_value(0.00, 7, -50, 0, Finance::Banking::pp_StartOfPeriod);
printf("50 set aside per year\n");
printf("no interest\n");
printf("After 7 years, the value of the investment will be: %.2f\n", d);
return 0;
}Output:
30,000 set aside per year
5% interest compounded yearly
After 20 years, the value of the investment will be: 1121176.49
50 set aside per year
no interest
After 7 years, the value of the investment will be: 350.00Parameters
pp_StartOfPeriod or pp_EndOfPeriod.
Returns
James Warren (May 2005)