WebCab Bonds Demo
(J2EE Edition)

com.webcab.ejb.finance.bonds
Interface ForwardRatesLocal

All Superinterfaces:
EJBLocalObject

public interface ForwardRatesLocal
extends EJBLocalObject

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

See Also:
ForwardRates

Method Summary
 double forwardRate(double firstZeroRate, double secondZeroRate, Date evaluationDate, Date firstMaturityDate, Date secondMaturityDate, BusinessCalendar businessCalendar)
          Method forwardRate(double, double, java.util.Date, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the ForwardRates remote interface.
 double forwardRate(double firstZeroRate, double secondZeroRate, double firstMaturity, double secondMaturity)
          Method forwardRate(double, double, double, double) as defined in the ForwardRates remote interface.
 double forwardRateAgreement(double principleSum, double agreedRate, Date evaluationDate, Date firstMaturityDate, Date secondMaturityDate, double forwardRate, double zeroRate, BusinessCalendar businessCalendar)
          Method forwardRateAgreement(double, double, java.util.Date, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the ForwardRates remote interface.
 double forwardRateAgreement(double principleSum, double agreedRate, double firstMaturity, double secondMaturity, double forwardRate, double zeroRate)
          Method forwardRateAgreement(double, double, double, double, double, double) as defined in the ForwardRates remote interface.
 double settlement(double principalSum, double agreedRate, Date settlementDate, Date firstMaturityDate, Date secondMaturityDate, double forwardRate, BusinessCalendar businessCalendar)
          Method settlement(double, double, java.util.Date, java.util.Date, java.util.Date, double, webcab.lib.calendar.BusinessCalendar) as defined in the ForwardRates remote interface.
 double settlement(double principalSum, double agreedRate, double firstMaturity, double secondMaturity, double forwardRate)
          Method settlement(double, double, double, double, double) as defined in the ForwardRates remote interface.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

forwardRate

public double forwardRate(double firstZeroRate,
                          double secondZeroRate,
                          Date evaluationDate,
                          Date firstMaturityDate,
                          Date secondMaturityDate,
                          BusinessCalendar businessCalendar)
                   throws ForwardRatesDemoException
Method forwardRate(double, double, java.util.Date, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar) as defined in the ForwardRates remote interface.

Description copied from the ForwardRates interface:

Calculates the forward rate for a period of time between the `firstMaturity' and the `secondMaturity' when the continuously compounded zero rates for the `firstMaturity' and `secondMaturity' are known.

Parameters:
firstZeroRate - the first of the two zero rates
secondZeroRate - the second of the zero rates
evaluationDate - the date when the forward rate is evaluated
firstMaturityDate - the date of the maturity of the first zero rate
secondMaturityDate - the date of the maturity of the second zero rate
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
ForwardRatesDemoException
See Also:
ForwardRates.forwardRate(double, double, java.util.Date, java.util.Date, java.util.Date, webcab.lib.calendar.BusinessCalendar)

forwardRate

public double forwardRate(double firstZeroRate,
                          double secondZeroRate,
                          double firstMaturity,
                          double secondMaturity)
                   throws ForwardRatesDemoException
Method forwardRate(double, double, double, double) as defined in the ForwardRates remote interface.

Description copied from the ForwardRates interface:

Calculates the forward rate for a period of time between the `firstMaturity' and the `secondMaturity' when the continuously compounded zero rates for the `firstMaturity' and `secondMaturity' are known.

Parameters:
firstZeroRate - the first of the two zero rates
secondZeroRate - the second of the zero rates
firstMaturity - the number of years expressed in decimal format of the maturity of the `firstZeroRate'
secondMaturity - the number of years expressed in decimal format of the maturity of the `secondZeroRate'
ForwardRatesDemoException
See Also:
ForwardRates.forwardRate(double, double, double, double)

forwardRateAgreement

public double forwardRateAgreement(double principleSum,
                                   double agreedRate,
                                   Date evaluationDate,
                                   Date firstMaturityDate,
                                   Date secondMaturityDate,
                                   double forwardRate,
                                   double zeroRate,
                                   BusinessCalendar businessCalendar)
                            throws ForwardRatesDemoException
Method forwardRateAgreement(double, double, java.util.Date, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar) as defined in the ForwardRates remote interface.

Description copied from the ForwardRates interface:

Calculates the value of the forward rate agreement (FRA) for a holder which pays an interest rate `agreedRate' within the period between `firstMaturity' and `secondMaturity' on a principle sum `principle'.

Remarks

Parameters:
principleSum - the principle sum which changes hands in the FRA
agreedRate - the rate of interest payment (in decimal format, i.e. 1 percent = 0.01) agreed within the period `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
forwardRate - the forward rate for the period between `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
zeroRate - the continuously compounded zero-coupon interest rate for the maturity `secondMaturity'
evaluationDate - the date when the FRA is evaluated.
firstMaturityDate - the date when the FRA begins.
secondMaturityDate - the date when the FRA ends.
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
ForwardRatesDemoException
See Also:
ForwardRates.forwardRateAgreement(double, double, java.util.Date, java.util.Date, java.util.Date, double, double, webcab.lib.calendar.BusinessCalendar)

forwardRateAgreement

public double forwardRateAgreement(double principleSum,
                                   double agreedRate,
                                   double firstMaturity,
                                   double secondMaturity,
                                   double forwardRate,
                                   double zeroRate)
                            throws ForwardRatesDemoException
Method forwardRateAgreement(double, double, double, double, double, double) as defined in the ForwardRates remote interface.

Description copied from the ForwardRates interface:

Calculates the value of the forward rate agreement (FRA) for a holder which pays an interest rate `agreedRate' within the period between `firstMaturity' and `secondMaturity' on a principle sum `principle'.

Remarks

Parameters:
principleSum - the principle sum which changes hands in the FRA
agreedRate - the rate of interest payment (in decimal format, i.e. 1 percent = 0.01) agreed within the period `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
firstMaturity - the time in years (in decimal format) at which the FRA begins
secondMaturity - the time in years (in decimal format) at which the FRA expires
forwardRate - the forward rate for the period between `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
zeroRate - the continuously compounded zero-coupon interest rate for the maturity `secondMaturity'
ForwardRatesDemoException
See Also:
ForwardRates.forwardRateAgreement(double, double, double, double, double, double)

settlement

public double settlement(double principalSum,
                         double agreedRate,
                         Date settlementDate,
                         Date firstMaturityDate,
                         Date secondMaturityDate,
                         double forwardRate,
                         BusinessCalendar businessCalendar)
                  throws ForwardRatesDemoException
Method settlement(double, double, java.util.Date, java.util.Date, java.util.Date, double, webcab.lib.calendar.BusinessCalendar) as defined in the ForwardRates remote interface.

Description copied from the ForwardRates interface:

Evaluates the cash settlement (or equivalently, the present value of the cash flows) of a forward rate agreement at the point when the interest period starts (which is generally when the FRA will be settled in cash).

Parameters:
agreedRate - the rate of interest payment (in decimal format, i.e. 1% = 0.01) agreed within the period `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
forwardRate - the forward rate for the period between `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
settlementDate - the date when the FRA is settled.
firstMaturityDate - the date when the FRA begins.
secondMaturityDate - the date when the FRA ends.
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
ForwardRatesDemoException
See Also:
ForwardRates.settlement(double, double, java.util.Date, java.util.Date, java.util.Date, double, webcab.lib.calendar.BusinessCalendar)

settlement

public double settlement(double principalSum,
                         double agreedRate,
                         double firstMaturity,
                         double secondMaturity,
                         double forwardRate)
                  throws ForwardRatesDemoException
Method settlement(double, double, double, double, double) as defined in the ForwardRates remote interface.

Description copied from the ForwardRates interface:

Evaluates the cash settlement (or equivalently, the present value of the cash flows) of a forward rate agreement at the point when the interest period starts (which is generally when the FRA will be settled in cash).

Parameters:
agreedRate - the rate of interest payment (in decimal format, i.e. 1% = 0.01) agreed within the period `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
firstMaturity - the time in years (in decimal format) at which the FRA begins
secondMaturity - the time in years (in decimal format) at which the FRA expires
forwardRate - the forward rate for the period between `firstMaturity' and `secondMaturity'. Note that this interest rate is expressed with respect to the compounding period `(firstMaturity - secondMaturity)'
ForwardRatesDemoException
See Also:
ForwardRates.settlement(double, double, double, double, double)

WebCab Bonds Demo
(J2EE Edition)