financebanking

bill Bond Equiv

Only available under a commercial licence
COST (GBP)
this unit 3.60
sub units 4.20
add a commercial licence to your cart
0
viewed 1799 times
www.codecogs.com/d-ox/finance/banking/billbondequiv.php
Other modules that are used by this module. We add these to the cart for you whenever you add this module, unless you already own enough licences for them. Click for details
Controller: CodeCogs    Contact Controller

Interface

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

using namespace Finance::Banking;

double billBondEquiv (int sett, int mat, double rate)
Return the bond-equivalent yield for a treasury bill. Excel: TBILLEQ
Click for details on using CodeCogs in ExcelReal cc_billBondEquiv (Integer sett, Integer mat, Real rate)
This function is available as a Microsoft Excel add-in.

Function Documentation

Bill Bond Equiv Calculator

  

Add calculator to your site or email
 
doublebillBondEquivintsett
intmat
doublerate )
This function calculates the bond-equivalent yield for a treasury bill. It does so using the following equation:

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

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:
#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:
settThe settlement date, expressed as a serial Julian date.
matThe maturity date of the treasury bill, expressed as a serial Julian date.
rate
Returns:
The bond-equivalent yield of a treasury bill.
Authors:
James Warren (August 2005)
Source Code:
Register

- To get code register with CodeCogs. Already a Member, then Login.


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2008-05-13 21:22:39

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional