yield_maturity

Evaluates the annual yield of a security that pays interest at maturity.

Synopsis

#include <imsl.h>

float imsl_f_yield_maturity (struct tm settlement, struct tm maturity, struct tm issue, float rate, float price, int basis)

The type double function is imsl_d_yield_maturity.

Required Arguments

struct tm 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.

struct tm 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.

struct tm 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)
Interest rate at date of issue of the security.

float price (Input)
Price per $100 face value of the security.

int basis (Input)
The method for computing the number of days between two dates. It should be one of IMSL_DAY_CNT_BASIS_ACTUALACTUAL, IMSL_DAY_CNT_BASIS_NASD, IMSL_DAY_CNT_BASIS_ACTUAL360, IMSL_DAY_CNT_BASIS_ACTUAL365, or IMSL_DAY_CNT_BASIS_30E360. For a more detailed discussion on basis see the Usage Notes section of this chapter.

Return Value

The annual yield of a security that pays interest at maturity. If no result can be computed, NaN is returned.

Description

Function imsl_f_yield_maturity computes the annual yield of a security that pays interest at maturity.

It is computed using the following:

 

In the equation above, DIM represents the number of days in the period starting with the issue date and ending with the maturity date. DSM represents the number of days in the period starting with the settlement 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. B represents the number of days in a year based on the annual basis.

Example

In this example, imsl_f_yield_maturity computes the annual yield of a security that pays interest at maturity which is selling at $95.40663 with the settlement date of August 1, 2000, the issue date of July 1, 2000, the maturity date of July 1, 2010, and the interest rate of 6% at the issue using the US (NASD) 30/360 day count method.

 

#include <stdio.h>

#include <imsl.h>

 

int main()

{

struct tm settlement, maturity, issue;

float rate = .06;

float price = 95.40663;

int basis = IMSL_DAY_CNT_BASIS_NASD;

float yieldmat;

 

settlement.tm_year = 100;

settlement.tm_mon = 7;

settlement.tm_mday = 1;

 

maturity.tm_year = 110;

maturity.tm_mon = 6;

maturity.tm_mday = 1;

 

issue.tm_year = 100;

issue.tm_mon = 6;

issue.tm_mday = 1;

 

yieldmat = imsl_f_yield_maturity (settlement, maturity, issue,

rate, price, basis);

printf ("The yield on a bond which pays at maturity is ");

printf ("%.2f%%.\n", yieldmat * 100.);

}

Output

 

The yield on a bond which pays at maturity is 6.74%.