CNLMath : Special Functions : accr_interest_maturity
accr_interest_maturity
Evaluates the interest which has accrued on a security that pays interest at maturity.
Synopsis
#include <imsl.h>
float imsl_f_accr_interest_maturity (struct tm issue, struct tm maturity, float coupon_rate, float par_value, int basis)
The type double function is imsl_d_accr_interest_maturity.
Required Arguments
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.
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 coupon_rate (Input)
Annual interest rate set forth on the face of the security; the coupon rate.
float par_value (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 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 interest which has accrued on a security that pays interest at maturity. If no result can be computed, NaN is returned.
Description
Function imsl_f_accr_interest_maturity computes the accrued interest for a security that pays interest at maturity:
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, imsl_f_accr_interest_maturity 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%.
 
#include <stdio.h>
#include <imsl.h>
 
int main()
{
struct tm issue, maturity;
float rate = .06;
float par = 1000.;
int basis = IMSL_DAY_CNT_BASIS_NASD;
float accrintm;
 
issue.tm_year = 100;
issue.tm_mon = 9;
issue.tm_mday = 1;
 
maturity.tm_year = 100;
maturity.tm_mon = 10;
maturity.tm_mday = 3;
 
accrintm = imsl_f_accr_interest_maturity (issue, maturity,
rate, par, basis);
 
printf ("The accrued interest is $%.2f.\n", accrintm);
}
Output
 
The accrued interest is $5.33.