WebCab Bonds Demo
(J2EE Edition)

com.webcab.ejb.finance.bonds
Interface CalculatingZeroRatesLocal

All Superinterfaces:
EJBLocalObject

public interface CalculatingZeroRatesLocal
extends EJBLocalObject

Local interface of CalculatingZeroRates. This interface provides the same functionality as the CalculatingZeroRates remote interface.

See Also:
CalculatingZeroRates

Method Summary
 double zeroRateBootstrap(Date evaluationDate, Date maturityDate, double[] couponPayments, Date[] couponPaymentDates, double[] zeroRates, double marketPrice, double principleSum, BusinessCalendar businessCalendar)
          Method zeroRateBootstrap(java.util.Date, java.util.Date, double[], java.util.Date[], double[], double, double, webcab.lib.calendar.BusinessCalendar) as defined in the CalculatingZeroRates remote interface.
 double zeroRateBootstrap(double time2Maturity, double[] couponPayments, double[] time2Coupons, double[] zeroRates, double marketPrice, double principleSum)
          Method zeroRateBootstrap(double, double[], double[], double[], double, double) as defined in the CalculatingZeroRates remote interface.
 double zeroRateCurve(double[] zeroRates, Date evaluationDate, Date[] maturityDates, double maturityRequired, BusinessCalendar businessCalendar)
          Method zeroRateCurve(double[], java.util.Date, java.util.Date[], double, webcab.lib.calendar.BusinessCalendar) as defined in the CalculatingZeroRates remote interface.
 double zeroRateCurve(double[] zeroRates, double[] maturities, double maturityRequired)
          Method zeroRateCurve(double[], double[], double) as defined in the CalculatingZeroRates remote interface.
 double zeroRateFromZeroBond(Date evaluationDate, Date maturityDate, double principleSum, double marketPrice, BusinessCalendar businessCalendar)
          Method zeroRateFromZeroBond(java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the CalculatingZeroRates remote interface.
 double zeroRateFromZeroBond(double time2Maturity, double principleSum, double marketPrice)
          Method zeroRateFromZeroBond(double, double, double) as defined in the CalculatingZeroRates remote interface.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

zeroRateFromZeroBond

public double zeroRateFromZeroBond(Date evaluationDate,
                                   Date maturityDate,
                                   double principleSum,
                                   double marketPrice,
                                   BusinessCalendar businessCalendar)
                            throws CalculatingZeroRatesDemoException
Method zeroRateFromZeroBond(java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the CalculatingZeroRates remote interface.

Description copied from the CalculatingZeroRates interface:

Evaluates the continuously compounded zero rate implied from the market price of a zero coupon bond. Recall that a zero coupon bind is a bond which does not pay any coupons.

Remarks:

  1. This procedure can be applied to the construction of the zero rate curve (i.e. the zero rate against the maturity).
  2. Risk arbitrage will ensure that a class of interest rate assets which exhibit is similar risk profile will all have similar zero rate curves. Therefore, for classes of assets such a US Treasury bonds (i.e. all have zero risk of default) will all have zero rate which lie on the same zero curve.

Parameters:
principleSum - the principle sum of the bond (also known as the face value)
marketPrice - the market price of the bond
evaluationDate - the date when the zero rate of the bond is being evaluated.
maturityDate - the date when the bond matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
CalculatingZeroRatesDemoException
See Also:
CalculatingZeroRates.zeroRateFromZeroBond(java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar)

zeroRateFromZeroBond

public double zeroRateFromZeroBond(double time2Maturity,
                                   double principleSum,
                                   double marketPrice)
                            throws CalculatingZeroRatesDemoException
Method zeroRateFromZeroBond(double, double, double) as defined in the CalculatingZeroRates remote interface.

Description copied from the CalculatingZeroRates interface:

Evaluates the continuously compounded zero rate implied from the market price of a zero coupon bond. Recall that a zero coupon bind is a bond which does not pay any coupons.

Remarks:

  1. This procedure can be applied to the construction of the zero rate curve (i.e. the zero rate against the maturity).
  2. Risk arbitrage will ensure that a class of interest rate assets which exhibit is similar risk profile will all have similar zero rate curves. Therefore, for classes of assets such a US Treasury bonds (i.e. all have zero risk of default) will all have zero rate which lie on the same zero curve.

Parameters:
time2Maturity - the time in years expressed in decimal format until the bond matures
principleSum - the principle sum of the bond (also known as the face value)
marketPrice - the market price of the bond
CalculatingZeroRatesDemoException
See Also:
CalculatingZeroRates.zeroRateFromZeroBond(double, double, double)

zeroRateBootstrap

public double zeroRateBootstrap(Date evaluationDate,
                                Date maturityDate,
                                double[] couponPayments,
                                Date[] couponPaymentDates,
                                double[] zeroRates,
                                double marketPrice,
                                double principleSum,
                                BusinessCalendar businessCalendar)
                         throws CalculatingZeroRatesDemoException
Method zeroRateBootstrap(java.util.Date, java.util.Date, double[], java.util.Date[], double[], double, double, webcab.lib.calendar.BusinessCalendar) as defined in the CalculatingZeroRates remote interface.

Description copied from the CalculatingZeroRates interface:

This method implements what is generally referred to as the bootstrap method. It allows the zero rate to be deduced from the market price of a coupon paying bond for the maturity of the coupon paying bond. The zero rates of maturities corresponding to the time from the coupon payment until the maturity of the bond must be known.

Remark: This procedure can to applied to the construction of the zero rate curve (i.e. the zero rate against the maturity of the interest rate asset).

Parameters:
couponPayments - an array where the first term corresponds to the first coupon and the second term corresponds to the second coupon and so on...
zeroRates - an array where the first term corresponds to the zero rate of the maturity of the first coupon payment and the second term corresponds to the zero rate of the second coupon payment. Note that, each of the zero rates for each maturity is given in decimal format (for example, 5 percent = 0.05).
marketPrice - the market price of the coupon paying bond
principleSum - the principle sum of the coupon paying bond which is repaid at the maturity of the bond
couponPaymentDates - an array of dates where the first element corresponds to the payment date of the first coupon and the second element corresponds to the payment date of the second coupon and so on...
evaluationDate - the date when the bonds zero rate is evaluated
maturityDate - the date when the bond matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
CalculatingZeroRatesDemoException
See Also:
CalculatingZeroRates.zeroRateBootstrap(java.util.Date, java.util.Date, double[], java.util.Date[], double[], double, double, webcab.lib.calendar.BusinessCalendar)

zeroRateBootstrap

public double zeroRateBootstrap(double time2Maturity,
                                double[] couponPayments,
                                double[] time2Coupons,
                                double[] zeroRates,
                                double marketPrice,
                                double principleSum)
                         throws CalculatingZeroRatesDemoException
Method zeroRateBootstrap(double, double[], double[], double[], double, double) as defined in the CalculatingZeroRates remote interface.

Description copied from the CalculatingZeroRates interface:

This method implements what is generally referred to as the bootstrap method. It allows the zero rate to be deduced from the market price of a coupon paying bond for the maturity of the coupon paying bond. The zero rates of maturities corresponding to the time from the coupon payment until the maturity of the bond must be known.

Remark: This procedure can to applied to the construction of the zero rate curve (i.e. the zero rate against the maturity of the interest rate asset).

Parameters:
time2Maturity - the time in years expressed in decimal format (i.e. 3 years 6 months = 3.5) until the bond matures
couponPayments - an array where the first term corresponds to the first coupon and the second term corresponds to the second coupon and so on...
time2Coupons - an array where the first term corresponds to the time until the first coupon payment and the second term corresponds to the time until the second payments and so on...
zeroRates - an array where the first term corresponds to the zero rate of the maturity of the first coupon payment and the second term corresponds to the zero rate of the second coupon payment. Note that, each of the zero rates for each maturity is given in decimal format (for example, 5 percent = 0.05).
marketPrice - the market price of the coupon paying bond
principleSum - the principle sum of the coupon paying bond which is repaid at the maturity of the bond
CalculatingZeroRatesDemoException
See Also:
CalculatingZeroRates.zeroRateBootstrap(double, double[], double[], double[], double, double)

zeroRateCurve

public double zeroRateCurve(double[] zeroRates,
                            Date evaluationDate,
                            Date[] maturityDates,
                            double maturityRequired,
                            BusinessCalendar businessCalendar)
                     throws CalculatingZeroRatesDemoException
Method zeroRateCurve(double[], java.util.Date, java.util.Date[], double, webcab.lib.calendar.BusinessCalendar) as defined in the CalculatingZeroRates remote interface.

Description copied from the CalculatingZeroRates interface:

Here we construct the zero rate curve from known zero rates. In particular, we apply the (usual) convention that the zero curve in linear between known points of the curve (that is, known zero rates) and is constant (i.e. flat) for maturities less than the lowest known maturity, or greater than the highest known maturity.

Parameters:
zeroRates - an array where the 1st term corresponds to the known zero rate with the lowest maturity, and the second term corresponds to the zero rate with the next lowest maturity and so on.
maturityRequired - this the maturity of the zero rate which will be returned by the method
evaluationDate - the date when the zero rate curve in constructed. Note that the zero rate curve just like the zero rates themselves will vary with time.
maturityDates - the dates which correspond to the maturities of the zero rates. That is, the first maturity date corresponds to the maturity of the zero rate with the nearest maturity, the second (date) term corresponds to the maturity of the zero rate with the next nearest maturity.
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Returns:
the zero rate for the required maturity in decimal format (i.e. 1 percent = 0.01)
CalculatingZeroRatesDemoException
See Also:
CalculatingZeroRates.zeroRateCurve(double[], java.util.Date, java.util.Date[], double, webcab.lib.calendar.BusinessCalendar)

zeroRateCurve

public double zeroRateCurve(double[] zeroRates,
                            double[] maturities,
                            double maturityRequired)
                     throws CalculatingZeroRatesDemoException
Method zeroRateCurve(double[], double[], double) as defined in the CalculatingZeroRates remote interface.

Description copied from the CalculatingZeroRates interface:

Here we construct the zero rate curve from known zero rates. In particular, we apply the (usual) convention that the zero curve in linear between known points of the curve (that is, known zero rates) and is constant (i.e. flat) for maturities less than the lowest known maturity, or greater than the highest known maturity.

Parameters:
zeroRates - an array where the 1st term corresponds to the known zero rate with the lowest maturity, and the second term corresponds to the zero rate with the next lowest maturity and so on.
maturities - an array where the 1st term corresponds to the maturity (in years) of the zero rate with the lowest maturity, the second term corresponds to the maturity (in years) of the zero rate with the next lowest maturity and so on. Note that each maturity is given in years in decimal format (i.e. 3 years 6 months = 3.5) and each of the maturities must be distinct.
maturityRequired - this the maturity of the zero rate which will be returned by the method
Returns:
the zero rate for the required maturity in decimal format (i.e. 1 percent = 0.01)
CalculatingZeroRatesDemoException
See Also:
CalculatingZeroRates.zeroRateCurve(double[], double[], double)

WebCab Bonds Demo
(J2EE Edition)