accrInterestMaturity

Evaluates the interest which has accrued on a security that pays interest at maturity.

Synopsis

accrInterestMaturity (issue, maturity, couponRate, parValue, basis)

Required Arguments

date issue (Input)
The date on which interest starts accruing. 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 couponRate (Input)
Annual interest rate set forth on the face of the security; the coupon rate.
float parValue (Input)
Nominal or face value of the security used to calculate 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, or DAY_CNT_BASIS_30E360. For a more detailed discussion see the Usage Notes section of this chapter.

Return Value

The interest which has accrued on a security that pays interest at maturity. If no result can be computed, NaN is returned.

Description

Function accrInterestMaturity computes the accrued interest for a security that pays interest at maturity:

\[(\mathit{parValue})(\mathit{rate})\left(\frac{A}{D}\right)\]

In the above equation, A represents the number of days starting at issue date to maturity date and D represents the annual basis.

Example

In this example, accrInterestMaturity computes the accrued interest for a security that pays interest at maturity using the US (NASD) 30/360 day count method. The security has a par value of $1,000, the issue date of October 1, 2000, the maturity date of November 3, 2000, and a coupon rate of 6%.

from __future__ import print_function
from numpy import *
from datetime import date
from pyimsl.math.accrInterestMaturity import accrInterestMaturity, DAY_CNT_BASIS_NASD

rate = .06
par = 1000.
basis = DAY_CNT_BASIS_NASD
issue = date(2000, 10, 1)
maturity = date(2000, 11, 3)

accrintm = accrInterestMaturity(issue, maturity,
                                rate, par, basis)
print("The accrued interest is $%.2f." % (accrintm))

Output

The accrued interest is $5.33.