principalPayment

Evaluates the payment on the principal for a specified period.

Synopsis

principalPayment (rate, period, nPeriods, presentValue, futureValue, when)

Required Arguments

float rate (Input)
Interest rate.
int period (Input)
Payment period.
int nPeriods (Input)
Total number of periods.
float presentValue (Input)
The current value of a stream of future payments, after discounting the payments using some interest rate.
float futureValue (Input)
The value, at some time in the future, of a current amount and a stream of payments.
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 payment on the principal for a given period. If no result can be computed, NaN is returned.

Description

Function principalPayment computes the payment on the principal for a given period.

It is computed using the following:

\[\mathit{payment}_i - \mathit{interest}_i\]

where \(payment_i\) is computed from payment for the i-th period, \(interest_i\) is calculated from interestPayment for the i-th period.

Example

In this example, principalPayment computes the principal paid for the first year on a 30-year $100,000 loan with an annual interest rate of 8%. The payment is made at the end of each year.

from __future__ import print_function
from numpy import *
from pyimsl.math.principalPayment import principalPayment, AT_END_OF_PERIOD

rate = 0.08
period = 1
n_periods = 30
present_value = 100000.00
future_value = 0.0
when = AT_END_OF_PERIOD

principal = principalPayment(rate, period, n_periods,
                             present_value, future_value, when)
print("The payment on the principal for the first year of ")
print("the $100,000 loan is $%.2f." % (principal))

Output

The payment on the principal for the first year of 
the $100,000 loan is $-882.74.