WebCab Bonds
v2.01
(J2SE Edition)

webcab.lib.finance.interest
Class EffectiveAndNominalInterest

java.lang.Object
  |
  +--webcab.lib.finance.interest.EffectiveAndNominalInterest
All Implemented Interfaces:
Serializable

public class EffectiveAndNominalInterest
extends Object
implements Serializable

Offers methods for the conversion between differing number of conversion periods for effective interest, nominal interest and the real return.

See Also:
Serialized Form

Constructor Summary
EffectiveAndNominalInterest()
          Creates a new instance.
 
Method Summary
 double convertYearlyRate(double annualRate, int noOfPeriods, int newNoOfPeriods)
          Converts the effective annualRate of (annual) interest which is quoted in noOfPeriods-annual rate into the newNoOfPeriods-annual rate.
 double forceOfInterest(double interest)
          Evaluates the force of interest with respect to the period considered where the associated given interest rate is expressed with 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-annual.
 double realReturn(double annualRate, double inflation, int noOfPeriods, int newNoOfPeriods)
          Calculates the real return of a newNoOfPeriods-annual rate when the return with respect to a noOfPeriods-annual rate and the annual inflation is known.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EffectiveAndNominalInterest

public EffectiveAndNominalInterest()
Creates a new instance.

Method Detail

convertYearlyRate

public double convertYearlyRate(double annualRate,
                                int noOfPeriods,
                                int newNoOfPeriods)
Converts the effective annualRate of (annual) interest which is quoted in noOfPeriods-annual rate into the newNoOfPeriods-annual rate.

Parameters:
annualRate - the interest rate in decimal format (i.e. 1 percent = 0.01) quoted with respect to noOfPeriods periods
noOfPeriods - the number of periods per annum in which the annualRate is quoted
newNoOfPeriods - the number of annual time periods the annual interest rate is compounded over
Returns:
The annual interest rate with respect to newNoOfPeriods number of compounding periods returned in decimal format (i.e. 1 percent = 0.01).

realReturn

public double realReturn(double annualRate,
                         double inflation,
                         int noOfPeriods,
                         int newNoOfPeriods)
Calculates the real return of a newNoOfPeriods-annual rate when the return with respect to a noOfPeriods-annual rate and the annual inflation is known.

Parameters:
annualRate - the return quoted in terms of the noOfPeriods-annual 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 annualRate is quoted
newNoOfPeriods - the number of annual time periods which the returned real return is quoted in
Returns:
The real return quoted as a noOfPeriods-annual rate. (i.e. compounded noOfPeriods times a year returned in decimal format (i.e. 1 percent = 0.01).

forceOfInterest

public double forceOfInterest(double interest)
Evaluates the force of interest with respect to the period considered where the associated given interest rate is expressed with respect to the same period. That is, if we provide the annual interest rate then the annual force of interest will be evaluated.

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).
Returns:
The force of interest with respect to the period considered.

nominalRateOfInterest

public double nominalRateOfInterest(double interest,
                                    int noOfPeriods)
Converts the effective annual nominal rate of interest to the nominal rate of interest convertible noOfPeriods-annual.

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.
Returns:
The nominal rate of interest convertible noOfPeriods-annually returned in decimal format (i.e. 1 percent = 0.01).

WebCab Bonds
v2.01
(J2SE Edition)