WebCab Bonds Demo
(J2EE Edition)

com.webcab.ejb.finance.interest
Interface EffectiveAndNominalInterest

All Superinterfaces:
EJBObject, Remote

public interface EffectiveAndNominalInterest
extends EJBObject

This Enterprise JavaBean offers methods for the conversion between differing number of conversion periods for effective interest, nominal interest and the real return.


Method Summary
 double convertYearlyRate(double yearlyRate, int noOfPeriods, int newNoOfPeriods)
          Converts the effective `yearlyRate' of interest which is quoted in `noOfPeriods'-yearly rate into the `newNoOfPeriods'-yearly rate.
 double forceOfInterest(double interest)
          Evaluates the force of interest with respect a given period from a given interest rate expressed within respect to the same period.
 double nominalRateOfInterest(double interest, int noOfPeriods)
          Converts the effective annual nominal rate of interest to the nominal rate of interest convertible `noOfPeriods'-yearly.
 double realReturn(double yearlyRate, double inflation, int noOfPeriods, int newNoOfPeriods)
          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.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

convertYearlyRate

public double convertYearlyRate(double yearlyRate,
                                int noOfPeriods,
                                int newNoOfPeriods)
                         throws EffectiveAndNominalInterestDemoException,
                                RemoteException
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
RemoteException

realReturn

public double realReturn(double yearlyRate,
                         double inflation,
                         int noOfPeriods,
                         int newNoOfPeriods)
                  throws EffectiveAndNominalInterestDemoException,
                         RemoteException
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
RemoteException

forceOfInterest

public double forceOfInterest(double interest)
                       throws EffectiveAndNominalInterestDemoException,
                              RemoteException
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
RemoteException

nominalRateOfInterest

public double nominalRateOfInterest(double interest,
                                    int noOfPeriods)
                             throws EffectiveAndNominalInterestDemoException,
                                    RemoteException
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
RemoteException

WebCab Bonds Demo
(J2EE Edition)