IMSL C Math Library
bond_equivalent_yield
Evaluates the bond-equivalent yield of a Treasury bill.
Synopsis
#include <imsl.h>
float imsl_f_bond_equivalent_yield (struct tm settlement, struct tm maturity, float discount_rate)
The type double function is imsl_d_bond_equivalent_yield.
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 Notess ection 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.
float discount_rate (Input)
The interest rate implied when a security is sold for less than its value at maturity in lieu of interest payments.
Return Value
The bond-equivalent yield of a Treasury bill. If no result can be computed, NaN is returned.
Description
Function imsl_f_bond_equivalent_yield computes the bond-equivalent yield for a Treasury bill.
It is computed using the following:
otherwise,
In the above equation, DSM represents the number of days starting at settlement date to maturity date.
Example
In this example, imsl_f_bond_equivalent_yield computes the bond-equivalent yield for a Treasury bill with the settlement date of July 1, 1999, the maturity date of July 1, 2000, and discount rate of 5% at the issue date.
 
#include <stdio.h>
#include <imsl.h>
 
int main()
{
struct tm settlement, maturity;
float discount = .05;
float yield;
 
settlement.tm_year = 99;
settlement.tm_mon = 6;
settlement.tm_mday = 1;
 
maturity.tm_year = 100;
maturity.tm_mon = 6;
maturity.tm_mday = 1;
 
yield = imsl_f_bond_equivalent_yield (settlement, maturity, discount);
printf ("The bond-equivalent yield for the T-bill is %.2f%%.\n",
yield * 100.);
}
Output
 
The bond-equivalent yield for the T-bill is 5.29%.