WebCab Bonds Demo
(J2EE Edition)

com.webcab.ejb.finance.bonds
Interface FixedInterestBondsLocal

All Superinterfaces:
EJBLocalObject

public interface FixedInterestBondsLocal
extends EJBLocalObject

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

See Also:
FixedInterestBonds

Method Summary
 double currentPrice(double coupon, double grossRedemption, Date evaluationDate, Date redemptionDate, BusinessCalendar businessCalendar)
          Method currentPrice(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double currentPrice(double coupon, double grossRedemption, int redemption)
          Method currentPrice(double, double, int) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, Date evaluationDate, Date redemptionDate, BusinessCalendar businessCalendar)
          Method grossRedemptionYield(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, Date evaluationDate, Date redemptionDate, double upperLimit, double precision, BusinessCalendar businessCalendar)
          Method grossRedemptionYield(double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, double nextCoupon, Date couponDate, Date redemption, Date evaluationDate, BusinessCalendar businessCalendar)
          Method grossRedemptionYield(double, double, double, java.util.Date, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, double nextCoupon, Date interestDate, Date redemptionDate, Date evaluationDate, Date couponDate, double upperLimit, double precision, BusinessCalendar businessCalendar)
          Method grossRedemptionYield(double, double, double, java.util.Date, java.util.Date, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, double nextCoupon, int years2Redemption, double years2Coupon)
          Method grossRedemptionYield(double, double, double, int, double) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, double nextCoupon, int years2Redemp, double time2Coupon, double upperLimit, double precision)
          Method grossRedemptionYield(double, double, double, int, double, double, double) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, int redemption)
          Method grossRedemptionYield(double, double, int) as defined in the FixedInterestBonds remote interface.
 double grossRedemptionYield(double price, double coupon, int redemption, double upperLimit, double precision)
          Method grossRedemptionYield(double, double, int, double, double) as defined in the FixedInterestBonds remote interface.
 double holdingPeriodReturn(double price, double coupon, double sellingPrice, Date purchaseDate, Date saleDate, BusinessCalendar businessCalendar)
          Method holdingPeriodReturn(double, double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double holdingPeriodReturn(double purchasePrice, double coupon, double sellingPrice, Date purchaseDate, Date saleDate, double upperBound, double precision, BusinessCalendar businessCalendar)
          Method holdingPeriodReturn(double, double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double holdingPeriodReturn(double price, double coupon, double sellingPrice, int yearsHeld)
          Method holdingPeriodReturn(double, double, double, int) as defined in the FixedInterestBonds remote interface.
 double holdingPeriodReturn(double purchasePrice, double coupon, double sellingPrice, int yearsHeld, double upperBound, double precision)
          Method holdingPeriodReturn(double, double, double, int, double, double) as defined in the FixedInterestBonds remote interface.
 double netRedemptionYield(double price, double coupon, double taxRate, Date evaluationDate, Date redemptionDate, BusinessCalendar businessCalendar)
          Method netRedemptionYield(double, double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double netRedemptionYield(double price, double coupon, double taxRate, Date evaluationDate, Date redemptionDate, double upperBound, double precision, BusinessCalendar businessCalendar)
          Method netRedemptionYield(double, double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double netRedemptionYield(double price, double coupon, double taxRate, int yearsToRedemption)
          Method netRedemptionYield(double, double, double, int) as defined in the FixedInterestBonds remote interface.
 double netRedemptionYield(double price, double coupon, double taxRate, int yearsToRedemption, double upperBound, double precision)
          Method netRedemptionYield(double, double, double, int, double, double) as defined in the FixedInterestBonds remote interface.
 double simpleYieldToMaturity(double price, double coupon, Date evaluationDate, Date redemptionDate, BusinessCalendar businessCalendar)
          Method simpleYieldToMaturity(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.
 double simpleYieldToMaturity(double price, double coupon, double redemption)
          Method simpleYieldToMaturity(double, double, double) as defined in the FixedInterestBonds remote interface.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   Date evaluationDate,
                                   Date redemptionDate,
                                   BusinessCalendar businessCalendar)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield (in decimal format) of a fixed-interest bond on an interest payment date where there is an integer number of years until the bond matures. That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account.

Remarks:

Parameters:
coupon - the coupon per annum convertible half-yearly
price - the current price of the bond, including accrued interest
evaluationDate - the date on which the gross redemption yield is evaluated
redemptionDate - the redemption (or maturity) date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Returns:
the gross redemption yield in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - thrown is a solution cannot be found
FixedInterestBondsDemoException
See Also:
grossRedemptionYield - Offering the same functionality except that here the internal equation solver algorithms parameters can be set., FixedInterestBonds.grossRedemptionYield(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar)

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   int redemption)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, int) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield (in decimal format) of a fixed-interest bond on an interest payment date where there is an integer number of years until the bond matures. That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account.

Remarks:

Parameters:
coupon - the coupon per annum convertible half-yearly
price - the current price of the bond, including accrued interest
redemption - the integer number of years until redemption (i.e. the maturity of the bond)
Returns:
the gross redemption yield in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - thrown is a solution cannot be found
FixedInterestBondsDemoException
See Also:
grossRedemptionYield - Offering the same functionality except that here the internal equation solver algorithms parameters can be set., FixedInterestBonds.grossRedemptionYield(double, double, int)

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   Date evaluationDate,
                                   Date redemptionDate,
                                   double upperLimit,
                                   double precision,
                                   BusinessCalendar businessCalendar)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield of a fixed interest bond on an interest bearing date where there is an integer number of years until redemption (i.e. maturity). That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account. This procedure offers the same functionality as the method (double,double, int) except that here the internal equation solving algorithms parameters can be set. That is, the upper bound of the interval over which the yield is sort and the precision of the returned valued can be specified.

Remarks:

Parameters:
coupon - the coupon per annum paid by the fixed interest bond convertible half-yearly
price - the current market price of the bond
upperLimit - the upper bound of the interval over which the yield will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the yield is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
evaluationDate - the date on which the gross redemption yield is evaluated
redemptionDate - the redemption date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Returns:
the gross redemption yield in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - if there can not be found a solution for this equation
FixedInterestBondsDemoException
See Also:
- Offering the same functionality except that here the internal equation solver has pre-fixed algorithm parameters., FixedInterestBonds.grossRedemptionYield(double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar)

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   int redemption,
                                   double upperLimit,
                                   double precision)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, int, double, double) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield of a fixed interest bond on an interest bearing date where there is an integer number of years until redemption (i.e. maturity). That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account. This procedure offers the same functionality as the method (double,double, int) except that here the internal equation solving algorithms parameters can be set. That is, the upper bound of the interval over which the yield is sort and the precision of the returned valued can be specified.

Remarks:

Parameters:
coupon - the coupon per annum paid by the fixed interest bond convertible half-yearly
price - the current market price of the bond
redemption - the integer number of years until redemption (i.e. maturity). For example, 1 would implied that there is exactly 1 year until the bond matures.
upperLimit - the upper bound of the interval over which the yield will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the yield is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
Returns:
the gross redemption yield in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - if there can not be found a solution for this equation
FixedInterestBondsDemoException
See Also:
- Offering the same functionality except that here the internal equation solver has pre-fixed algorithm parameters., FixedInterestBonds.grossRedemptionYield(double, double, int, double, double)

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   double nextCoupon,
                                   Date couponDate,
                                   Date redemption,
                                   Date evaluationDate,
                                   BusinessCalendar businessCalendar)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, double, java.util.Date, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield if there is less than half a year to the next coupon payment and there is a whole number of years from the next coupon until the maturity of the bond. That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account.

Remarks:

Parameters:
price - the current market price of the bond
coupon - the coupon per annum payable in half-yearly installments
nextCoupon - the next interest payment which will be received in `years2Coupon' years expressed as a decimal
evaluationDate - the date when the gross redemption yield is evaluated
couponDate - the date when the next coupon in paid
redemption - the redemption (i.e. maturity) date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Throws:
NoSolutionException - thrown if no solution was found for the yield within the range 0 - 200 percent.
FixedInterestBondsDemoException
See Also:
also evaluates the gross redemption yield using the same approach but allow the upper bound over which the yield is sort and the precision with which it is returned to be specified., FixedInterestBonds.grossRedemptionYield(double, double, double, java.util.Date, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar)

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   double nextCoupon,
                                   int years2Redemption,
                                   double years2Coupon)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, double, int, double) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield if there is less than half a year to the next coupon payment and there is a whole number of years from the next coupon until the maturity of the bond. That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account.

Remarks:

Parameters:
price - the current market price of the bond
coupon - the coupon per annum payable in half-yearly installments
nextCoupon - the next interest payment which will be received in `years2Coupon' years expressed as a decimal
years2Coupon - the number of years (in decimal format) until the next coupon payment
years2Redemption - the number of (whole) years from the next interest payment date to the redemption date
Throws:
NoSolutionException - thrown if no solution was found for the yield within the range 0 - 200 percent.
FixedInterestBondsDemoException
See Also:
also evaluates the gross redemption yield using the same approach but allow the upper bound over which the yield is sort and the precision with which it is returned to be specified., FixedInterestBonds.grossRedemptionYield(double, double, double, int, double)

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   double nextCoupon,
                                   Date interestDate,
                                   Date redemptionDate,
                                   Date evaluationDate,
                                   Date couponDate,
                                   double upperLimit,
                                   double precision,
                                   BusinessCalendar businessCalendar)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, double, java.util.Date, java.util.Date, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield if there is less than half a year to the next coupon payment and there in an whole number of years from the next coupon until the maturity of the bond. That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account. This procedure offers the same functionality as the method (double,double, double, int, double) except that here the internal equation solving algorithms parameters can be set. That is, the interval over which the yield is sort and the precision with which the result is returned can be specified.

Remarks:

Parameters:
price - the current market price of the fixed interest bond
coupon - the coupon per annum payable in half-yearly installments
nextCoupon - the next interest payment which will be received in `yearsToNextPayment' years expressed as a decimal
upperLimit - the upper bound of the interval over which the yield will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the yield is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
evaluationDate - the date on which the gross redemption yield is evaluation
couponDate - the date on which the next coupon is paid
redemptionDate - the redemption date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the yield can be found for the given search interval
FixedInterestBondsDemoException
See Also:
FixedInterestBonds.grossRedemptionYield(double, double, double, java.util.Date, java.util.Date, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar)

grossRedemptionYield

public double grossRedemptionYield(double price,
                                   double coupon,
                                   double nextCoupon,
                                   int years2Redemp,
                                   double time2Coupon,
                                   double upperLimit,
                                   double precision)
                            throws NoSolutionException,
                                   FixedInterestBondsDemoException
Method grossRedemptionYield(double, double, double, int, double, double, double) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the gross redemption yield if there is less than half a year to the next coupon payment and there in an whole number of years from the next coupon until the maturity of the bond. That is, the total (annual) yield of the fixed interest bond from now until maturity where the tax implications of the investor are not taken into account. This procedure offers the same functionality as the method (double,double, double, int, double) except that here the internal equation solving algorithms parameters can be set. That is, the interval over which the yield is sort and the precision with which the result is returned can be specified.

Remarks:

Parameters:
price - the current market price of the fixed interest bond
coupon - the coupon per annum payable in half-yearly installments
nextCoupon - the next interest payment which will be received in `yearsToNextPayment' years expressed as a decimal
time2Coupon - the number of years (in decimal format) until the next coupon payment
upperLimit - the upper bound of the interval over which the yield will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the yield is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the yield can be found for the given search interval
FixedInterestBondsDemoException
See Also:
FixedInterestBonds.grossRedemptionYield(double, double, double, int, double, double, double)

netRedemptionYield

public double netRedemptionYield(double price,
                                 double coupon,
                                 double taxRate,
                                 Date evaluationDate,
                                 Date redemptionDate,
                                 BusinessCalendar businessCalendar)
                          throws NoSolutionException,
                                 FixedInterestBondsDemoException
Method netRedemptionYield(double, double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the net redemption yield excluding capital gains tax (CGT) where the term to redemption is an integer number of years. That is, the yield of the bond is evaluated where the income tax of the investor is taken into account (i.e. gross yield minus the income tax) and there are an integer number of years until the bond matures.

Remarks:

Parameters:
price - the current market price of the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, paid in half-yearly installments)
taxRate - the investor's rate of tax on income in decimal format (i.e. 1 percent = 0.01)
evaluationDate - the date on which the net redemption yield is evaluated
redemptionDate - the redemption date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the yield can be found within the interval 0 - 200 percent.
FixedInterestBondsDemoException
See Also:
also evaluates the net redemption yield using the same approach but allow the upper bound over which the yield is sort and the precision with which it is returned to be specified., FixedInterestBonds.netRedemptionYield(double, double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar)

netRedemptionYield

public double netRedemptionYield(double price,
                                 double coupon,
                                 double taxRate,
                                 int yearsToRedemption)
                          throws NoSolutionException,
                                 FixedInterestBondsDemoException
Method netRedemptionYield(double, double, double, int) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the net redemption yield excluding capital gains tax (CGT) where the term to redemption is an integer number of years. That is, the yield of the bond is evaluated where the income tax of the investor is taken into account (i.e. gross yield minus the income tax) and there are an integer number of years until the bond matures.

Remarks:

Parameters:
price - the current market price of the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, paid in half-yearly installments)
taxRate - the investor's rate of tax on income in decimal format (i.e. 1 percent = 0.01)
yearsToRedemption - the number of (whole) year until the redemption (or maturity) of the bond
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the yield can be found within the interval 0 - 200 percent.
FixedInterestBondsDemoException
See Also:
also evaluates the net redemption yield using the same approach but allow the upper bound over which the yield is sort and the precision with which it is returned to be specified., FixedInterestBonds.netRedemptionYield(double, double, double, int)

netRedemptionYield

public double netRedemptionYield(double price,
                                 double coupon,
                                 double taxRate,
                                 Date evaluationDate,
                                 Date redemptionDate,
                                 double upperBound,
                                 double precision,
                                 BusinessCalendar businessCalendar)
                          throws NoSolutionException,
                                 FixedInterestBondsDemoException
Method netRedemptionYield(double, double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the net redemption yield excluding capital gains tax (CGT) where the term to redemption is an integer number of years. That is, the yield of the bond is evaluated where the income tax of the investor is taken into account (i.e. the gross yield minus the income tax) and there are an integer number of years until the bond matures.

This procedure offers the same functionality as the method (double, double, double, int) except that here the internal equation solving algorithm parameters can be set. These parameters are the upper bound of the yield over which the solution is searched and the precision of the returned result can be specified.

Remarks:

Parameters:
price - the current market price of the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, paid in half-yearly installments)
taxRate - the investor's rate of tax on income in decimal format (i.e. 1 percent = 0.01)
upperBound - the upper bound of the interval over which the yield will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the yield is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
evaluationDate - the date on which the net redemption yield is evaluated
redemptionDate - the redemption date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the yield can be found for the given search interval
FixedInterestBondsDemoException
See Also:
netRedemptionYield(double, double, double, int) also evaluates the net redemption yield but here the upper bound and the precision are given pre-set values, namely 200 percent and 0.001 respectively., FixedInterestBonds.netRedemptionYield(double, double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar)

netRedemptionYield

public double netRedemptionYield(double price,
                                 double coupon,
                                 double taxRate,
                                 int yearsToRedemption,
                                 double upperBound,
                                 double precision)
                          throws NoSolutionException,
                                 FixedInterestBondsDemoException
Method netRedemptionYield(double, double, double, int, double, double) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the net redemption yield excluding capital gains tax (CGT) where the term to redemption is an integer number of years. That is, the yield of the bond is evaluated where the income tax of the investor is taken into account (i.e. the gross yield minus the income tax) and there are an integer number of years until the bond matures.

This procedure offers the same functionality as the method (double, double, double, int) except that here the internal equation solving algorithm parameters can be set. These parameters are the upper bound of the yield over which the solution is searched and the precision of the returned result can be specified.

Remarks:

Parameters:
price - the current market price of the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, paid in half-yearly installments)
taxRate - the investor's rate of tax on income in decimal format (i.e. 1 percent = 0.01)
yearsToRedemption - the number of (whole) year until the redemption (or maturity) of the bond
upperBound - the upper bound of the interval over which the yield will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the yield is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the yield can be found for the given search interval
FixedInterestBondsDemoException
See Also:
netRedemptionYield(double, double, double, int) also evaluates the net redemption yield but here the upper bound and the precision are given pre-set values, namely 200 percent and 0.001 respectively., FixedInterestBonds.netRedemptionYield(double, double, double, int, double, double)

holdingPeriodReturn

public double holdingPeriodReturn(double price,
                                  double coupon,
                                  double sellingPrice,
                                  Date purchaseDate,
                                  Date saleDate,
                                  BusinessCalendar businessCalendar)
                           throws NoSolutionException,
                                  FixedInterestBondsDemoException
Method holdingPeriodReturn(double, double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the half-yearly holding period return on an interest payment date when the bond is held for a (whole) number of years. Recall that, the holding period return is the return over the period that the bond was held by the investor.

Remarks:

Parameters:
price - the purchase price on the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, payable in half-yearly installments)
sellingPrice - the market price at which the investor can sell the bond (when the holding period is evaluated)
purchaseDate - the date when the asset is purchased
saleDate - the date when the asset is sold
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Returns:
the holding period return in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - if no solution to the equation can be found
FixedInterestBondsDemoException
See Also:
holdingPeriodReturn(double, double, double, int, double, double) also evaluates the holding period return using the same approach but allow the upper bound over which the return is sort and the precision with which it is returned to be specified., FixedInterestBonds.holdingPeriodReturn(double, double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar)

holdingPeriodReturn

public double holdingPeriodReturn(double price,
                                  double coupon,
                                  double sellingPrice,
                                  int yearsHeld)
                           throws NoSolutionException,
                                  FixedInterestBondsDemoException
Method holdingPeriodReturn(double, double, double, int) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the half-yearly holding period return on an interest payment date when the bond is held for a (whole) number of years. Recall that, the holding period return is the return over the period that the bond was held by the investor.

Remarks:

Parameters:
price - the purchase price on the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, payable in half-yearly installments)
yearsHeld - the number of (whole) years over which the bond in held
sellingPrice - the market price at which the investor can sell the bond (when the holding period is evaluated)
Returns:
the holding period return in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - if no solution to the equation can be found
FixedInterestBondsDemoException
See Also:
holdingPeriodReturn(double, double, double, int, double, double) also evaluates the holding period return using the same approach but allow the upper bound over which the return is sort and the precision with which it is returned to be specified., FixedInterestBonds.holdingPeriodReturn(double, double, double, int)

holdingPeriodReturn

public double holdingPeriodReturn(double purchasePrice,
                                  double coupon,
                                  double sellingPrice,
                                  Date purchaseDate,
                                  Date saleDate,
                                  double upperBound,
                                  double precision,
                                  BusinessCalendar businessCalendar)
                           throws NoSolutionException,
                                  FixedInterestBondsDemoException
Method holdingPeriodReturn(double, double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the half-yearly holding period return on an interest payment date when the asset is held for a whole number of years in accordance with user defined algorithm specific parameters. Recall that, the holding period return is the yield over the period that the bond was held by the investor.

This procedure offers the same functionality as the method holdingPeriodReturn(double, double, double, int) except that here the internal equation solving algorithm parameters can be set. This is, the upper bound of the return over which the solution is searched and the precision of the returned result can be specified.

Remarks:

Parameters:
purchasePrice - the purchase price of the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, payable in half yearly-installments)
sellingPrice - the market price at which the investor can sell the bond (when the holding period return is evaluated)
upperBound - the upper bound of the interval over which the (holding period) return will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the (annual) return is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
purchaseDate - the date when the asset is purchased
saleDate - the date when the holding period return is evaluated
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
Returns:
the holding period return in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the holding period return can be found for the given search interval selected.
FixedInterestBondsDemoException
See Also:
also evaluates the holding period return but here the upper bound and the precision are given pre-set values, namely 200 percent and 0.001 respectively., FixedInterestBonds.holdingPeriodReturn(double, double, double, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar)

holdingPeriodReturn

public double holdingPeriodReturn(double purchasePrice,
                                  double coupon,
                                  double sellingPrice,
                                  int yearsHeld,
                                  double upperBound,
                                  double precision)
                           throws NoSolutionException,
                                  FixedInterestBondsDemoException
Method holdingPeriodReturn(double, double, double, int, double, double) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the half-yearly holding period return on an interest payment date when the asset is held for a whole number of years in accordance with user defined algorithm specific parameters. Recall that, the holding period return is the yield over the period that the bond was held by the investor.

This procedure offers the same functionality as the method holdingPeriodReturn(double, double, double, int) except that here the internal equation solving algorithm parameters can be set. This is, the upper bound of the return over which the solution is searched and the precision of the returned result can be specified.

Remarks:

Parameters:
purchasePrice - the purchase price of the bond
coupon - the annual coupon of the bond convertible half-yearly (that is, payable in half yearly-installments)
yearsHeld - the number of (whole) years over which the bond is held
sellingPrice - the market price at which the investor can sell the bond (when the holding period return is evaluated)
upperBound - the upper bound of the interval over which the (holding period) return will be sort. If you are unsure as to a suitable value then by setting this parameter to 2 you will cover all cases where the (annual) return is less than 200 percent.
precision - the accuracy of the result. This is an internal parameter used by the equation solver algorithm, the smaller the precision required the more accurate the result but also the longer the computation will take. A suitable value for this parameter is 0.0001.
Returns:
the holding period return in decimal format (i.e. 1 percent = 0.01)
Throws:
NoSolutionException - thrown if no solution to the equation corresponding to the holding period return can be found for the given search interval selected.
FixedInterestBondsDemoException
See Also:
also evaluates the holding period return but here the upper bound and the precision are given pre-set values, namely 200 percent and 0.001 respectively., FixedInterestBonds.holdingPeriodReturn(double, double, double, int, double, double)

simpleYieldToMaturity

public double simpleYieldToMaturity(double price,
                                    double coupon,
                                    Date evaluationDate,
                                    Date redemptionDate,
                                    BusinessCalendar businessCalendar)
                             throws FixedInterestBondsDemoException
Method simpleYieldToMaturity(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Returns the simple yield to maturity of a fixed-interest bond.

Remark Within Japanese bond markets the concept of simple interest is used when calculating the yield to maturity rather than the usual compound interest method (i.e. redemption yield).

Parameters:
price - the current market price of the bond (this may including accrued interest
coupon - the annual coupon payable in half yearly installments
evaluationDate - the date when the simple yield to maturity is evaluated
redemptionDate - the redemption date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
FixedInterestBondsDemoException
See Also:
FixedInterestBonds.simpleYieldToMaturity(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar)

simpleYieldToMaturity

public double simpleYieldToMaturity(double price,
                                    double coupon,
                                    double redemption)
                             throws FixedInterestBondsDemoException
Method simpleYieldToMaturity(double, double, double) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Returns the simple yield to maturity of a fixed-interest bond.

Remark Within Japanese bond markets the concept of simple interest is used when calculating the yield to maturity rather than the usual compound interest method (i.e. redemption yield).

Parameters:
price - the current market price of the bond (this may including accrued interest
coupon - the annual coupon payable in half yearly installments
redemption - the time in years expressed in decimal format until the redemption of the bond
FixedInterestBondsDemoException
See Also:
FixedInterestBonds.simpleYieldToMaturity(double, double, double)

currentPrice

public double currentPrice(double coupon,
                           double grossRedemption,
                           Date evaluationDate,
                           Date redemptionDate,
                           BusinessCalendar businessCalendar)
                    throws FixedInterestBondsDemoException
Method currentPrice(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the current price of a fixed-interest bond where there is an integer number of years until the redemption of the bond.

Parameters:
coupon - annual coupon of the bond
grossRedemption - the gross redemption yield of the fixed-interest bond
evaluationDate - the evaluation date
redemptionDate - the redemption date of the bond
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
FixedInterestBondsDemoException
See Also:
FixedInterestBonds.currentPrice(double, double, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar)

currentPrice

public double currentPrice(double coupon,
                           double grossRedemption,
                           int redemption)
                    throws FixedInterestBondsDemoException
Method currentPrice(double, double, int) as defined in the FixedInterestBonds remote interface.

Description copied from the FixedInterestBonds interface:

Calculates the current price of a fixed-interest bond where there is an integer number of years until the redemption of the bond.

Parameters:
coupon - annual coupon of the bond
grossRedemption - the gross redemption yield of the fixed-interest bond
redemption - the (whole) number of years until redemption on the bond
FixedInterestBondsDemoException
See Also:
FixedInterestBonds.currentPrice(double, double, int)

WebCab Bonds Demo
(J2EE Edition)