IMSL C Math Library
discount_rate
Evaluates the interest rate implied when a security is sold for less than its value at maturity in lieu of interest payments.
Synopsis
#include <imsl.h>
float imsl_f_discount_rate (struct tm settlement, struct tm maturity, float price, float redemption, int basis)
The type double function is imsl_d_discount_rate.
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.
float price (Input)
Price per $100 face value of the security.
float redemption (Input)
Redemption value 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 see the Usage Notes section of this chapter.
Return Value
The discount rate for a security. If no result can be computed, NaN is returned.
Description
Function imsl_f_discount_rate computes the discount rate for a security. The discount rate is the interest rate implied when a security is sold for less than its value at maturity in lieu of interest payments.
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 DSM represents the number of days starting with the settlement date and ending with the maturity date.
Example
In this example, imsl_f_discount_rate computes the discount rate of a security which is selling at $97.975 with the settlement date of February 15, 2000, and maturity date of June 10, 2000, using the Actual/365 day count method.
 
#include <stdio.h>
#include <imsl.h>
 
int main()
{
struct tm settlement, maturity;
float price = 97.975;
float redemption = 100.;
int basis = IMSL_DAY_CNT_BASIS_ACTUAL365;
float rate;
 
settlement.tm_year = 100;
settlement.tm_mon = 1;
settlement.tm_mday = 15;
 
maturity.tm_year = 100;
maturity.tm_mon = 5;
maturity.tm_mday = 10;
 
rate = imsl_f_discount_rate (settlement, maturity, price,
redemption, basis);
 
printf ("The discount rate for the security is %.2f%%.\n", rate * 100.);
}
Output
 
The discount rate for the security is 6.37%.