receivedMaturity¶
Evaluates the amount one receives when a fully invested security reaches the maturity date.
Synopsis¶
receivedMaturity (settlement, maturity, investment, discountRate, basis)
Required Arguments¶
- date
settlement
(Input) - The date on which payment is made to settle a trade. For a more detailed discussion on dates see the Usage Notes section of this chapter.
- date
maturity
(Input) - The date on which the bond comes due, and principal and accrued interest are paid. For a more detailed discussion on dates see the Usage Notes section of this chapter.
- float
investment
(Input) - The total amount one has invested in the security.
- float
discountRate
(Input) - The interest rate implied when a security is sold for less than its value at maturity in lieu of interest payments.
- int
basis
(Input) - The method for computing the number of days between two dates. It should
be one of
DAY_CNT_BASIS_ACTUALACTUAL
,DAY_CNT_BASIS_NASD
,DAY_CNT_BASIS_ACTUAL360
,DAY_CNT_BASIS_ACTUAL365
, orDAY_CNT_BASIS_30E360
. For a more detailed discussion onbasis
see the Usage Notes section of this chapter.
Return Value¶
The amount one receives when a fully invested security reaches its maturity date. If no result can be computed, NaN is returned.
Description¶
Function receivedMaturity
computes the amount received at maturity for a
fully invested security.
It is computed using the following:
In the equation above, B represents the number of days in a year based on the annual basis, and DIM represents the number of days in the period starting with the issue date and ending with the maturity date.
Example¶
In this example, receivedMaturity
computes the amount received of a
$7,000 investment with the settlement date of July 1, 1995, maturity date of
July 1, 2005 and discount rate of 6%, using the Actual/365 day count method.
from __future__ import print_function
from numpy import *
from datetime import date
from pyimsl.math.receivedMaturity import receivedMaturity, DAY_CNT_BASIS_ACTUAL365
investment = 7000.
discount = .06
basis = DAY_CNT_BASIS_ACTUAL365
settlement = date(1995, 7, 1)
maturity = date(2005, 7, 1)
received = receivedMaturity(settlement, maturity,
investment, discount, basis)
print("The amount received at maturity for the bond is $%.2f."
% (received))
Output¶
The amount received at maturity for the bond is $17521.60.