Evaluates the interest which has accrued on a security that pays interest periodically.
#include <imsl.h>
float
imsl_f_accr_interest_periodic (struct
tm issue,
struct
tm first_coupon, struct
tm settlement, float coupon_rate, float par_value, int frequency, int basis)
The type double function is imsl_d_accr_interest_periodic.
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
first_coupon (Input)
First date on which an interest
payment is due on the security (e.g. the coupon date). For a more detailed
discussion on dates see the Usage Notes section of this
chapter.
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.
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 frequency
(Input)
Frequency of the interest payments. It should be one of IMSL_ANNUAL, IMSL_SEMIANNUAL or
IMSL_QUARTERLY.
For a more detailed discussion on frequency see the
Usage Notes
section of this chapter.
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.
The accrued interest for a security that pays periodic interest. If no result can be computed, NaN is returned.
Function imsl_f_accr_interest_periodic computes the accrued interest for a security that pays periodic interest.
In the equation below, Ai represents the number days which have accrued for the ith quasi-coupon period within the odd period. (The quasi-coupon periods are periods obtained by extending the series of equal payment periods to before or after the actual payment periods.) NC represents the number of quasi-coupon periods within the odd period, rounded to the next highest integer. (The odd period is a period between payments that differs from the usual equally spaced periods at which payments are made.) NLi represents the length of the normal ith quasi-coupon period within the odd period. NLI is expressed in days.
Function imsl_f_accr_interest_periodic can be found by solving the following:

In this example, imsl_f_accr_interest_periodic computes the accrued interest for a security that pays periodic interest using the US (NASD) 30/360 day count method. The security has a par value of $1,000, the issue date of October 1, 1999, the settlement date of November 3, 1999, the first coupon date of March 31, 2000, and a coupon rate of 6%.
#include <stdio.h>
#include "imsl.h"
void main()
{
struct tm issue, first_coupon, settlement;
float rate = .06;
float par = 1000.;
int frequency = IMSL_SEMIANNUAL;
int basis = IMSL_DAY_CNT_BASIS_NASD;
float accrint;
issue.tm_year = 99;
issue.tm_mon = 9;
issue.tm_mday = 1;
first_coupon.tm_year = 100;
first_coupon.tm_mon = 2;
first_coupon.tm_mday = 31;
settlement.tm_year = 99;
settlement.tm_mon = 10;
settlement.tm_mday = 3;
accrint = imsl_f_accr_interest_periodic (issue, first_coupon,
settlement, rate, par, frequency, basis);
printf ("The accrued interest is $%.2f.\n", accrint);
}
The accrued interest is $5.33.
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |