futureValue

Evaluates the future value of an investment.

Synopsis

futureValue (rate, nPeriods, payment, presentValue, when)

Required Arguments

float rate (Input)
Interest rate.
int nPeriods (Input)
Total number of payment periods.
float payment (Input)
Payment made in each period.
float presentValue (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 AT_END_OF_PERIOD or 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 futureValue 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

\[\textit{presentValue} + (\textit{payment})(\textit{nPeriods}) + \textit{futureValue} = 0\]

If rate ≠ 0

\[\begin{split}\begin{array}{l} \mathit{presentValue}(1+\mathit{rate})^{\mathrm{nPeriods}} + \\ \mathit{payment}[1 + \mathit{rate}(\mathit{when})] \frac{(1+\mathit{rate})^{\mathrm{nPeriods}} - 1}{\mathit{rate}} + \mathit{futureValue} = 0 \end{array}\end{split}\]

Example

In this example, futureValue 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%.

from __future__ import print_function
from numpy import *
from pyimsl.math.futureValue import futureValue, AT_BEGINNING_OF_PERIOD

rate = .05
n_periods = 20
payment = -30000.00
present_value = -30000.00

future_value = futureValue(rate, n_periods, payment,
                           present_value, AT_BEGINNING_OF_PERIOD)
print("After 20 years, the value of the investments", end=' ')
print("will be $%.2f." % (future_value))

Output

After 20 years, the value of the investments will be $1121176.49.