priceMaturity

Evaluates the price, per $100 face value, of a security that pays interest at maturity.

Synopsis

priceMaturity (settlement, maturity, issue, rate, t_yield, 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 see the Usage Notes section of this chapter.
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.
float rate (Input)
Annual interest rate set forth on the face of the security; the coupon rate.
float t_yield (Input)
Annual yield of the security.
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 on basis see the Usage Notes section of this chapter.

Return Value

The price per $100 face value of a security that pays interest at maturity. If no result can be computed, NaN is returned.

Description

Function priceMaturity computes the price per $100 face value of a security that pays interest at maturity.

It is computed using the following:

\[\left[\frac {100 + \left(\frac{\mathit{DIM}}{B} * \mathit{rate} * 100\right)} {1 + \left(\frac{\mathit{DSM}}{B} * \mathit{yield}\right)} \right] - \left(\tfrac{A}{B} * \mathit{rate} * 100\right)\]

In the equation above, B represents the number of days in a year based on the annual basis. DSM represents the number of days in the period starting with the settlement date and ending with the maturity date. DIM represents the number of days in the period starting with the issue date and ending with the maturity date. A represents the number of days in the period starting with the issue date and ending with the settlement date.

Example

In this example, priceMaturity computes the price at maturity of a security with the settlement date of August 1, 2000, maturity date of July 1, 2001 and issue date of July 1, 2000, using the US (NASD) 30/360 day count method. The security has 5% annual yield and 5% interest rate at the date of issue.

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

rate = .05
yield_amt = .05
basis = DAY_CNT_BASIS_NASD

settlement = date(2000, 8, 1)
maturity = date(2001, 7, 1)
issue = date(2000, 7, 1)

price_amt = priceMaturity(settlement, maturity,
                          issue, rate, yield_amt, basis)
print("The price of the bond is $%.2f." % (price_amt))

Output

The price of the bond is $99.98.