public class Bond extends Object
rate is an annualized rate of return based on the par value of the bills.
yield is an annualized rate based on the purchase price and reflects the actual yield to maturity.
coupons are interest payments on a bond.
redemption is the amount a bond pays at maturity.
frequency is the number of times a year that a bond makes interest payments.
basis is the method used to calculate dates. For example, sometimes computations are done assuming 360 days in a year.
issue is the day a bond is first sold.
settlement is the day a purchaser acquires a bond.
maturity is the day a bond's principal is repaid.
pricedisc
(rate)priceyield
(yield)pricemat
(issue, rate,
yield)disc
(price)yielddisc
(price)accrintm
, which returns the interest that has
accumulated on the discount bond.
tbillprice
(rate)tbillyield
(price)tbilleq
(rate)price
(rate, yield, redemption)yield
(rate, price, redemption)received
(price, rate)accrint
, which returns
the interest that has accumulated at settlement from the previous coupon
date.
issueDate
and firstCouponDate
or
lastCouponDate
.
price(settlement, maturity, issueDate, firstCouponDate,
rate, yield, redemption, frequency, basis)
price(settlement, maturity, lastCouponDate, rate, yield,
redemption, frequency, basis)
yield(settlement, maturity, issueDate, firstCouponDate,
rate, price, redemption, frequency, basis)
yield(settlement, maturity, lastCouponDate, rate, price,
redemption, frequency, basis)
coupppcd
is the coupon date immediately prior to the
settlement date.coupncd
is the coupon date immediately after the settlement
date.coupdaybs
is the number of days from the immediately prior
coupon date to the settlement date.
coupdaysnc
is the number of days from the settlement date to
the next coupon date.
coupdays
is the number of days between these two coupon
dates.
coupnum
, which returns the number of coupons payable between
settlement and maturity.
Another related method is yearfrac
, which returns the fraction of the
year between two days.
Modifier and Type  Field and Description 

static int 
ANNUAL
Coupon payments are made annually.

static int 
BIMONTHLY
Coupon payments are made bimonthly (6 times per year).

static int 
MONTHLY
Coupon payments are made monthly.

static int 
QUARTERLY
Coupon payments are made quarterly.

static int 
SEMIANNUAL
Coupon payments are made semiannually (twice per year).

Modifier and Type  Method and Description 

static double 
accrint(GregorianCalendar issue,
GregorianCalendar firstCoupon,
GregorianCalendar settlement,
double rate,
double par,
int frequency,
DayCountBasis basis)
Returns the interest which has accrued on a security that pays interest
periodically.

static double 
accrintm(GregorianCalendar issue,
GregorianCalendar maturity,
double rate,
double par,
DayCountBasis basis)
Returns the interest which has accrued on a security that pays interest
at maturity.

static double 
amordegrc(double cost,
GregorianCalendar issue,
GregorianCalendar firstPeriod,
double salvage,
int period,
double rate,
DayCountBasis basis)
Returns the depreciation for each accounting period.

static double 
amorlinc(double cost,
GregorianCalendar issue,
GregorianCalendar firstPeriod,
double salvage,
int period,
double rate,
DayCountBasis basis)
Returns the depreciation for each accounting period.

static double 
convexity(GregorianCalendar settlement,
GregorianCalendar maturity,
double coupon,
double yield,
int frequency,
DayCountBasis basis)
Returns the convexity for a security.

static int 
coupdaybs(GregorianCalendar settlement,
GregorianCalendar maturity,
int frequency,
DayCountBasis basis)
Returns the number of days starting with the beginning of the coupon
period and ending with the settlement date.

static double 
coupdays(GregorianCalendar settlement,
GregorianCalendar maturity,
int frequency,
DayCountBasis basis)
Returns the number of days in the coupon period containing the settlement
date.

static int 
coupdaysnc(GregorianCalendar settlement,
GregorianCalendar maturity,
int frequency,
DayCountBasis basis)
Returns the number of days starting with the settlement date and ending
with the next coupon date.

static GregorianCalendar 
coupncd(GregorianCalendar settlement,
GregorianCalendar maturity,
int frequency,
DayCountBasis basis)
Returns the first coupon date which follows the settlement date.

static int 
coupnum(GregorianCalendar settlement,
GregorianCalendar maturity,
int frequency,
DayCountBasis basis)
Returns the number of coupons payable between the settlement date and the
maturity date.

static GregorianCalendar 
couppcd(GregorianCalendar settlement,
GregorianCalendar maturity,
int frequency,
DayCountBasis basis)
Returns the coupon date which immediately precedes the settlement date.

static double 
disc(GregorianCalendar settlement,
GregorianCalendar maturity,
double price,
double redemption,
DayCountBasis basis)
Returns the implied interest rate of a discount bond.

static double 
duration(GregorianCalendar settlement,
GregorianCalendar maturity,
double coupon,
double yield,
int frequency,
DayCountBasis basis)
Returns the Macaulay duration of a security where the security has
periodic interest payments.

static double 
intrate(GregorianCalendar settlement,
GregorianCalendar maturity,
double investment,
double redemption,
DayCountBasis basis)
Returns the interest rate of a fully invested security.

static double 
mduration(GregorianCalendar settlement,
GregorianCalendar maturity,
double coupon,
double yield,
int frequency,
DayCountBasis basis)
Returns the modified Macaulay duration for a security with an assumed par
value of $100.

static double 
price(GregorianCalendar settlement,
GregorianCalendar maturity,
double rate,
double yield,
double redemption,
int frequency,
DayCountBasis basis)
Returns the price, per $100 face value, of a security that pays periodic
interest.

static double 
price(GregorianCalendar settlement,
GregorianCalendar maturity,
GregorianCalendar lastCoupon,
double rate,
double yield,
double redemption,
int frequency,
DayCountBasis basis)
Returns the price of an odd last period coupon bond, given its yield.

static double 
price(GregorianCalendar settlement,
GregorianCalendar maturity,
GregorianCalendar issueDate,
GregorianCalendar firstCoupon,
double rate,
double yield,
double redemption,
int frequency,
DayCountBasis basis)
Returns the price of an odd first period, coupon bond, given its yield.

static double 
pricedisc(GregorianCalendar settlement,
GregorianCalendar maturity,
double rate,
double redemption,
DayCountBasis basis)
Returns the price of a discount bond given the discount rate.

static double 
pricemat(GregorianCalendar settlement,
GregorianCalendar maturity,
GregorianCalendar issue,
double rate,
double yield,
DayCountBasis basis)
Returns the price, per $100 face value, of a discount bond.

static double 
priceyield(GregorianCalendar settlement,
GregorianCalendar maturity,
double yield,
double redemption,
DayCountBasis basis)
Returns the price of a discount bond given the yield.

static double 
received(GregorianCalendar settlement,
GregorianCalendar maturity,
double investment,
double rate,
DayCountBasis basis)
Returns the amount one receives when a fully invested security reaches
the maturity date.

static double 
tbilleq(GregorianCalendar settlement,
GregorianCalendar maturity,
double rate)
Returns the bondequivalent yield of a Treasury bill.

static double 
tbillprice(GregorianCalendar settlement,
GregorianCalendar maturity,
double rate)
Returns the price, per $100 face value, of a Treasury bill.

static double 
tbillyield(GregorianCalendar settlement,
GregorianCalendar maturity,
double price)
Returns the yield of a Treasury bill.

static double 
yearfrac(GregorianCalendar start,
GregorianCalendar end,
DayCountBasis basis)
Returns the fraction of a year represented by the number of whole days
between two dates.

static double 
yield(GregorianCalendar settlement,
GregorianCalendar maturity,
double rate,
double price,
double redemption,
int frequency,
DayCountBasis basis)
Returns the yield of a security that pays periodic interest.

static double 
yield(GregorianCalendar settlement,
GregorianCalendar maturity,
GregorianCalendar lastCoupon,
double rate,
double price,
double redemption,
int frequency,
DayCountBasis basis)
Returns the yield of a security with an odd last coupon period that pays
periodic interest.

static double 
yield(GregorianCalendar settlement,
GregorianCalendar maturity,
GregorianCalendar issueDate,
GregorianCalendar firstCoupon,
double rate,
double price,
double redemption,
int frequency,
DayCountBasis basis)
Returns the yield of a security with an odd first coupon period that pays
periodic interest.

static double 
yielddisc(GregorianCalendar settlement,
GregorianCalendar maturity,
double price,
double redemption,
DayCountBasis basis)
Returns the annual yield of a discount bond.

static double 
yieldmat(GregorianCalendar settlement,
GregorianCalendar maturity,
GregorianCalendar issue,
double rate,
double price,
DayCountBasis basis)
Returns the annual yield of a security that pays interest at maturity.

public static final int ANNUAL
public static final int BIMONTHLY
public static final int MONTHLY
public static final int QUARTERLY
public static final int SEMIANNUAL
public static double accrint(GregorianCalendar issue, GregorianCalendar firstCoupon, GregorianCalendar settlement, double rate, double par, int frequency, DayCountBasis basis)
accrint
can be found by solving
the following:
issue
 a GregorianCalendar
issue date of the securityfirstCoupon
 a GregorianCalendar
date of the
security's first interest datesettlement
 a GregorianCalendar
settlement date of the
securityrate
 a double
which specifies the security's annual
coupon ratepar
 a double
which specifies the security's par valuefrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the accrued interestpublic static double accrintm(GregorianCalendar issue, GregorianCalendar maturity, double rate, double par, DayCountBasis basis)
In the above equation, represents the number of days starting at issue date to maturity date and represents the annual basis.
issue
 a GregorianCalendar
issue date of the securitymaturity
 a GregorianCalendar
date of the security's
maturityrate
 a double
which specifies the security's annual
coupon ratepar
 a double
which specifies the security's par valuebasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the accrued interestpublic static double amordegrc(double cost, GregorianCalendar issue, GregorianCalendar firstPeriod, double salvage, int period, double rate, DayCountBasis basis)
amorlinc
. However, in this method a depreciation
coefficient based on the asset life is applied during the evaluation of
the function.cost
 a double
which specifies the cost of the assetissue
 a GregorianCalendar
issue date of the assetfirstPeriod
 a GregorianCalendar
date of the end of
the first periodsalvage
 a double
which specifies the asset's salvage
value at the end of the life of the assetperiod
 an int
which specifies the periodrate
 a double
which specifies the rate of
depreciationbasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the depreciationpublic static double amorlinc(double cost, GregorianCalendar issue, GregorianCalendar firstPeriod, double salvage, int period, double rate, DayCountBasis basis)
amordegrc
, except that amordegrc
has
a depreciation coefficient that is applied during the evaluation that is
based on the asset life.cost
 a double
which specifes the cost of the assetissue
 a GregorianCalendar
issue date of the assetfirstPeriod
 a GregorianCalendar
date of the end of
the first periodsalvage
 a double
which specifies the asset's salvage
value at the end of the life of the assetperiod
 an int
which specifies the periodrate
 a double
which specifies the rate of
depreciationbasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the depreciationpublic static double convexity(GregorianCalendar settlement, GregorianCalendar maturity, double coupon, double yield, int frequency, DayCountBasis basis)
where n is calculated from
coupnum
, and .settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securitycoupon
 a double
which specifies the security's annual
coupon rateyield
 a double
which specifies the security's annual
yieldfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the convexity for a
securitypublic static int coupdaybs(GregorianCalendar settlement, GregorianCalendar maturity, int frequency, DayCountBasis basis)
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.int
which specifies the number of days from the
beginning of the coupon period to the settlement datepublic static double coupdays(GregorianCalendar settlement, GregorianCalendar maturity, int frequency, DayCountBasis basis)
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the number of days in the
coupon period that contains the settlement datepublic static int coupdaysnc(GregorianCalendar settlement, GregorianCalendar maturity, int frequency, DayCountBasis basis)
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.int
which specifies the number of days from the
settlement date to the next coupon datepublic static GregorianCalendar coupncd(GregorianCalendar settlement, GregorianCalendar maturity, int frequency, DayCountBasis basis)
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
GregorianCalendar
which specifies the next coupon
date after the settlement datepublic static int coupnum(GregorianCalendar settlement, GregorianCalendar maturity, int frequency, DayCountBasis basis)
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.int
which specifies the number of coupons payable
between the settlement date and maturity datepublic static GregorianCalendar couppcd(GregorianCalendar settlement, GregorianCalendar maturity, int frequency, DayCountBasis basis)
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
GregorianCalendar
which specifies the previous
coupon date before the settlement datepublic static double disc(GregorianCalendar settlement, GregorianCalendar maturity, double price, double redemption, DayCountBasis basis)
In the equation above, represents the number of days in a year based on the annual basis and represents the number of days starting with the settlement date and ending with the maturity date.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityprice
 a double
which specifies the security's price
per $100 face valueredemption
 a double
which specifies the security's
redemption value per $100 face valuebasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the discount rate for a
securitypublic static double duration(GregorianCalendar settlement, GregorianCalendar maturity, double coupon, double yield, int frequency, DayCountBasis basis)
In the equation above, represents the number of days starting with the settlement date and ending with the next coupon date. represents the number of days within the coupon period. represents the number of coupons payable from the settlement date to the maturity date. represents the frequency of the coupon payments annually.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securitycoupon
 a double
which specifies the security's annual
coupon rateyield
 a double
which specifies the security's annual
yieldfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the annual duration of a
security with periodic interest paymentspublic static double intrate(GregorianCalendar settlement, GregorianCalendar maturity, double investment, double redemption, DayCountBasis basis)
In the equation above, represents the number of days in a year based on the annual basis, and represents the number of days in the period starting with the settlement date and ending with the maturity date.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityinvestment
 a double
which specifies the amount
investedredemption
 a double
which specifies the amount to be
received at maturitybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the interest rate for a
fully invested securitypublic static double mduration(GregorianCalendar settlement, GregorianCalendar maturity, double coupon, double yield, int frequency, DayCountBasis basis)
where is calculated from
mduration
.settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securitycoupon
 a double
which specifies the security's annual
coupon rateyield
 a double
which specifies the security's annual
yieldfrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the modified Macaulay
duration for a security with an assumed par value of $100public static double price(GregorianCalendar settlement, GregorianCalendar maturity, double rate, double yield, double redemption, int frequency, DayCountBasis basis)
In the above equation, represents the number of days in the period starting with the settlement date and ending with the next coupon date. represents the number of days within the coupon period. represents the number of coupons payable in the timeframe from the settlement date to the redemption date. represents the number of days in the timeframe starting with the beginning of coupon period and ending with the settlement date.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityrate
 a double
which specifies the security's annual
coupon rateyield
 a double
which specifies the security's annual
yieldredemption
 a double
which specifies the security's
redemption value per $100 face valuefrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the price per $100 face
value of a security that pays periodic interestpublic static double price(GregorianCalendar settlement, GregorianCalendar maturity, GregorianCalendar lastCoupon, double rate, double yield, double redemption, int frequency, DayCountBasis basis)
In the case of a short last period with one coupon period or less to redemption, the following formula is used:
where
Variable  Description 

A  Number of days from last coupon date before redemption to settlement date. 
DLC  Number of days from last coupon date before redemption to redemption. 
DSR  Number of days from settlement date to redemption date. 
E  Number of days in the quasicoupon period. 
In the case of a short last period with more than one coupon period to redemption, the following formula is used:
where
Variable  Description 

A  Number of days from beginning of coupon period to settlement date. 
DLC  Number of days from last coupon date before redemption to redemption. 
DSC  Number of days from settlement date to next coupon date. 
E  Number of days in coupon period in which the settlement date falls. 
N  Number of coupons payable between settlement date and last coupon date before redemption. 
NLL  Number of days in the full quasicoupon period in which the odd last period falls. 
In the case of a long last period with one coupon period or less to redemption, the following formula is used:
where
Variable  Description 

A_{i}  Number of accrued days for the i^{th} quasicoupon period within the odd period counting forward from the last interest date before redemption. 
DLC_{i}  Number of days in the i^{th} quasicoupon period as delimited by the length of the actual coupon period. 
DSC_{i}  Number of days from settlement date (or beginning of quasicoupon period) to next quasicoupon within odd period (or to redemption date) for the i^{th} quasicoupon period. 
NCL  Number of quasicoupon periods that fit in odd period. 
NLL_{i}  Normal length in days of the full i^{th} quasicoupon period within odd last period. 
In the case of a long first period with more than one coupon period to redemption, the following formula is used:
where
Variable  Description 

A  Number of days from beginning of coupon period to settlement date. 
DLC_{i}  Number of days from last coupon date before redemption to first quasicoupon or number of days in quasicoupon. 
DLQ  Number of days counted in the last quasicoupon period within the last odd period. 
DSC  Number of days from settlement date to next coupon date. 
E  Number of days in coupon period in which the settlement falls. 
LQL  Normal length in days of the last quasicoupon period within the odd last period. 
N  Number of coupons payable between settlement date and last coupon date before redemption. 
NCL  Number of quasicoupon periods that fit in odd period. 
NLL_{i}  Normal length in days of the full i^{th} quasicoupon period within odd last period. 
Nql  Number of whole quasicoupon periods between last coupon date before redemption and the redemption date. 
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securitylastCoupon
 a GregorianCalendar
last interest date of
the securityrate
 a double
which specifies the security's annual
coupon rateyield
 a double
which specifies the security's annual
yieldredemption
 a double
which specifies the security's
redemption value per $100 face valuefrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
that indicates the bond price.public static double price(GregorianCalendar settlement, GregorianCalendar maturity, GregorianCalendar issueDate, GregorianCalendar firstCoupon, double rate, double yield, double redemption, int frequency, DayCountBasis basis)
In the case of a short first period, the following formula is used:
where
Variable  Description 

A  Number of days from the beginning of coupon period to the settlement date (accrued days). 
DFC  Number of days from the beginning of odd first coupon period
(issueDate ) to the first coupon date. 
DSC  Number of days from the settlement date to first coupon date. 
E  Number of days in the quasicoupon period in which the settlement date falls. 
N  Number of coupons payable between settlement date and redemption date. 
In the case of a long first period, the following formula is used:
where
Variable  Description 

A_{i}  Number of accrued days for the i^{th} quasicoupon period within the odd period. 
DFC_{i}  Number of days from the issueDate to the first
quasicoupon or number of days in the the quasicoupon. 
DSC  Number of days from the settlement date to the next coupon or quasicoupon date. 
E  Number of days in the quasicoupon or coupon period in which the settlement date falls. 
N  Number of coupon periods between the first real coupon date and redemption date. 
NCF  Number of quasicoupon periods that fall in the odd period. 
NLF_{i}  Number of days in the full i^{th} quasicoupon period within the odd period. 
Nqf  Number of whole quasicoupon periods between settlement
and firstCoupon . 
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityissueDate
 a GregorianCalendar
issue date of the
securityfirstCoupon
 a GregorianCalendar
first coupon date of
the securityrate
 a double
which specifies the security's annual
coupon rateyield
 a double
which specifies the security's annual
yieldredemption
 a double
which specifies the security's
redemption value per $100 face valuefrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
that indicates the bond price.public static double pricedisc(GregorianCalendar settlement, GregorianCalendar maturity, double rate, double redemption, DayCountBasis basis)
In the equation above, represents the number of days starting at the settlement date and ending with the maturity date. represents the number of days in a year based on the annual basis.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityrate
 a double
which specifies the security's discount
rateredemption
 a double
which specifies the security's
redemption value per $100 face valuebasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the price per $100 face
value of a discounted securitypublic static double pricemat(GregorianCalendar settlement, GregorianCalendar maturity, GregorianCalendar issue, double rate, double yield, DayCountBasis basis)
In the equation above, represents the number of days in a year based on the annual basis. represents the number of days in the period starting with the settlement date and ending with the maturity date. represents the number of days in the period starting with the issue date and ending with the maturity date. represents the number of days in the period starting with the issue date and ending with the settlement date.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityissue
 a GregorianCalendar
issue date of the securityrate
 a double
which specifies the security's interest
rate at issue dateyield
 a double
which specifies the security's annual
yieldbasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the price per $100 face
value of a security that pays interest at maturitypublic static double priceyield(GregorianCalendar settlement, GregorianCalendar maturity, double yield, double redemption, DayCountBasis basis)
In the equation above, represents the number of days starting at the settlement date and ending with the maturity date. represents the number of days in a year based on the annual basis.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityyield
 a double
which specifies the security's yieldredemption
 a double
which specifies the security's
redemption value per $100 face valuebasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
double
which specifies the price per $100 face
value of a discounted securitypublic static double received(GregorianCalendar settlement, GregorianCalendar maturity, double investment, double rate, DayCountBasis basis)
In the equation above, represents the number of days in a year based on the annual basis, and represents the number of days in the period starting with the issue date and ending with the maturity date.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityinvestment
 a double
which specifies the amount
invested in the securityrate
 a double
which specifies the security's rate at
issue datebasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the amount received at
maturity for a fully invested securitypublic static double tbilleq(GregorianCalendar settlement, GregorianCalendar maturity, double rate)
If
In the above equation, represents the number of days starting at settlement date to maturity date.
settlement
 a GregorianCalendar
settlement date of the
Treasury billmaturity
 a GregorianCalendar
maturity date of the
Treasury bill. The maturity cannot be more than a year after the
settlement.rate
 a double
which specifies the Treasury bill's
discount rate at issue date. The discount rate is an annualized rate of
return based on the par value of the bills. The discount rate is
calculated on a 360day basis (twelve 30day months).double
which specifies the bondequivalent yield
for the Treasury bill. This is an annualized rate based on the purchase
price of the bills and reflects the actual yield to maturity.public static double tbillprice(GregorianCalendar settlement, GregorianCalendar maturity, double rate)
In the equation above, represents the number of days in the period starting with the settlement date and ending with the maturity date (any maturity date that is more than one calendar year after the settlement date is excluded).
settlement
 a GregorianCalendar
settlement date of the
Treasury billmaturity
 a GregorianCalendar
maturity date of the
Treasury bill. The maturity cannot be more than a year after the
settlementrate
 a double
which specifies the Treasury bill's
discount rate at issue date. The discount rate is an annualized rate of
return based on the par value of the bills. The discount rate is
calculated on a 360day basis (twelve 30day months).double
which specifies the price per $100 face
value for the Treasury billpublic static double tbillyield(GregorianCalendar settlement, GregorianCalendar maturity, double price)
In the equation above, represents the number of days in the period starting with the settlement date and ending with the maturity date (any maturity date that is more than one calendar year after the settlement date is excluded).
settlement
 a GregorianCalendar
settlement date of the
Treasury billmaturity
 a GregorianCalendar
maturity date of the
Treasury bill. The maturity cannot be more than a year after the
settlement.price
 a double
which specifies the Treasury bill's
price per $100 face valuedouble
which specifies the yield for the Treasury
bill. This is an annualized rate based on the purchase price of the bills
and reflects the actual yield to maturity.public static double yearfrac(GregorianCalendar start, GregorianCalendar end, DayCountBasis basis)
where equals the number of days from
start
to end
, equals
annual basis.start
 a GregorianCalendar
start date of the securityend
 a GregorianCalendar
end date of the securitybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the annual yield of a
security that pays interest at maturitypublic static double yield(GregorianCalendar settlement, GregorianCalendar maturity, double rate, double price, double redemption, int frequency, DayCountBasis basis)
In the equation above, represents the number of days in the period starting with the settlement date and ending with the redemption date. represents the number of days within the coupon period. represents the number of days in the period starting with the beginning of coupon period and ending with the settlement date.
If there is more than one coupon period, use the following:
In the equation above, represents the number of days in the period from the settlement to the next coupon date. represents the number of days within the coupon period. represents the number of coupons payable in the period starting with the settlement date and ending with the redemption date. represents the number of days in the period starting with the beginning of the coupon period and ending with the settlement date.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityrate
 a double
which specifies the security's annual
coupon rateprice
 a double
which specifies the security's price
per $100 face valueredemption
 a double
which specifies the security's
redemption value per $100 face valuefrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the yield of a security
that pays periodic interestpublic static double yield(GregorianCalendar settlement, GregorianCalendar maturity, GregorianCalendar lastCoupon, double rate, double price, double redemption, int frequency, DayCountBasis basis)
The yield is determined by finding the zero of the function
desired price  computed price, where computed price is the output of
price(java.util.GregorianCalendar,
java.util.GregorianCalendar, java.util.GregorianCalendar, double, double,
double, int, com.imsl.finance.DayCountBasis)
.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securitylastCoupon
 a GregorianCalendar
last coupon date of
the securityrate
 a double
which specifies the security's annual
coupon rateprice
 a double
which specifies the security's price
per $100 face valueredemption
 a double
which specifies the security's
redemption value per $100 face valuefrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the yield of a security
that pays periodic interestpublic static double yield(GregorianCalendar settlement, GregorianCalendar maturity, GregorianCalendar issueDate, GregorianCalendar firstCoupon, double rate, double price, double redemption, int frequency, DayCountBasis basis)
The yield is determined by finding the zero of the function
desired price  computed price, where computed price is the output of
price(java.util.GregorianCalendar,
java.util.GregorianCalendar, java.util.GregorianCalendar,
java.util.GregorianCalendar, double, double, double, int,
com.imsl.finance.DayCountBasis)
.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityissueDate
 a GregorianCalendar
issueDate date of the
securityfirstCoupon
 a GregorianCalendar
first coupon date of
the securityrate
 a double
which specifies the security's annual
coupon rateprice
 a double
which specifies the security's price
per $100 face valueredemption
 a double
which specifies the security's
redemption value per $100 face valuefrequency
 an int
which specifies the number of coupon
payments per year: ANNUAL
for annual,
SEMIANNUAL
for semiannual, and QUARTERLY
for
quarterlybasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the yield of a security
that pays periodic interestpublic static double yielddisc(GregorianCalendar settlement, GregorianCalendar maturity, double price, double redemption, DayCountBasis basis)
In the equation above, represents the number of days in a year based on the annual basis, and represents the number of days starting with the settlement date and ending with the maturity date.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityprice
 a double
which specifies the security's price
per $100 face valueredemption
 a double
which specifies the security's
redemption value per $100 face valuebasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the annual yield for a
discounted securitypublic static double yieldmat(GregorianCalendar settlement, GregorianCalendar maturity, GregorianCalendar issue, double rate, double price, DayCountBasis basis)
In the equation above, represents the number of days in the period starting with the issue date and ending with the maturity date. represents the number of days in the period starting with the settlement date and ending with the maturity date. represents the number of days in the period starting with the issue date and ending with the settlement date. represents the number of days in a year based on the annual basis.
settlement
 a GregorianCalendar
settlement date of the
securitymaturity
 a GregorianCalendar
maturity date of the
securityissue
 a GregorianCalendar
issue date of the securityrate
 a double
which specifies the security's interest
rate at date of issueprice
 a double
which specifies the security's price
per $100 face valuebasis
 a DayCountBasis
object which contains the type
of day count basis to use. See DayCountBasis
.double
which specifies the annual yield of a
security that pays interest at maturityCopyright © 19702015 Rogue Wave Software
Built October 13 2015.