CNLMath : Special Functions : received_maturity
received_maturity
Evaluates the amount one receives when a fully invested security reaches the maturity date.
Synopsis
#include <imsl.h>
float imsl_f_received_maturity (struct tm settlement, struct tm maturity, float investment, float discount_rate, int basis)
The type double function is imsl_d_received_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.
float investment (Input)
The total amount one has invested in the security.
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.
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 amount one receives when a fully invested security reaches its maturity date. If no result can be computed, NaN is returned.
Description
Function imsl_f_received_maturity computes the amount received at maturity for a fully invested security.
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 DIM represents the number of days in the period starting with the issue date and ending with the maturity date.
Example
In this example, imsl_f_received_maturity computes the amount received of a $7,000 investment with the settlement date of July 1, 1995, maturity date of July 1, 2005 and discount rate of 6%, using the Actual/365 day count method.
 
include <stdio.h>
#include <imsl.h>
 
int main()
{
struct tm settlement, maturity;
float investment = 7000.;
float discount = .06;
int basis = IMSL_DAY_CNT_BASIS_ACTUAL365;
float received;
 
settlement.tm_year = 95;
settlement.tm_mon = 6;
settlement.tm_mday = 1;
 
maturity.tm_year = 105;
maturity.tm_mon = 6;
maturity.tm_mday = 1;
 
received = imsl_f_received_maturity (settlement, maturity,
investment, discount, basis);
printf ("The amount received at maturity for the ");
printf ("bond is $%.2f.\n", received);
}
Output
 
The amount received at maturity for the bond is $17521.60.