bill Bond Equiv
Return the bond-equivalent yield for a treasury bill.
Excel: TBILLEQ
Controller: CodeCogs
Dependents
Interface
C++
Excel
BillBondEquiv
doublebillBondEquiv( | int | sett | |
int | mat | ||
double | rate | ) |
References:
Microsoft Excel help fileExample 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
sett The settlement date, expressed as a serial Julian date. mat The 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.