cumulativePrincipal

Evaluates the cumulative principal paid between two periods.

Synopsis

cumulativePrincipal (rate, nPeriods, presentValue, start, end, when)

Required Arguments

float rate (Input)
Interest rate.
int nPeriods (Input)

Total number of payment periods. nPeriods cannot be less than or equal

to 0.

float presentValue (Input)
The current value of a stream of future payments, after discounting the payments using some interest rate.
int start (Input)
Starting period in the calculation. start cannot be less than 1; or greater than end.
int end (Input)
Ending period in the calculation.
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 cumulative principal paid between the first period and the last period. If no result can be computed, NaN is returned.

Description

Function cumulativePrincipal evaluates the cumulative principal paid between the first period and the last period.

It is computed using the following:

\[\sum_{i=\mathit{start}}^{\mathit{end}} \mathrm{principal}_i\]

where \(principal_i\) is computed from principalPayment for the i-th period.

Example

In this example, cumulativePrincipal computes the total principal paid for the first year of a 30-year $200,000 loan with an annual interest rate of 7.25%. The payment is made at the end of each month.

from __future__ import print_function
from numpy import *
from pyimsl.math.cumulativePrincipal import cumulativePrincipal, AT_END_OF_PERIOD, AT_BEGINNING_OF_PERIOD

rate = 0.0725 / 12
n_periods = 12 * 30
present_value = 200000
start = 1
end = 12

total = cumulativePrincipal(rate, n_periods, present_value,
                            start, end, AT_END_OF_PERIOD)
print("First year principal = $%.2f." % (total))

Output

First year principal = $-1935.71.