WebCab Bonds Demo
(J2EE Edition)

com.webcab.ejb.finance.interest
Interface EffectiveAndNominalInterestLocal

All Superinterfaces:
EJBLocalObject

public interface EffectiveAndNominalInterestLocal
extends EJBLocalObject

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

See Also:
EffectiveAndNominalInterest

Method Summary
 double convertYearlyRate(double yearlyRate, int noOfPeriods, int newNoOfPeriods)
          Method convertYearlyRate(double, int, int) as defined in the EffectiveAndNominalInterest remote interface.
 double forceOfInterest(double interest)
          Method forceOfInterest(double) as defined in the EffectiveAndNominalInterest remote interface.
 double nominalRateOfInterest(double interest, int noOfPeriods)
          Method nominalRateOfInterest(double, int) as defined in the EffectiveAndNominalInterest remote interface.
 double realReturn(double yearlyRate, double inflation, int noOfPeriods, int newNoOfPeriods)
          Method realReturn(double, double, int, int) as defined in the EffectiveAndNominalInterest remote interface.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

convertYearlyRate

public double convertYearlyRate(double yearlyRate,
                                int noOfPeriods,
                                int newNoOfPeriods)
                         throws EffectiveAndNominalInterestDemoException
Method convertYearlyRate(double, int, int) as defined in the EffectiveAndNominalInterest remote interface.

Description copied from the EffectiveAndNominalInterest interface:

Converts the effective `yearlyRate' of interest which is quoted in `noOfPeriods'-yearly rate into the `newNoOfPeriods'-yearly rate.

Parameters:
yearlyRate - the interest rate in deciaml format (i.e. 1 percent = 0.01) quoted with respect to `noOfPeriods' periods
noOfPeriods - the number of periods per annum in which the `yearlyRate' is quoted
newNoOfPeriods - the number of annual time periods the annual interest rate is compounded over
EffectiveAndNominalInterestDemoException
See Also:
EffectiveAndNominalInterest.convertYearlyRate(double, int, int)

realReturn

public double realReturn(double yearlyRate,
                         double inflation,
                         int noOfPeriods,
                         int newNoOfPeriods)
                  throws EffectiveAndNominalInterestDemoException
Method realReturn(double, double, int, int) as defined in the EffectiveAndNominalInterest remote interface.

Description copied from the EffectiveAndNominalInterest interface:

Calculates the real return of a `newNoOfPeriods'-yearly rate when the return with respect to a `noOfPeriods'-yearly rate and the annual inflation is known.

Parameters:
yearlyRate - the return quoted in terms of the `noOfPeriods'-yearly rate and given in decimal format (i.e. 1 percent = 0.01). Note that this is not the inflation adjusted real return.
inflation - the annual rate of inflation in decimal format (i.e. 1 percent = 0.01)
noOfPeriods - the number of periods per annual in which the yearlyRate is quoted
newNoOfPeriods - the number of annual time periods which the returned real return is quoted in
EffectiveAndNominalInterestDemoException
See Also:
EffectiveAndNominalInterest.realReturn(double, double, int, int)

forceOfInterest

public double forceOfInterest(double interest)
                       throws EffectiveAndNominalInterestDemoException
Method forceOfInterest(double) as defined in the EffectiveAndNominalInterest remote interface.

Description copied from the EffectiveAndNominalInterest interface:

Evaluates the force of interest with respect a given period from a given interest rate expressed within respect to the same period. That is, we convert the annual interest rate in the annual force of interest.

Parameters:
interest - the rate of interest in decimal format (i.e. 1 percent = 0.01) with respect to a given period (for example, daily annual etc).
EffectiveAndNominalInterestDemoException
See Also:
EffectiveAndNominalInterest.forceOfInterest(double)

nominalRateOfInterest

public double nominalRateOfInterest(double interest,
                                    int noOfPeriods)
                             throws EffectiveAndNominalInterestDemoException
Method nominalRateOfInterest(double, int) as defined in the EffectiveAndNominalInterest remote interface.

Description copied from the EffectiveAndNominalInterest interface:

Converts the effective annual nominal rate of interest to the nominal rate of interest convertible `noOfPeriods'-yearly.

Parameters:
interest - the annual rate of interest in decimal format (i.e. 1 percent = 0.01)
noOfPeriods - the number of periods over which the converted nominal interest in expressed in terms of.
EffectiveAndNominalInterestDemoException
See Also:
EffectiveAndNominalInterest.nominalRateOfInterest(double, int)

WebCab Bonds Demo
(J2EE Edition)