I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
COST (GBP)
this unit 5.62
sub units 5.88
+
0
FinanceBanking

bill Bond Equiv

Return the bond-equivalent yield for a treasury bill. Excel: TBILLEQ
Controller: CodeCogs

Dependents

Info

Interface

C++
Excel

BillBondEquiv

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

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

serial Julian date.

Parameters

settThe settlement date, expressed as a serial Julian date.
matThe maturity date of the treasury bill, expressed as a

Returns

The bond-equivalent yield of a treasury bill.

Authors

James Warren (August 2005)
Source Code

Source code is available when you buy a Commercial licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.