CNLMath : Special Functions : treasury_bill_price
treasury_bill_price
Evaluates the price per $100 face value of a Treasury bill.
Synopsis
#include <imsl.h>
float imsl_f_treasury_bill_price (struct tm settlement, struct tm maturity, float discount_rate)
The type double function is imsl_d_treasury_bill_price.
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 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 price per $100 face value of a Treasury bill. If no result can be computed, NaN is returned.
Description
Function imsl_f_treasury_bill_price computes the price per $100 face value for a Treasury bill.
It is computed using the following:
In the equation above, DSM represents the number of days in the period starting with the settlement date and ending with the maturity date (any maturity date that is more than one calendar year after the settlement date is excluded).
Example
In this example, imsl_f_treasury_bill_price computes the price for a Treasury bill with the settlement date of July 1, 2000, the maturity date of July 1, 2001, and a discount rate of 5% at the issue date.
 
#include <stdio.h>
#include <imsl.h>
 
int main()
{
struct tm settlement, maturity;
float discount = .05;
float price;
 
settlement.tm_year = 100;
settlement.tm_mon = 6;
settlement.tm_mday = 1;
 
maturity.tm_year = 101;
maturity.tm_mon = 6;
maturity.tm_mday = 1;
 
price = imsl_f_treasury_bill_price (settlement, maturity, discount);
printf ("The price per $100 face value for the T-bill ");
printf ("is $%.2f.\n", price);
}
Output
 
The price per $100 face value for the T-bill is $94.93.