Return the bond-equivalent yield for a treasury bill. <span align="right" style="background-color:99FF99"><strong>Excel: TBILLEQ</strong></span>

View versions (1)

Interface

#include <codecogs/finance/banking/billbondequiv.h>

using namespace Finance::Banking;

This function calculates the bond-equivalent yield for a treasury bill. It does so using the following equation:

\frac{365.0*rate}{360-(rate*DSM)}
(1)

Where: rate is the discount rate, DSM is the number of days between settlement and maturity, computed according to the 360-day year basis. The actual date difference function used is dateDiff360, in dd_USA mode.

References

Microsoft Excel help file

Example 1

#include <iostream>

#include <codecogs/units/date/date.h>
#include <codecogs/finance/banking/yearlyfreq.h>
#include <codecogs/finance/banking/billbondequiv.h>

int
main(int argc, char *argv[])
{
  int settDate=Units::Date::date(1999, 3, 31);
  int maturityDate=Units::Date::date(1999, 6, 1);

  double yield=Finance::Banking::billBondEquiv(settDate,
                                               maturityDate,
                                               0.0914);
  int y, m, d;
  
  Units::Date::dateYMD(settDate, y, m, d);
  printf("settlement=%i/%i/%i\n", y, m, d);
  
  Units::Date::dateYMD(maturityDate, y, m, d);
  printf("maturity=%i/%i/%i\n", y, m, d);
  
  printf("bond equivalent yield=%f\n", yield);

  exit(EXIT_SUCCESS);
}

Output:

settlement=1999/3/31
maturity=1999/6/1
bond equivalent yield=0.094151

Parameters

sett
The settlement date, expressed as a serial Julian date.
mat
The maturity date of the treasury bill, expressed as a
Blank

serial Julian date.

Returns

The bond-equivalent yield of a treasury bill.
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

sett
mat
rate
Result