financebanking

interest Security

Only available under a commercial licence
COST (GBP)
this unit 1.80
sub units 8.55
add a commercial licence to your cart
0
viewed 1326 times
www.codecogs.com/d-ox/finance/banking/interestsecurity.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/interestsecurity.h>

using namespace Finance::Banking;

double interestSecurity (int sett,                  int mat,                  double investAm,                  double redemAm,                  Finance::Banking::YearBasis basis=yb_USA)
Return the interest rate for a fully invested security. Excel: INTRATE

Function Documentation

Interest Security Calculator

  

Add calculator to your site or email
 
doubleinterestSecurityintsett
intmat
doubleinvestAm
doubleredemAm
Finance::Banking::YearBasisbasis = yb_USA )
Returns the interest rate for a fully invested security. The function works using the following equation:
(1)
\displaystyle rate = \frac{redemption-investment}{investment} * \frac{B}{DIM}
where: basis,
Example:
#include <iostream>
	
#include <codecogs/units/date/date.h>
#include <codecogs/units/date/dateymd.h>
#include <codecogs/finance/banking/interestsecurity.h>
	
int main(int argc, char *argv[])
{
  int settDate=Units::Date::date(1999, 2, 15);
  int maturityDate=Units::Date::date(1999, 5, 15);
	
  double intRate=Finance::Banking::interestSecurity(settDate, maturityDate, 1000000, 1014420,
Finance::Banking::yb_Act360);
 
  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("interest rate=%f", intRate);
  return 1;
}
Output:
settlement=1999/2/15
maturity=1999/5/15
interest rate=0.058328
Parameters:
settThe settlement date of the security, expressed as a serial Julian date. This is the date after issue when the security is traded to the buyer.
matThe maturity date of the security, expressed as a serial Julian date. The maturity date is the date when the security expires.
investAmThe amount invested in the security.
redemAmThe amount to be received at maturity.
basisThe day count basis to use. See YearBasis
Returns:
The interest rate for the security.
Note:
The day count basis is specified using the basis parameter. This basis can be any of the following: yb_USA, yb_EU, yb_Act, yb_Act360 or yb_Act365.
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 16:51:53

Page Comments

  You must login to leave a messge


Valid CSS!   Valid XHTML 1.0 Transitional